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 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 AuthorizationProviderType string // Enum values for AuthorizationProviderType const ( AuthorizationProviderTypeSaml AuthorizationProviderType = "SAML" ) // Values returns all known values for AuthorizationProviderType. 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 (AuthorizationProviderType) Values() []AuthorizationProviderType { return []AuthorizationProviderType{ "SAML", } } type DeviceStatus string // Enum values for DeviceStatus const ( DeviceStatusActive DeviceStatus = "ACTIVE" DeviceStatusSignedOut DeviceStatus = "SIGNED_OUT" ) // Values returns all known values for DeviceStatus. 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 (DeviceStatus) Values() []DeviceStatus { return []DeviceStatus{ "ACTIVE", "SIGNED_OUT", } } type DomainStatus string // Enum values for DomainStatus const ( DomainStatusPendingValidation DomainStatus = "PENDING_VALIDATION" DomainStatusAssociating DomainStatus = "ASSOCIATING" DomainStatusActive DomainStatus = "ACTIVE" DomainStatusInactive DomainStatus = "INACTIVE" DomainStatusDisassociating DomainStatus = "DISASSOCIATING" DomainStatusDisassociated DomainStatus = "DISASSOCIATED" DomainStatusFailedToAssociate DomainStatus = "FAILED_TO_ASSOCIATE" DomainStatusFailedToDisassociate DomainStatus = "FAILED_TO_DISASSOCIATE" ) // Values returns all known values for DomainStatus. 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 (DomainStatus) Values() []DomainStatus { return []DomainStatus{ "PENDING_VALIDATION", "ASSOCIATING", "ACTIVE", "INACTIVE", "DISASSOCIATING", "DISASSOCIATED", "FAILED_TO_ASSOCIATE", "FAILED_TO_DISASSOCIATE", } } type FleetStatus string // Enum values for FleetStatus const ( FleetStatusCreating FleetStatus = "CREATING" FleetStatusActive FleetStatus = "ACTIVE" FleetStatusDeleting FleetStatus = "DELETING" FleetStatusDeleted FleetStatus = "DELETED" FleetStatusFailedToCreate FleetStatus = "FAILED_TO_CREATE" FleetStatusFailedToDelete FleetStatus = "FAILED_TO_DELETE" ) // Values returns all known values for FleetStatus. 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 (FleetStatus) Values() []FleetStatus { return []FleetStatus{ "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED_TO_CREATE", "FAILED_TO_DELETE", } } type IdentityProviderType string // Enum values for IdentityProviderType const ( IdentityProviderTypeSaml IdentityProviderType = "SAML" ) // Values returns all known values for IdentityProviderType. 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 (IdentityProviderType) Values() []IdentityProviderType { return []IdentityProviderType{ "SAML", } }
110
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" ) // The service is temporarily unavailable. type InternalServerErrorException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerErrorException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerErrorException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerErrorException" } return *e.ErrorCodeOverride } func (e *InternalServerErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The request is not valid. type InvalidRequestException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidRequestException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidRequestException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidRequestException" } return *e.ErrorCodeOverride } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource already exists. type ResourceAlreadyExistsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceAlreadyExistsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceAlreadyExistsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceAlreadyExistsException" } return *e.ErrorCodeOverride } func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The requested resource was not found. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The number of requests exceeds the limit. type TooManyRequestsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *TooManyRequestsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *TooManyRequestsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "TooManyRequestsException" } return *e.ErrorCodeOverride } func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You are not authorized to perform this action. type UnauthorizedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnauthorizedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnauthorizedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnauthorizedException" } return *e.ErrorCodeOverride } func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
165
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" ) // The summary of devices. type DeviceSummary struct { // The ID of the device. DeviceId *string // The status of the device. DeviceStatus DeviceStatus noSmithyDocumentSerde } // The summary of the domain. type DomainSummary struct { // The time that the domain was created. // // This member is required. CreatedTime *time.Time // The name of the domain. // // This member is required. DomainName *string // The status of the domain. // // This member is required. DomainStatus DomainStatus // The name to display. DisplayName *string noSmithyDocumentSerde } // The summary of the fleet. type FleetSummary struct { // The identifier used by users to sign into the Amazon WorkLink app. CompanyCode *string // The time when the fleet was created. CreatedTime *time.Time // The name of the fleet to display. DisplayName *string // The Amazon Resource Name (ARN) of the fleet. FleetArn *string // The name of the fleet. FleetName *string // The status of the fleet. FleetStatus FleetStatus // The time when the fleet was last updated. LastUpdatedTime *time.Time // The tags attached to the resource. A tag is a key-value pair. Tags map[string]string noSmithyDocumentSerde } // The summary of the website authorization provider. type WebsiteAuthorizationProviderSummary struct { // The authorization provider type. // // This member is required. AuthorizationProviderType AuthorizationProviderType // A unique identifier for the authorization provider. AuthorizationProviderId *string // The time of creation. CreatedTime *time.Time // The domain name of the authorization provider. This applies only to SAML-based // authorization providers. DomainName *string noSmithyDocumentSerde } // The summary of the certificate authority (CA). type WebsiteCaSummary struct { // The time when the CA was added. CreatedTime *time.Time // The name to display. DisplayName *string // A unique identifier for the CA. WebsiteCaId *string noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
113
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" cryptorand "crypto/rand" "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" smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "WorkMail" const ServiceAPIVersion = "2017-10-01" // Client provides the API client to make operations call for Amazon WorkMail. 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) resolveIdempotencyTokenProvider(&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 // Provides idempotency tokens values that will be automatically populated into // idempotent API operations. IdempotencyTokenProvider IdempotencyTokenProvider // The logger writer interface to write logging messages to. Logger logging.Logger // 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, "workmail", 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 resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return } o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) } 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 } // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) } 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) }
454
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 workmail 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 member (user or group) to the resource's set of delegates. func (c *Client) AssociateDelegateToResource(ctx context.Context, params *AssociateDelegateToResourceInput, optFns ...func(*Options)) (*AssociateDelegateToResourceOutput, error) { if params == nil { params = &AssociateDelegateToResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateDelegateToResource", params, optFns, c.addOperationAssociateDelegateToResourceMiddlewares) if err != nil { return nil, err } out := result.(*AssociateDelegateToResourceOutput) out.ResultMetadata = metadata return out, nil } type AssociateDelegateToResourceInput struct { // The member (user or group) to associate to the resource. // // This member is required. EntityId *string // The organization under which the resource exists. // // This member is required. OrganizationId *string // The resource for which members (users or groups) are associated. // // This member is required. ResourceId *string noSmithyDocumentSerde } type AssociateDelegateToResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateDelegateToResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateDelegateToResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateDelegateToResource{}, 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 = addOpAssociateDelegateToResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateDelegateToResource(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_opAssociateDelegateToResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "AssociateDelegateToResource", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 member (user or group) to the group's set. func (c *Client) AssociateMemberToGroup(ctx context.Context, params *AssociateMemberToGroupInput, optFns ...func(*Options)) (*AssociateMemberToGroupOutput, error) { if params == nil { params = &AssociateMemberToGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateMemberToGroup", params, optFns, c.addOperationAssociateMemberToGroupMiddlewares) if err != nil { return nil, err } out := result.(*AssociateMemberToGroupOutput) out.ResultMetadata = metadata return out, nil } type AssociateMemberToGroupInput struct { // The group to which the member (user or group) is associated. // // This member is required. GroupId *string // The member (user or group) to associate to the group. // // This member is required. MemberId *string // The organization under which the group exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type AssociateMemberToGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateMemberToGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateMemberToGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateMemberToGroup{}, 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 = addOpAssociateMemberToGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateMemberToGroup(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_opAssociateMemberToGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "AssociateMemberToGroup", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Assumes an impersonation role for the given WorkMail organization. This method // returns an authentication token you can use to make impersonated calls. func (c *Client) AssumeImpersonationRole(ctx context.Context, params *AssumeImpersonationRoleInput, optFns ...func(*Options)) (*AssumeImpersonationRoleOutput, error) { if params == nil { params = &AssumeImpersonationRoleInput{} } result, metadata, err := c.invokeOperation(ctx, "AssumeImpersonationRole", params, optFns, c.addOperationAssumeImpersonationRoleMiddlewares) if err != nil { return nil, err } out := result.(*AssumeImpersonationRoleOutput) out.ResultMetadata = metadata return out, nil } type AssumeImpersonationRoleInput struct { // The impersonation role ID to assume. // // This member is required. ImpersonationRoleId *string // The WorkMail organization under which the impersonation role will be assumed. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type AssumeImpersonationRoleOutput struct { // The authentication token's validity, in seconds. ExpiresIn *int64 // The authentication token for the impersonation role. Token *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssumeImpersonationRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssumeImpersonationRole{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssumeImpersonationRole{}, 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 = addOpAssumeImpersonationRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeImpersonationRole(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_opAssumeImpersonationRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "AssumeImpersonationRole", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Cancels a mailbox export job. If the mailbox export job is near completion, it // might not be possible to cancel it. func (c *Client) CancelMailboxExportJob(ctx context.Context, params *CancelMailboxExportJobInput, optFns ...func(*Options)) (*CancelMailboxExportJobOutput, error) { if params == nil { params = &CancelMailboxExportJobInput{} } result, metadata, err := c.invokeOperation(ctx, "CancelMailboxExportJob", params, optFns, c.addOperationCancelMailboxExportJobMiddlewares) if err != nil { return nil, err } out := result.(*CancelMailboxExportJobOutput) out.ResultMetadata = metadata return out, nil } type CancelMailboxExportJobInput struct { // The idempotency token for the client request. // // This member is required. ClientToken *string // The job ID. // // This member is required. JobId *string // The organization ID. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type CancelMailboxExportJobOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCancelMailboxExportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelMailboxExportJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelMailboxExportJob{}, 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 = addIdempotencyToken_opCancelMailboxExportJobMiddleware(stack, options); err != nil { return err } if err = addOpCancelMailboxExportJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelMailboxExportJob(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 } type idempotencyToken_initializeOpCancelMailboxExportJob struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCancelMailboxExportJob) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCancelMailboxExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CancelMailboxExportJobInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CancelMailboxExportJobInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCancelMailboxExportJobMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCancelMailboxExportJob{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCancelMailboxExportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CancelMailboxExportJob", } }
168
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 alias to the set of a given member (user or group) of WorkMail. func (c *Client) CreateAlias(ctx context.Context, params *CreateAliasInput, optFns ...func(*Options)) (*CreateAliasOutput, error) { if params == nil { params = &CreateAliasInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateAlias", params, optFns, c.addOperationCreateAliasMiddlewares) if err != nil { return nil, err } out := result.(*CreateAliasOutput) out.ResultMetadata = metadata return out, nil } type CreateAliasInput struct { // The alias to add to the member set. // // This member is required. Alias *string // The member (user or group) to which this alias is added. // // This member is required. EntityId *string // The organization under which the member (user or group) exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type CreateAliasOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAlias{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAlias{}, 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 = addOpCreateAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAlias(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_opCreateAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateAlias", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an AvailabilityConfiguration for the given WorkMail organization and // domain. func (c *Client) CreateAvailabilityConfiguration(ctx context.Context, params *CreateAvailabilityConfigurationInput, optFns ...func(*Options)) (*CreateAvailabilityConfigurationOutput, error) { if params == nil { params = &CreateAvailabilityConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateAvailabilityConfiguration", params, optFns, c.addOperationCreateAvailabilityConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*CreateAvailabilityConfigurationOutput) out.ResultMetadata = metadata return out, nil } type CreateAvailabilityConfigurationInput struct { // The domain to which the provider applies. // // This member is required. DomainName *string // The WorkMail organization for which the AvailabilityConfiguration will be // created. // // This member is required. OrganizationId *string // An idempotent token that ensures that an API request is executed only once. ClientToken *string // Exchange Web Services (EWS) availability provider definition. The request must // contain exactly one provider definition, either EwsProvider or LambdaProvider . EwsProvider *types.EwsAvailabilityProvider // Lambda availability provider definition. The request must contain exactly one // provider definition, either EwsProvider or LambdaProvider . LambdaProvider *types.LambdaAvailabilityProvider noSmithyDocumentSerde } type CreateAvailabilityConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateAvailabilityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAvailabilityConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAvailabilityConfiguration{}, 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 = addIdempotencyToken_opCreateAvailabilityConfigurationMiddleware(stack, options); err != nil { return err } if err = addOpCreateAvailabilityConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAvailabilityConfiguration(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 } type idempotencyToken_initializeOpCreateAvailabilityConfiguration struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateAvailabilityConfiguration) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateAvailabilityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateAvailabilityConfigurationInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAvailabilityConfigurationInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateAvailabilityConfigurationMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAvailabilityConfiguration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateAvailabilityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateAvailabilityConfiguration", } }
176
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 group that can be used in WorkMail by calling the RegisterToWorkMail // operation. func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optFns ...func(*Options)) (*CreateGroupOutput, error) { if params == nil { params = &CreateGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateGroup", params, optFns, c.addOperationCreateGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateGroupInput struct { // The name of the group. // // This member is required. Name *string // The organization under which the group is to be created. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type CreateGroupOutput struct { // The identifier of the group. GroupId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateGroup{}, 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 = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGroup(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_opCreateGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateGroup", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an impersonation role for the given WorkMail organization. Idempotency // ensures that an API request completes no more than one time. With an idempotent // request, if the original request completes successfully, any subsequent retries // also complete successfully without performing any further actions. func (c *Client) CreateImpersonationRole(ctx context.Context, params *CreateImpersonationRoleInput, optFns ...func(*Options)) (*CreateImpersonationRoleOutput, error) { if params == nil { params = &CreateImpersonationRoleInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateImpersonationRole", params, optFns, c.addOperationCreateImpersonationRoleMiddlewares) if err != nil { return nil, err } out := result.(*CreateImpersonationRoleOutput) out.ResultMetadata = metadata return out, nil } type CreateImpersonationRoleInput struct { // The name of the new impersonation role. // // This member is required. Name *string // The WorkMail organization to create the new impersonation role within. // // This member is required. OrganizationId *string // The list of rules for the impersonation role. // // This member is required. Rules []types.ImpersonationRule // The impersonation role's type. The available impersonation role types are // READ_ONLY or FULL_ACCESS . // // This member is required. Type types.ImpersonationRoleType // The idempotency token for the client request. ClientToken *string // The description of the new impersonation role. Description *string noSmithyDocumentSerde } type CreateImpersonationRoleOutput struct { // The new impersonation role ID. ImpersonationRoleId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateImpersonationRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateImpersonationRole{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateImpersonationRole{}, 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 = addIdempotencyToken_opCreateImpersonationRoleMiddleware(stack, options); err != nil { return err } if err = addOpCreateImpersonationRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImpersonationRole(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 } type idempotencyToken_initializeOpCreateImpersonationRole struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateImpersonationRole) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateImpersonationRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateImpersonationRoleInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateImpersonationRoleInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateImpersonationRoleMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateImpersonationRole{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateImpersonationRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateImpersonationRole", } }
187
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new mobile device access rule for the specified WorkMail organization. func (c *Client) CreateMobileDeviceAccessRule(ctx context.Context, params *CreateMobileDeviceAccessRuleInput, optFns ...func(*Options)) (*CreateMobileDeviceAccessRuleOutput, error) { if params == nil { params = &CreateMobileDeviceAccessRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateMobileDeviceAccessRule", params, optFns, c.addOperationCreateMobileDeviceAccessRuleMiddlewares) if err != nil { return nil, err } out := result.(*CreateMobileDeviceAccessRuleOutput) out.ResultMetadata = metadata return out, nil } type CreateMobileDeviceAccessRuleInput struct { // The effect of the rule when it matches. Allowed values are ALLOW or DENY . // // This member is required. Effect types.MobileDeviceAccessRuleEffect // The rule name. // // This member is required. Name *string // The WorkMail organization under which the rule will be created. // // This member is required. OrganizationId *string // The idempotency token for the client request. ClientToken *string // The rule description. Description *string // Device models that the rule will match. DeviceModels []string // Device operating systems that the rule will match. DeviceOperatingSystems []string // Device types that the rule will match. DeviceTypes []string // Device user agents that the rule will match. DeviceUserAgents []string // Device models that the rule will not match. All other device models will match. NotDeviceModels []string // Device operating systems that the rule will not match. All other device // operating systems will match. NotDeviceOperatingSystems []string // Device types that the rule will not match. All other device types will match. NotDeviceTypes []string // Device user agents that the rule will not match. All other device user agents // will match. NotDeviceUserAgents []string noSmithyDocumentSerde } type CreateMobileDeviceAccessRuleOutput struct { // The identifier for the newly created mobile device access rule. MobileDeviceAccessRuleId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateMobileDeviceAccessRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateMobileDeviceAccessRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateMobileDeviceAccessRule{}, 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 = addIdempotencyToken_opCreateMobileDeviceAccessRuleMiddleware(stack, options); err != nil { return err } if err = addOpCreateMobileDeviceAccessRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMobileDeviceAccessRule(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 } type idempotencyToken_initializeOpCreateMobileDeviceAccessRule struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateMobileDeviceAccessRule) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateMobileDeviceAccessRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateMobileDeviceAccessRuleInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateMobileDeviceAccessRuleInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateMobileDeviceAccessRuleMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateMobileDeviceAccessRule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateMobileDeviceAccessRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateMobileDeviceAccessRule", } }
204
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new WorkMail organization. Optionally, you can choose to associate an // existing AWS Directory Service directory with your organization. If an AWS // Directory Service directory ID is specified, the organization alias must match // the directory alias. If you choose not to associate an existing directory with // your organization, then we create a new WorkMail directory for you. For more // information, see Adding an organization (https://docs.aws.amazon.com/workmail/latest/adminguide/add_new_organization.html) // in the WorkMail Administrator Guide. You can associate multiple email domains // with an organization, then choose your default email domain from the WorkMail // console. You can also associate a domain that is managed in an Amazon Route 53 // public hosted zone. For more information, see Adding a domain (https://docs.aws.amazon.com/workmail/latest/adminguide/add_domain.html) // and Choosing the default domain (https://docs.aws.amazon.com/workmail/latest/adminguide/default_domain.html) // in the WorkMail Administrator Guide. Optionally, you can use a customer managed // key from AWS Key Management Service (AWS KMS) to encrypt email for your // organization. If you don't associate an AWS KMS key, WorkMail creates a default, // AWS managed key for you. func (c *Client) CreateOrganization(ctx context.Context, params *CreateOrganizationInput, optFns ...func(*Options)) (*CreateOrganizationOutput, error) { if params == nil { params = &CreateOrganizationInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateOrganization", params, optFns, c.addOperationCreateOrganizationMiddlewares) if err != nil { return nil, err } out := result.(*CreateOrganizationOutput) out.ResultMetadata = metadata return out, nil } type CreateOrganizationInput struct { // The organization alias. // // This member is required. Alias *string // The idempotency token associated with the request. ClientToken *string // The AWS Directory Service directory ID. DirectoryId *string // The email domains to associate with the organization. Domains []types.Domain // When true , allows organization interoperability between WorkMail and Microsoft // Exchange. If true , you must include a AD Connector directory ID in the request. EnableInteroperability bool // The Amazon Resource Name (ARN) of a customer managed key from AWS KMS. KmsKeyArn *string noSmithyDocumentSerde } type CreateOrganizationOutput struct { // The organization ID. OrganizationId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOrganization{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOrganization{}, 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 = addIdempotencyToken_opCreateOrganizationMiddleware(stack, options); err != nil { return err } if err = addOpCreateOrganizationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrganization(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 } type idempotencyToken_initializeOpCreateOrganization struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateOrganization) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateOrganization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateOrganizationInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateOrganizationInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateOrganizationMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateOrganization{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateOrganization", } }
192
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new WorkMail resource. func (c *Client) CreateResource(ctx context.Context, params *CreateResourceInput, optFns ...func(*Options)) (*CreateResourceOutput, error) { if params == nil { params = &CreateResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateResource", params, optFns, c.addOperationCreateResourceMiddlewares) if err != nil { return nil, err } out := result.(*CreateResourceOutput) out.ResultMetadata = metadata return out, nil } type CreateResourceInput struct { // The name of the new resource. // // This member is required. Name *string // The identifier associated with the organization for which the resource is // created. // // This member is required. OrganizationId *string // The type of the new resource. The available types are equipment and room . // // This member is required. Type types.ResourceType noSmithyDocumentSerde } type CreateResourceOutput struct { // The identifier of the new resource. ResourceId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateResource{}, 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 = addOpCreateResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateResource(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_opCreateResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateResource", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 user who can be used in WorkMail by calling the RegisterToWorkMail // operation. func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns ...func(*Options)) (*CreateUserOutput, error) { if params == nil { params = &CreateUserInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateUser", params, optFns, c.addOperationCreateUserMiddlewares) if err != nil { return nil, err } out := result.(*CreateUserOutput) out.ResultMetadata = metadata return out, nil } type CreateUserInput struct { // The display name for the new user. // // This member is required. DisplayName *string // The name for the new user. WorkMail directory user names have a maximum length // of 64. All others have a maximum length of 20. // // This member is required. Name *string // The identifier of the organization for which the user is created. // // This member is required. OrganizationId *string // The password for the new user. // // This member is required. Password *string noSmithyDocumentSerde } type CreateUserOutput struct { // The identifier for the new user. UserId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUser{}, 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 = addOpCreateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUser(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_opCreateUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "CreateUser", } }
141
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 access control rule for the specified WorkMail organization. // Deleting already deleted and non-existing rules does not produce an error. In // those cases, the service sends back an HTTP 200 response with an empty HTTP // body. func (c *Client) DeleteAccessControlRule(ctx context.Context, params *DeleteAccessControlRuleInput, optFns ...func(*Options)) (*DeleteAccessControlRuleOutput, error) { if params == nil { params = &DeleteAccessControlRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteAccessControlRule", params, optFns, c.addOperationDeleteAccessControlRuleMiddlewares) if err != nil { return nil, err } out := result.(*DeleteAccessControlRuleOutput) out.ResultMetadata = metadata return out, nil } type DeleteAccessControlRuleInput struct { // The name of the access control rule. // // This member is required. Name *string // The identifier for the organization. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteAccessControlRuleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteAccessControlRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAccessControlRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAccessControlRule{}, 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 = addOpDeleteAccessControlRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccessControlRule(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_opDeleteAccessControlRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteAccessControlRule", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Remove one or more specified aliases from a set of aliases for a given user. func (c *Client) DeleteAlias(ctx context.Context, params *DeleteAliasInput, optFns ...func(*Options)) (*DeleteAliasOutput, error) { if params == nil { params = &DeleteAliasInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteAlias", params, optFns, c.addOperationDeleteAliasMiddlewares) if err != nil { return nil, err } out := result.(*DeleteAliasOutput) out.ResultMetadata = metadata return out, nil } type DeleteAliasInput struct { // The aliases to be removed from the user's set of aliases. Duplicate entries in // the list are collapsed into single entries (the list is transformed into a set). // // This member is required. Alias *string // The identifier for the member (user or group) from which to have the aliases // removed. // // This member is required. EntityId *string // The identifier for the organization under which the user exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteAliasOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAlias{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAlias{}, 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 = addOpDeleteAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAlias(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_opDeleteAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteAlias", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 AvailabilityConfiguration for the given WorkMail organization and // domain. func (c *Client) DeleteAvailabilityConfiguration(ctx context.Context, params *DeleteAvailabilityConfigurationInput, optFns ...func(*Options)) (*DeleteAvailabilityConfigurationOutput, error) { if params == nil { params = &DeleteAvailabilityConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteAvailabilityConfiguration", params, optFns, c.addOperationDeleteAvailabilityConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteAvailabilityConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeleteAvailabilityConfigurationInput struct { // The domain for which the AvailabilityConfiguration will be deleted. // // This member is required. DomainName *string // The WorkMail organization for which the AvailabilityConfiguration will be // deleted. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteAvailabilityConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteAvailabilityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAvailabilityConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAvailabilityConfiguration{}, 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 = addOpDeleteAvailabilityConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAvailabilityConfiguration(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_opDeleteAvailabilityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteAvailabilityConfiguration", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 email monitoring configuration for a specified organization. func (c *Client) DeleteEmailMonitoringConfiguration(ctx context.Context, params *DeleteEmailMonitoringConfigurationInput, optFns ...func(*Options)) (*DeleteEmailMonitoringConfigurationOutput, error) { if params == nil { params = &DeleteEmailMonitoringConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteEmailMonitoringConfiguration", params, optFns, c.addOperationDeleteEmailMonitoringConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteEmailMonitoringConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeleteEmailMonitoringConfigurationInput struct { // The ID of the organization from which the email monitoring configuration is // deleted. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteEmailMonitoringConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteEmailMonitoringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteEmailMonitoringConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteEmailMonitoringConfiguration{}, 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 = addOpDeleteEmailMonitoringConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEmailMonitoringConfiguration(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_opDeleteEmailMonitoringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteEmailMonitoringConfiguration", } }
121
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 group from WorkMail. func (c *Client) DeleteGroup(ctx context.Context, params *DeleteGroupInput, optFns ...func(*Options)) (*DeleteGroupOutput, error) { if params == nil { params = &DeleteGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteGroup", params, optFns, c.addOperationDeleteGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteGroupInput struct { // The identifier of the group to be deleted. // // This member is required. GroupId *string // The organization that contains the group. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteGroup{}, 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 = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroup(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_opDeleteGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteGroup", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 impersonation role for the given WorkMail organization. func (c *Client) DeleteImpersonationRole(ctx context.Context, params *DeleteImpersonationRoleInput, optFns ...func(*Options)) (*DeleteImpersonationRoleOutput, error) { if params == nil { params = &DeleteImpersonationRoleInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteImpersonationRole", params, optFns, c.addOperationDeleteImpersonationRoleMiddlewares) if err != nil { return nil, err } out := result.(*DeleteImpersonationRoleOutput) out.ResultMetadata = metadata return out, nil } type DeleteImpersonationRoleInput struct { // The ID of the impersonation role to delete. // // This member is required. ImpersonationRoleId *string // The WorkMail organization from which to delete the impersonation role. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteImpersonationRoleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteImpersonationRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteImpersonationRole{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteImpersonationRole{}, 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 = addOpDeleteImpersonationRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteImpersonationRole(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_opDeleteImpersonationRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteImpersonationRole", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 permissions granted to a member (user or group). func (c *Client) DeleteMailboxPermissions(ctx context.Context, params *DeleteMailboxPermissionsInput, optFns ...func(*Options)) (*DeleteMailboxPermissionsOutput, error) { if params == nil { params = &DeleteMailboxPermissionsInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteMailboxPermissions", params, optFns, c.addOperationDeleteMailboxPermissionsMiddlewares) if err != nil { return nil, err } out := result.(*DeleteMailboxPermissionsOutput) out.ResultMetadata = metadata return out, nil } type DeleteMailboxPermissionsInput struct { // The identifier of the member (user or group) that owns the mailbox. // // This member is required. EntityId *string // The identifier of the member (user or group) for which to delete granted // permissions. // // This member is required. GranteeId *string // The identifier of the organization under which the member (user or group) // exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteMailboxPermissionsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteMailboxPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteMailboxPermissions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteMailboxPermissions{}, 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 = addOpDeleteMailboxPermissionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMailboxPermissions(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_opDeleteMailboxPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteMailboxPermissions", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 mobile device access override for the given WorkMail organization, // user, and device. Deleting already deleted and non-existing overrides does not // produce an error. In those cases, the service sends back an HTTP 200 response // with an empty HTTP body. func (c *Client) DeleteMobileDeviceAccessOverride(ctx context.Context, params *DeleteMobileDeviceAccessOverrideInput, optFns ...func(*Options)) (*DeleteMobileDeviceAccessOverrideOutput, error) { if params == nil { params = &DeleteMobileDeviceAccessOverrideInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteMobileDeviceAccessOverride", params, optFns, c.addOperationDeleteMobileDeviceAccessOverrideMiddlewares) if err != nil { return nil, err } out := result.(*DeleteMobileDeviceAccessOverrideOutput) out.ResultMetadata = metadata return out, nil } type DeleteMobileDeviceAccessOverrideInput struct { // The mobile device for which you delete the override. DeviceId is case // insensitive. // // This member is required. DeviceId *string // The WorkMail organization for which the access override will be deleted. // // This member is required. OrganizationId *string // The WorkMail user for which you want to delete the override. Accepts the // following types of user identities: // - User ID: 12345678-1234-1234-1234-123456789012 or // S-1-1-12-1234567890-123456789-123456789-1234 // - Email address: [email protected] // - User name: user // // This member is required. UserId *string noSmithyDocumentSerde } type DeleteMobileDeviceAccessOverrideOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteMobileDeviceAccessOverrideMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteMobileDeviceAccessOverride{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride{}, 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 = addOpDeleteMobileDeviceAccessOverrideValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMobileDeviceAccessOverride(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_opDeleteMobileDeviceAccessOverride(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteMobileDeviceAccessOverride", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 mobile device access rule for the specified WorkMail organization. // Deleting already deleted and non-existing rules does not produce an error. In // those cases, the service sends back an HTTP 200 response with an empty HTTP // body. func (c *Client) DeleteMobileDeviceAccessRule(ctx context.Context, params *DeleteMobileDeviceAccessRuleInput, optFns ...func(*Options)) (*DeleteMobileDeviceAccessRuleOutput, error) { if params == nil { params = &DeleteMobileDeviceAccessRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteMobileDeviceAccessRule", params, optFns, c.addOperationDeleteMobileDeviceAccessRuleMiddlewares) if err != nil { return nil, err } out := result.(*DeleteMobileDeviceAccessRuleOutput) out.ResultMetadata = metadata return out, nil } type DeleteMobileDeviceAccessRuleInput struct { // The identifier of the rule to be deleted. // // This member is required. MobileDeviceAccessRuleId *string // The WorkMail organization under which the rule will be deleted. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteMobileDeviceAccessRuleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteMobileDeviceAccessRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteMobileDeviceAccessRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule{}, 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 = addOpDeleteMobileDeviceAccessRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMobileDeviceAccessRule(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_opDeleteMobileDeviceAccessRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteMobileDeviceAccessRule", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes an WorkMail organization and all underlying AWS resources managed by // WorkMail as part of the organization. You can choose whether to delete the // associated directory. For more information, see Removing an organization (https://docs.aws.amazon.com/workmail/latest/adminguide/remove_organization.html) // in the WorkMail Administrator Guide. func (c *Client) DeleteOrganization(ctx context.Context, params *DeleteOrganizationInput, optFns ...func(*Options)) (*DeleteOrganizationOutput, error) { if params == nil { params = &DeleteOrganizationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteOrganization", params, optFns, c.addOperationDeleteOrganizationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteOrganizationOutput) out.ResultMetadata = metadata return out, nil } type DeleteOrganizationInput struct { // If true, deletes the AWS Directory Service directory associated with the // organization. // // This member is required. DeleteDirectory bool // The organization ID. // // This member is required. OrganizationId *string // The idempotency token associated with the request. ClientToken *string noSmithyDocumentSerde } type DeleteOrganizationOutput struct { // The organization ID. OrganizationId *string // The state of the organization. State *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOrganization{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOrganization{}, 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 = addIdempotencyToken_opDeleteOrganizationMiddleware(stack, options); err != nil { return err } if err = addOpDeleteOrganizationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOrganization(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 } type idempotencyToken_initializeOpDeleteOrganization struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpDeleteOrganization) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpDeleteOrganization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*DeleteOrganizationInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteOrganizationInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opDeleteOrganizationMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteOrganization{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opDeleteOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteOrganization", } }
176
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 resource. func (c *Client) DeleteResource(ctx context.Context, params *DeleteResourceInput, optFns ...func(*Options)) (*DeleteResourceOutput, error) { if params == nil { params = &DeleteResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteResource", params, optFns, c.addOperationDeleteResourceMiddlewares) if err != nil { return nil, err } out := result.(*DeleteResourceOutput) out.ResultMetadata = metadata return out, nil } type DeleteResourceInput struct { // The identifier associated with the organization from which the resource is // deleted. // // This member is required. OrganizationId *string // The identifier of the resource to be deleted. // // This member is required. ResourceId *string noSmithyDocumentSerde } type DeleteResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResource{}, 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 = addOpDeleteResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResource(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_opDeleteResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteResource", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 retention policy from the specified organization. func (c *Client) DeleteRetentionPolicy(ctx context.Context, params *DeleteRetentionPolicyInput, optFns ...func(*Options)) (*DeleteRetentionPolicyOutput, error) { if params == nil { params = &DeleteRetentionPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRetentionPolicy", params, optFns, c.addOperationDeleteRetentionPolicyMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRetentionPolicyOutput) out.ResultMetadata = metadata return out, nil } type DeleteRetentionPolicyInput struct { // The retention policy ID. // // This member is required. Id *string // The organization ID. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeleteRetentionPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRetentionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRetentionPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRetentionPolicy{}, 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 = addOpDeleteRetentionPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRetentionPolicy(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_opDeleteRetentionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteRetentionPolicy", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 user from WorkMail and all subsequent systems. Before you can delete // a user, the user state must be DISABLED . Use the DescribeUser action to // confirm the user state. Deleting a user is permanent and cannot be undone. // WorkMail archives user mailboxes for 30 days before they are permanently // removed. func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns ...func(*Options)) (*DeleteUserOutput, error) { if params == nil { params = &DeleteUserInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteUser", params, optFns, c.addOperationDeleteUserMiddlewares) if err != nil { return nil, err } out := result.(*DeleteUserOutput) out.ResultMetadata = metadata return out, nil } type DeleteUserInput struct { // The organization that contains the user to be deleted. // // This member is required. OrganizationId *string // The identifier of the user to be deleted. // // This member is required. UserId *string noSmithyDocumentSerde } type DeleteUserOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteUser{}, 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 = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUser(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_opDeleteUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeleteUser", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Mark a user, group, or resource as no longer used in WorkMail. This action // disassociates the mailbox and schedules it for clean-up. WorkMail keeps // mailboxes for 30 days before they are permanently removed. The functionality in // the console is Disable. func (c *Client) DeregisterFromWorkMail(ctx context.Context, params *DeregisterFromWorkMailInput, optFns ...func(*Options)) (*DeregisterFromWorkMailOutput, error) { if params == nil { params = &DeregisterFromWorkMailInput{} } result, metadata, err := c.invokeOperation(ctx, "DeregisterFromWorkMail", params, optFns, c.addOperationDeregisterFromWorkMailMiddlewares) if err != nil { return nil, err } out := result.(*DeregisterFromWorkMailOutput) out.ResultMetadata = metadata return out, nil } type DeregisterFromWorkMailInput struct { // The identifier for the member (user or group) to be updated. // // This member is required. EntityId *string // The identifier for the organization under which the WorkMail entity exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeregisterFromWorkMailOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeregisterFromWorkMailMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterFromWorkMail{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterFromWorkMail{}, 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 = addOpDeregisterFromWorkMailValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterFromWorkMail(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_opDeregisterFromWorkMail(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeregisterFromWorkMail", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 domain from WorkMail, stops email routing to WorkMail, and removes // the authorization allowing WorkMail use. SES keeps the domain because other // applications may use it. You must first remove any email address used by // WorkMail entities before you remove the domain. func (c *Client) DeregisterMailDomain(ctx context.Context, params *DeregisterMailDomainInput, optFns ...func(*Options)) (*DeregisterMailDomainOutput, error) { if params == nil { params = &DeregisterMailDomainInput{} } result, metadata, err := c.invokeOperation(ctx, "DeregisterMailDomain", params, optFns, c.addOperationDeregisterMailDomainMiddlewares) if err != nil { return nil, err } out := result.(*DeregisterMailDomainOutput) out.ResultMetadata = metadata return out, nil } type DeregisterMailDomainInput struct { // The domain to deregister in WorkMail and SES. // // This member is required. DomainName *string // The WorkMail organization for which the domain will be deregistered. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DeregisterMailDomainOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeregisterMailDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterMailDomain{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterMailDomain{}, 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 = addOpDeregisterMailDomainValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterMailDomain(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_opDeregisterMailDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DeregisterMailDomain", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Describes the current email monitoring configuration for a specified // organization. func (c *Client) DescribeEmailMonitoringConfiguration(ctx context.Context, params *DescribeEmailMonitoringConfigurationInput, optFns ...func(*Options)) (*DescribeEmailMonitoringConfigurationOutput, error) { if params == nil { params = &DescribeEmailMonitoringConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeEmailMonitoringConfiguration", params, optFns, c.addOperationDescribeEmailMonitoringConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeEmailMonitoringConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeEmailMonitoringConfigurationInput struct { // The ID of the organization for which the email monitoring configuration is // described. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DescribeEmailMonitoringConfigurationOutput struct { // The Amazon Resource Name (ARN) of the CloudWatch Log group associated with the // email monitoring configuration. LogGroupArn *string // The Amazon Resource Name (ARN) of the IAM Role associated with the email // monitoring configuration. RoleArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeEmailMonitoringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEmailMonitoringConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration{}, 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 = addOpDescribeEmailMonitoringConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEmailMonitoringConfiguration(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_opDescribeEmailMonitoringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DescribeEmailMonitoringConfiguration", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Returns the data available for the group. func (c *Client) DescribeGroup(ctx context.Context, params *DescribeGroupInput, optFns ...func(*Options)) (*DescribeGroupOutput, error) { if params == nil { params = &DescribeGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeGroup", params, optFns, c.addOperationDescribeGroupMiddlewares) if err != nil { return nil, err } out := result.(*DescribeGroupOutput) out.ResultMetadata = metadata return out, nil } type DescribeGroupInput struct { // The identifier for the group to be described. // // This member is required. GroupId *string // The identifier for the organization under which the group exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DescribeGroupOutput struct { // The date and time when a user was deregistered from WorkMail, in UNIX epoch // time format. DisabledDate *time.Time // The email of the described group. Email *string // The date and time when a user was registered to WorkMail, in UNIX epoch time // format. EnabledDate *time.Time // The identifier of the described group. GroupId *string // The name of the described group. Name *string // The state of the user: enabled (registered to WorkMail) or disabled // (deregistered or never registered to WorkMail). State types.EntityState // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeGroup{}, 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 = addOpDescribeGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGroup(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_opDescribeGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DescribeGroup", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Lists the settings in a DMARC policy for a specified organization. func (c *Client) DescribeInboundDmarcSettings(ctx context.Context, params *DescribeInboundDmarcSettingsInput, optFns ...func(*Options)) (*DescribeInboundDmarcSettingsOutput, error) { if params == nil { params = &DescribeInboundDmarcSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeInboundDmarcSettings", params, optFns, c.addOperationDescribeInboundDmarcSettingsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeInboundDmarcSettingsOutput) out.ResultMetadata = metadata return out, nil } type DescribeInboundDmarcSettingsInput struct { // Lists the ID of the given organization. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DescribeInboundDmarcSettingsOutput struct { // Lists the enforcement setting of the applied policy. Enforced bool // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeInboundDmarcSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInboundDmarcSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInboundDmarcSettings{}, 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 = addOpDescribeInboundDmarcSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInboundDmarcSettings(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_opDescribeInboundDmarcSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DescribeInboundDmarcSettings", } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Describes the current status of a mailbox export job. func (c *Client) DescribeMailboxExportJob(ctx context.Context, params *DescribeMailboxExportJobInput, optFns ...func(*Options)) (*DescribeMailboxExportJobOutput, error) { if params == nil { params = &DescribeMailboxExportJobInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeMailboxExportJob", params, optFns, c.addOperationDescribeMailboxExportJobMiddlewares) if err != nil { return nil, err } out := result.(*DescribeMailboxExportJobOutput) out.ResultMetadata = metadata return out, nil } type DescribeMailboxExportJobInput struct { // The mailbox export job ID. // // This member is required. JobId *string // The organization ID. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DescribeMailboxExportJobOutput struct { // The mailbox export job description. Description *string // The mailbox export job end timestamp. EndTime *time.Time // The identifier of the user or resource associated with the mailbox. EntityId *string // Error information for failed mailbox export jobs. ErrorInfo *string // The estimated progress of the mailbox export job, in percentage points. EstimatedProgress int32 // The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS // KMS) key that encrypts the exported mailbox content. KmsKeyArn *string // The ARN of the AWS Identity and Access Management (IAM) role that grants write // permission to the Amazon Simple Storage Service (Amazon S3) bucket. RoleArn *string // The name of the S3 bucket. S3BucketName *string // The path to the S3 bucket and file that the mailbox export job is exporting to. S3Path *string // The S3 bucket prefix. S3Prefix *string // The mailbox export job start timestamp. StartTime *time.Time // The state of the mailbox export job. State types.MailboxExportJobState // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeMailboxExportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMailboxExportJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMailboxExportJob{}, 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 = addOpDescribeMailboxExportJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMailboxExportJob(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_opDescribeMailboxExportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DescribeMailboxExportJob", } }
166
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" "time" ) // Provides more information regarding a given organization based on its // identifier. func (c *Client) DescribeOrganization(ctx context.Context, params *DescribeOrganizationInput, optFns ...func(*Options)) (*DescribeOrganizationOutput, error) { if params == nil { params = &DescribeOrganizationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeOrganization", params, optFns, c.addOperationDescribeOrganizationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeOrganizationOutput) out.ResultMetadata = metadata return out, nil } type DescribeOrganizationInput struct { // The identifier for the organization to be described. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DescribeOrganizationOutput struct { // The Amazon Resource Name (ARN) of the organization. ARN *string // The alias for an organization. Alias *string // The date at which the organization became usable in the WorkMail context, in // UNIX epoch time format. CompletedDate *time.Time // The default mail domain associated with the organization. DefaultMailDomain *string // The identifier for the directory associated with an WorkMail organization. DirectoryId *string // The type of directory associated with the WorkMail organization. DirectoryType *string // (Optional) The error message indicating if unexpected behavior was encountered // with regards to the organization. ErrorMessage *string // The identifier of an organization. OrganizationId *string // The state of an organization. State *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeOrganization{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeOrganization{}, 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 = addOpDescribeOrganizationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganization(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_opDescribeOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DescribeOrganization", } }
152
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Returns the data available for the resource. func (c *Client) DescribeResource(ctx context.Context, params *DescribeResourceInput, optFns ...func(*Options)) (*DescribeResourceOutput, error) { if params == nil { params = &DescribeResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeResource", params, optFns, c.addOperationDescribeResourceMiddlewares) if err != nil { return nil, err } out := result.(*DescribeResourceOutput) out.ResultMetadata = metadata return out, nil } type DescribeResourceInput struct { // The identifier associated with the organization for which the resource is // described. // // This member is required. OrganizationId *string // The identifier of the resource to be described. // // This member is required. ResourceId *string noSmithyDocumentSerde } type DescribeResourceOutput struct { // The booking options for the described resource. BookingOptions *types.BookingOptions // The date and time when a resource was disabled from WorkMail, in UNIX epoch // time format. DisabledDate *time.Time // The email of the described resource. Email *string // The date and time when a resource was enabled for WorkMail, in UNIX epoch time // format. EnabledDate *time.Time // The name of the described resource. Name *string // The identifier of the described resource. ResourceId *string // The state of the resource: enabled (registered to WorkMail), disabled // (deregistered or never registered to WorkMail), or deleted. State types.EntityState // The type of the described resource. Type types.ResourceType // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeResource{}, 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 = addOpDescribeResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResource(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_opDescribeResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DescribeResource", } }
156
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Provides information regarding the user. func (c *Client) DescribeUser(ctx context.Context, params *DescribeUserInput, optFns ...func(*Options)) (*DescribeUserOutput, error) { if params == nil { params = &DescribeUserInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeUser", params, optFns, c.addOperationDescribeUserMiddlewares) if err != nil { return nil, err } out := result.(*DescribeUserOutput) out.ResultMetadata = metadata return out, nil } type DescribeUserInput struct { // The identifier for the organization under which the user exists. // // This member is required. OrganizationId *string // The identifier for the user to be described. // // This member is required. UserId *string noSmithyDocumentSerde } type DescribeUserOutput struct { // The date and time at which the user was disabled for WorkMail usage, in UNIX // epoch time format. DisabledDate *time.Time // The display name of the user. DisplayName *string // The email of the user. Email *string // The date and time at which the user was enabled for WorkMailusage, in UNIX // epoch time format. EnabledDate *time.Time // The name for the user. Name *string // The state of a user: enabled (registered to WorkMail) or disabled (deregistered // or never registered to WorkMail). State types.EntityState // The identifier for the described user. UserId *string // In certain cases, other entities are modeled as users. If interoperability is // enabled, resources are imported into WorkMail as users. Because different // WorkMail organizations rely on different directory types, administrators can // distinguish between an unregistered user (account is disabled and has a user // role) and the directory administrators. The values are USER, RESOURCE, and // SYSTEM_USER. UserRole types.UserRole // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeUser{}, 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 = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUser(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_opDescribeUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DescribeUser", } }
160
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 member from the resource's set of delegates. func (c *Client) DisassociateDelegateFromResource(ctx context.Context, params *DisassociateDelegateFromResourceInput, optFns ...func(*Options)) (*DisassociateDelegateFromResourceOutput, error) { if params == nil { params = &DisassociateDelegateFromResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociateDelegateFromResource", params, optFns, c.addOperationDisassociateDelegateFromResourceMiddlewares) if err != nil { return nil, err } out := result.(*DisassociateDelegateFromResourceOutput) out.ResultMetadata = metadata return out, nil } type DisassociateDelegateFromResourceInput struct { // The identifier for the member (user, group) to be removed from the resource's // delegates. // // This member is required. EntityId *string // The identifier for the organization under which the resource exists. // // This member is required. OrganizationId *string // The identifier of the resource from which delegates' set members are removed. // // This member is required. ResourceId *string noSmithyDocumentSerde } type DisassociateDelegateFromResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociateDelegateFromResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateDelegateFromResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateDelegateFromResource{}, 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 = addOpDisassociateDelegateFromResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateDelegateFromResource(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_opDisassociateDelegateFromResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DisassociateDelegateFromResource", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 member from a group. func (c *Client) DisassociateMemberFromGroup(ctx context.Context, params *DisassociateMemberFromGroupInput, optFns ...func(*Options)) (*DisassociateMemberFromGroupOutput, error) { if params == nil { params = &DisassociateMemberFromGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociateMemberFromGroup", params, optFns, c.addOperationDisassociateMemberFromGroupMiddlewares) if err != nil { return nil, err } out := result.(*DisassociateMemberFromGroupOutput) out.ResultMetadata = metadata return out, nil } type DisassociateMemberFromGroupInput struct { // The identifier for the group from which members are removed. // // This member is required. GroupId *string // The identifier for the member to be removed to the group. // // This member is required. MemberId *string // The identifier for the organization under which the group exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type DisassociateMemberFromGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociateMemberFromGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateMemberFromGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateMemberFromGroup{}, 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 = addOpDisassociateMemberFromGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateMemberFromGroup(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_opDisassociateMemberFromGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "DisassociateMemberFromGroup", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets the effects of an organization's access control rules as they apply to a // specified IPv4 address, access protocol action, and user ID or impersonation // role ID. You must provide either the user ID or impersonation role ID. // Impersonation role ID can only be used with Action EWS. func (c *Client) GetAccessControlEffect(ctx context.Context, params *GetAccessControlEffectInput, optFns ...func(*Options)) (*GetAccessControlEffectOutput, error) { if params == nil { params = &GetAccessControlEffectInput{} } result, metadata, err := c.invokeOperation(ctx, "GetAccessControlEffect", params, optFns, c.addOperationGetAccessControlEffectMiddlewares) if err != nil { return nil, err } out := result.(*GetAccessControlEffectOutput) out.ResultMetadata = metadata return out, nil } type GetAccessControlEffectInput struct { // The access protocol action. Valid values include ActiveSync , AutoDiscover , EWS // , IMAP , SMTP , WindowsOutlook , and WebMail . // // This member is required. Action *string // The IPv4 address. // // This member is required. IpAddress *string // The identifier for the organization. // // This member is required. OrganizationId *string // The impersonation role ID. ImpersonationRoleId *string // The user ID. UserId *string noSmithyDocumentSerde } type GetAccessControlEffectOutput struct { // The rule effect. Effect types.AccessControlRuleEffect // The rules that match the given parameters, resulting in an effect. MatchedRules []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetAccessControlEffectMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetAccessControlEffect{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetAccessControlEffect{}, 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 = addOpGetAccessControlEffectValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessControlEffect(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_opGetAccessControlEffect(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetAccessControlEffect", } }
148
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets the default retention policy details for the specified organization. func (c *Client) GetDefaultRetentionPolicy(ctx context.Context, params *GetDefaultRetentionPolicyInput, optFns ...func(*Options)) (*GetDefaultRetentionPolicyOutput, error) { if params == nil { params = &GetDefaultRetentionPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetDefaultRetentionPolicy", params, optFns, c.addOperationGetDefaultRetentionPolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetDefaultRetentionPolicyOutput) out.ResultMetadata = metadata return out, nil } type GetDefaultRetentionPolicyInput struct { // The organization ID. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type GetDefaultRetentionPolicyOutput struct { // The retention policy description. Description *string // The retention policy folder configurations. FolderConfigurations []types.FolderConfiguration // The retention policy ID. Id *string // The retention policy name. Name *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetDefaultRetentionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDefaultRetentionPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDefaultRetentionPolicy{}, 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 = addOpGetDefaultRetentionPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultRetentionPolicy(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_opGetDefaultRetentionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetDefaultRetentionPolicy", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Gets the impersonation role details for the given WorkMail organization. func (c *Client) GetImpersonationRole(ctx context.Context, params *GetImpersonationRoleInput, optFns ...func(*Options)) (*GetImpersonationRoleOutput, error) { if params == nil { params = &GetImpersonationRoleInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImpersonationRole", params, optFns, c.addOperationGetImpersonationRoleMiddlewares) if err != nil { return nil, err } out := result.(*GetImpersonationRoleOutput) out.ResultMetadata = metadata return out, nil } type GetImpersonationRoleInput struct { // The impersonation role ID to retrieve. // // This member is required. ImpersonationRoleId *string // The WorkMail organization from which to retrieve the impersonation role. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type GetImpersonationRoleOutput struct { // The date when the impersonation role was created. DateCreated *time.Time // The date when the impersonation role was last modified. DateModified *time.Time // The impersonation role description. Description *string // The impersonation role ID. ImpersonationRoleId *string // The impersonation role name. Name *string // The list of rules for the given impersonation role. Rules []types.ImpersonationRule // The impersonation role type. Type types.ImpersonationRoleType // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImpersonationRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetImpersonationRole{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetImpersonationRole{}, 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 = addOpGetImpersonationRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImpersonationRole(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_opGetImpersonationRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetImpersonationRole", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Tests whether the given impersonation role can impersonate a target user. func (c *Client) GetImpersonationRoleEffect(ctx context.Context, params *GetImpersonationRoleEffectInput, optFns ...func(*Options)) (*GetImpersonationRoleEffectOutput, error) { if params == nil { params = &GetImpersonationRoleEffectInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImpersonationRoleEffect", params, optFns, c.addOperationGetImpersonationRoleEffectMiddlewares) if err != nil { return nil, err } out := result.(*GetImpersonationRoleEffectOutput) out.ResultMetadata = metadata return out, nil } type GetImpersonationRoleEffectInput struct { // The impersonation role ID to test. // // This member is required. ImpersonationRoleId *string // The WorkMail organization where the impersonation role is defined. // // This member is required. OrganizationId *string // The WorkMail organization user chosen to test the impersonation role. The // following identity formats are available: // - User ID: 12345678-1234-1234-1234-123456789012 or // S-1-1-12-1234567890-123456789-123456789-1234 // - Email address: [email protected] // - User name: user // // This member is required. TargetUser *string noSmithyDocumentSerde } type GetImpersonationRoleEffectOutput struct { // Effect of the impersonation role on the target user based on its rules. // Available effects are ALLOW or DENY . Effect types.AccessEffect // A list of the rules that match the input and produce the configured effect. MatchedRules []types.ImpersonationMatchedRule // The impersonation role type. Type types.ImpersonationRoleType // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImpersonationRoleEffectMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetImpersonationRoleEffect{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetImpersonationRoleEffect{}, 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 = addOpGetImpersonationRoleEffectValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImpersonationRoleEffect(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_opGetImpersonationRoleEffect(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetImpersonationRoleEffect", } }
147
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Requests a user's mailbox details for a specified organization and user. func (c *Client) GetMailboxDetails(ctx context.Context, params *GetMailboxDetailsInput, optFns ...func(*Options)) (*GetMailboxDetailsOutput, error) { if params == nil { params = &GetMailboxDetailsInput{} } result, metadata, err := c.invokeOperation(ctx, "GetMailboxDetails", params, optFns, c.addOperationGetMailboxDetailsMiddlewares) if err != nil { return nil, err } out := result.(*GetMailboxDetailsOutput) out.ResultMetadata = metadata return out, nil } type GetMailboxDetailsInput struct { // The identifier for the organization that contains the user whose mailbox // details are being requested. // // This member is required. OrganizationId *string // The identifier for the user whose mailbox details are being requested. // // This member is required. UserId *string noSmithyDocumentSerde } type GetMailboxDetailsOutput struct { // The maximum allowed mailbox size, in MB, for the specified user. MailboxQuota *int32 // The current mailbox size, in MB, for the specified user. MailboxSize float64 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetMailboxDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMailboxDetails{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMailboxDetails{}, 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 = addOpGetMailboxDetailsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMailboxDetails(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_opGetMailboxDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetMailboxDetails", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets details for a mail domain, including domain records required to configure // your domain with recommended security. func (c *Client) GetMailDomain(ctx context.Context, params *GetMailDomainInput, optFns ...func(*Options)) (*GetMailDomainOutput, error) { if params == nil { params = &GetMailDomainInput{} } result, metadata, err := c.invokeOperation(ctx, "GetMailDomain", params, optFns, c.addOperationGetMailDomainMiddlewares) if err != nil { return nil, err } out := result.(*GetMailDomainOutput) out.ResultMetadata = metadata return out, nil } type GetMailDomainInput struct { // The domain from which you want to retrieve details. // // This member is required. DomainName *string // The WorkMail organization for which the domain is retrieved. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type GetMailDomainOutput struct { // Indicates the status of a DKIM verification. DkimVerificationStatus types.DnsRecordVerificationStatus // Specifies whether the domain is the default domain for your organization. IsDefault bool // Specifies whether the domain is a test domain provided by WorkMail, or a custom // domain. IsTestDomain bool // Indicates the status of the domain ownership verification. OwnershipVerificationStatus types.DnsRecordVerificationStatus // A list of the DNS records that WorkMail recommends adding in your DNS provider // for the best user experience. The records configure your domain with DMARC, SPF, // DKIM, and direct incoming email traffic to SES. See admin guide for more // details. Records []types.DnsRecord // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetMailDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMailDomain{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMailDomain{}, 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 = addOpGetMailDomainValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMailDomain(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_opGetMailDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetMailDomain", } }
147
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Simulates the effect of the mobile device access rules for the given attributes // of a sample access event. Use this method to test the effects of the current set // of mobile device access rules for the WorkMail organization for a particular // user's attributes. func (c *Client) GetMobileDeviceAccessEffect(ctx context.Context, params *GetMobileDeviceAccessEffectInput, optFns ...func(*Options)) (*GetMobileDeviceAccessEffectOutput, error) { if params == nil { params = &GetMobileDeviceAccessEffectInput{} } result, metadata, err := c.invokeOperation(ctx, "GetMobileDeviceAccessEffect", params, optFns, c.addOperationGetMobileDeviceAccessEffectMiddlewares) if err != nil { return nil, err } out := result.(*GetMobileDeviceAccessEffectOutput) out.ResultMetadata = metadata return out, nil } type GetMobileDeviceAccessEffectInput struct { // The WorkMail organization to simulate the access effect for. // // This member is required. OrganizationId *string // Device model the simulated user will report. DeviceModel *string // Device operating system the simulated user will report. DeviceOperatingSystem *string // Device type the simulated user will report. DeviceType *string // Device user agent the simulated user will report. DeviceUserAgent *string noSmithyDocumentSerde } type GetMobileDeviceAccessEffectOutput struct { // The effect of the simulated access, ALLOW or DENY , after evaluating mobile // device access rules in the WorkMail organization for the simulated user // parameters. Effect types.MobileDeviceAccessRuleEffect // A list of the rules which matched the simulated user input and produced the // effect. MatchedRules []types.MobileDeviceAccessMatchedRule // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetMobileDeviceAccessEffectMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMobileDeviceAccessEffect{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect{}, 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 = addOpGetMobileDeviceAccessEffectValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMobileDeviceAccessEffect(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_opGetMobileDeviceAccessEffect(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetMobileDeviceAccessEffect", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Gets the mobile device access override for the given WorkMail organization, // user, and device. func (c *Client) GetMobileDeviceAccessOverride(ctx context.Context, params *GetMobileDeviceAccessOverrideInput, optFns ...func(*Options)) (*GetMobileDeviceAccessOverrideOutput, error) { if params == nil { params = &GetMobileDeviceAccessOverrideInput{} } result, metadata, err := c.invokeOperation(ctx, "GetMobileDeviceAccessOverride", params, optFns, c.addOperationGetMobileDeviceAccessOverrideMiddlewares) if err != nil { return nil, err } out := result.(*GetMobileDeviceAccessOverrideOutput) out.ResultMetadata = metadata return out, nil } type GetMobileDeviceAccessOverrideInput struct { // The mobile device to which the override applies. DeviceId is case insensitive. // // This member is required. DeviceId *string // The WorkMail organization to which you want to apply the override. // // This member is required. OrganizationId *string // Identifies the WorkMail user for the override. Accepts the following types of // user identities: // - User ID: 12345678-1234-1234-1234-123456789012 or // S-1-1-12-1234567890-123456789-123456789-1234 // - Email address: [email protected] // - User name: user // // This member is required. UserId *string noSmithyDocumentSerde } type GetMobileDeviceAccessOverrideOutput struct { // The date the override was first created. DateCreated *time.Time // The date the description was last modified. DateModified *time.Time // A description of the override. Description *string // The device to which the access override applies. DeviceId *string // The effect of the override, ALLOW or DENY . Effect types.MobileDeviceAccessRuleEffect // The WorkMail user to which the access override applies. UserId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetMobileDeviceAccessOverrideMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMobileDeviceAccessOverride{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride{}, 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 = addOpGetMobileDeviceAccessOverrideValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMobileDeviceAccessOverride(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_opGetMobileDeviceAccessOverride(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "GetMobileDeviceAccessOverride", } }
157
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the access control rules for the specified organization. func (c *Client) ListAccessControlRules(ctx context.Context, params *ListAccessControlRulesInput, optFns ...func(*Options)) (*ListAccessControlRulesOutput, error) { if params == nil { params = &ListAccessControlRulesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListAccessControlRules", params, optFns, c.addOperationListAccessControlRulesMiddlewares) if err != nil { return nil, err } out := result.(*ListAccessControlRulesOutput) out.ResultMetadata = metadata return out, nil } type ListAccessControlRulesInput struct { // The identifier for the organization. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type ListAccessControlRulesOutput struct { // The access control rules. Rules []types.AccessControlRule // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListAccessControlRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAccessControlRules{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAccessControlRules{}, 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 = addOpListAccessControlRulesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessControlRules(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_opListAccessControlRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListAccessControlRules", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a paginated call to list the aliases associated with a given entity. func (c *Client) ListAliases(ctx context.Context, params *ListAliasesInput, optFns ...func(*Options)) (*ListAliasesOutput, error) { if params == nil { params = &ListAliasesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListAliases", params, optFns, c.addOperationListAliasesMiddlewares) if err != nil { return nil, err } out := result.(*ListAliasesOutput) out.ResultMetadata = metadata return out, nil } type ListAliasesInput struct { // The identifier for the entity for which to list the aliases. // // This member is required. EntityId *string // The identifier for the organization under which the entity exists. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string noSmithyDocumentSerde } type ListAliasesOutput struct { // The entity's paginated aliases. Aliases []string // The token to use to retrieve the next page of results. The value is "null" when // there are no more results to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAliases{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAliases{}, 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 = addOpListAliasesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAliases(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 } // ListAliasesAPIClient is a client that implements the ListAliases operation. type ListAliasesAPIClient interface { ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) } var _ ListAliasesAPIClient = (*Client)(nil) // ListAliasesPaginatorOptions is the paginator options for ListAliases type ListAliasesPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListAliasesPaginator is a paginator for ListAliases type ListAliasesPaginator struct { options ListAliasesPaginatorOptions client ListAliasesAPIClient params *ListAliasesInput nextToken *string firstPage bool } // NewListAliasesPaginator returns a new ListAliasesPaginator func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInput, optFns ...func(*ListAliasesPaginatorOptions)) *ListAliasesPaginator { if params == nil { params = &ListAliasesInput{} } options := ListAliasesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListAliasesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAliasesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAliases page. func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAliasesOutput, 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.ListAliases(ctx, &params, 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_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListAliases", } }
230
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List all the AvailabilityConfiguration 's for the given WorkMail organization. func (c *Client) ListAvailabilityConfigurations(ctx context.Context, params *ListAvailabilityConfigurationsInput, optFns ...func(*Options)) (*ListAvailabilityConfigurationsOutput, error) { if params == nil { params = &ListAvailabilityConfigurationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListAvailabilityConfigurations", params, optFns, c.addOperationListAvailabilityConfigurationsMiddlewares) if err != nil { return nil, err } out := result.(*ListAvailabilityConfigurationsOutput) out.ResultMetadata = metadata return out, nil } type ListAvailabilityConfigurationsInput struct { // The WorkMail organization for which the AvailabilityConfiguration 's will be // listed. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // require a token. NextToken *string noSmithyDocumentSerde } type ListAvailabilityConfigurationsOutput struct { // The list of AvailabilityConfiguration 's that exist for the specified WorkMail // organization. AvailabilityConfigurations []types.AvailabilityConfiguration // The token to use to retrieve the next page of results. The value is null when // there are no further results to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListAvailabilityConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAvailabilityConfigurations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAvailabilityConfigurations{}, 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 = addOpListAvailabilityConfigurationsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAvailabilityConfigurations(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 } // ListAvailabilityConfigurationsAPIClient is a client that implements the // ListAvailabilityConfigurations operation. type ListAvailabilityConfigurationsAPIClient interface { ListAvailabilityConfigurations(context.Context, *ListAvailabilityConfigurationsInput, ...func(*Options)) (*ListAvailabilityConfigurationsOutput, error) } var _ ListAvailabilityConfigurationsAPIClient = (*Client)(nil) // ListAvailabilityConfigurationsPaginatorOptions is the paginator options for // ListAvailabilityConfigurations type ListAvailabilityConfigurationsPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListAvailabilityConfigurationsPaginator is a paginator for // ListAvailabilityConfigurations type ListAvailabilityConfigurationsPaginator struct { options ListAvailabilityConfigurationsPaginatorOptions client ListAvailabilityConfigurationsAPIClient params *ListAvailabilityConfigurationsInput nextToken *string firstPage bool } // NewListAvailabilityConfigurationsPaginator returns a new // ListAvailabilityConfigurationsPaginator func NewListAvailabilityConfigurationsPaginator(client ListAvailabilityConfigurationsAPIClient, params *ListAvailabilityConfigurationsInput, optFns ...func(*ListAvailabilityConfigurationsPaginatorOptions)) *ListAvailabilityConfigurationsPaginator { if params == nil { params = &ListAvailabilityConfigurationsInput{} } options := ListAvailabilityConfigurationsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListAvailabilityConfigurationsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAvailabilityConfigurationsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAvailabilityConfigurations page. func (p *ListAvailabilityConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAvailabilityConfigurationsOutput, 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.ListAvailabilityConfigurations(ctx, &params, 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_opListAvailabilityConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListAvailabilityConfigurations", } }
232
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns an overview of the members of a group. Users and groups can be members // of a group. func (c *Client) ListGroupMembers(ctx context.Context, params *ListGroupMembersInput, optFns ...func(*Options)) (*ListGroupMembersOutput, error) { if params == nil { params = &ListGroupMembersInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGroupMembers", params, optFns, c.addOperationListGroupMembersMiddlewares) if err != nil { return nil, err } out := result.(*ListGroupMembersOutput) out.ResultMetadata = metadata return out, nil } type ListGroupMembersInput struct { // The identifier for the group to which the members (users or groups) are // associated. // // This member is required. GroupId *string // The identifier for the organization under which the group exists. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string noSmithyDocumentSerde } type ListGroupMembersOutput struct { // The members associated to the group. Members []types.Member // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListGroupMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGroupMembers{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGroupMembers{}, 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 = addOpListGroupMembersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupMembers(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 } // ListGroupMembersAPIClient is a client that implements the ListGroupMembers // operation. type ListGroupMembersAPIClient interface { ListGroupMembers(context.Context, *ListGroupMembersInput, ...func(*Options)) (*ListGroupMembersOutput, error) } var _ ListGroupMembersAPIClient = (*Client)(nil) // ListGroupMembersPaginatorOptions is the paginator options for ListGroupMembers type ListGroupMembersPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListGroupMembersPaginator is a paginator for ListGroupMembers type ListGroupMembersPaginator struct { options ListGroupMembersPaginatorOptions client ListGroupMembersAPIClient params *ListGroupMembersInput nextToken *string firstPage bool } // NewListGroupMembersPaginator returns a new ListGroupMembersPaginator func NewListGroupMembersPaginator(client ListGroupMembersAPIClient, params *ListGroupMembersInput, optFns ...func(*ListGroupMembersPaginatorOptions)) *ListGroupMembersPaginator { if params == nil { params = &ListGroupMembersInput{} } options := ListGroupMembersPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListGroupMembersPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupMembersPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupMembers page. func (p *ListGroupMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupMembersOutput, 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.ListGroupMembers(ctx, &params, 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_opListGroupMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListGroupMembers", } }
234
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns summaries of the organization's groups. func (c *Client) ListGroups(ctx context.Context, params *ListGroupsInput, optFns ...func(*Options)) (*ListGroupsOutput, error) { if params == nil { params = &ListGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGroups", params, optFns, c.addOperationListGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListGroupsInput struct { // The identifier for the organization under which the groups exist. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string noSmithyDocumentSerde } type ListGroupsOutput struct { // The overview of groups for an organization. Groups []types.Group // The token to use to retrieve the next page of results. The value is "null" when // there are no more results to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGroups{}, 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 = addOpListGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(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 } // ListGroupsAPIClient is a client that implements the ListGroups operation. type ListGroupsAPIClient interface { ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) } var _ ListGroupsAPIClient = (*Client)(nil) // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListGroupsPaginator is a paginator for ListGroups type ListGroupsPaginator struct { options ListGroupsPaginatorOptions client ListGroupsAPIClient params *ListGroupsInput nextToken *string firstPage bool } // NewListGroupsPaginator returns a new ListGroupsPaginator func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, optFns ...func(*ListGroupsPaginatorOptions)) *ListGroupsPaginator { if params == nil { params = &ListGroupsInput{} } options := ListGroupsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListGroupsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroups page. func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupsOutput, 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.ListGroups(ctx, &params, 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_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListGroups", } }
226
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all the impersonation roles for the given WorkMail organization. func (c *Client) ListImpersonationRoles(ctx context.Context, params *ListImpersonationRolesInput, optFns ...func(*Options)) (*ListImpersonationRolesOutput, error) { if params == nil { params = &ListImpersonationRolesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListImpersonationRoles", params, optFns, c.addOperationListImpersonationRolesMiddlewares) if err != nil { return nil, err } out := result.(*ListImpersonationRolesOutput) out.ResultMetadata = metadata return out, nil } type ListImpersonationRolesInput struct { // The WorkMail organization to which the listed impersonation roles belong. // // This member is required. OrganizationId *string // The maximum number of results returned in a single call. MaxResults *int32 // The token used to retrieve the next page of results. The first call doesn't // require a token. NextToken *string noSmithyDocumentSerde } type ListImpersonationRolesOutput struct { // The token to retrieve the next page of results. The value is null when there // are no results to return. NextToken *string // The list of impersonation roles under the given WorkMail organization. Roles []types.ImpersonationRole // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListImpersonationRolesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListImpersonationRoles{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListImpersonationRoles{}, 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 = addOpListImpersonationRolesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImpersonationRoles(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 } // ListImpersonationRolesAPIClient is a client that implements the // ListImpersonationRoles operation. type ListImpersonationRolesAPIClient interface { ListImpersonationRoles(context.Context, *ListImpersonationRolesInput, ...func(*Options)) (*ListImpersonationRolesOutput, error) } var _ ListImpersonationRolesAPIClient = (*Client)(nil) // ListImpersonationRolesPaginatorOptions is the paginator options for // ListImpersonationRoles type ListImpersonationRolesPaginatorOptions struct { // The maximum number of results returned in a single call. 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 } // ListImpersonationRolesPaginator is a paginator for ListImpersonationRoles type ListImpersonationRolesPaginator struct { options ListImpersonationRolesPaginatorOptions client ListImpersonationRolesAPIClient params *ListImpersonationRolesInput nextToken *string firstPage bool } // NewListImpersonationRolesPaginator returns a new ListImpersonationRolesPaginator func NewListImpersonationRolesPaginator(client ListImpersonationRolesAPIClient, params *ListImpersonationRolesInput, optFns ...func(*ListImpersonationRolesPaginatorOptions)) *ListImpersonationRolesPaginator { if params == nil { params = &ListImpersonationRolesInput{} } options := ListImpersonationRolesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListImpersonationRolesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImpersonationRolesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImpersonationRoles page. func (p *ListImpersonationRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImpersonationRolesOutput, 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.ListImpersonationRoles(ctx, &params, 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_opListImpersonationRoles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListImpersonationRoles", } }
228
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the mailbox export jobs started for the specified organization within the // last seven days. func (c *Client) ListMailboxExportJobs(ctx context.Context, params *ListMailboxExportJobsInput, optFns ...func(*Options)) (*ListMailboxExportJobsOutput, error) { if params == nil { params = &ListMailboxExportJobsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListMailboxExportJobs", params, optFns, c.addOperationListMailboxExportJobsMiddlewares) if err != nil { return nil, err } out := result.(*ListMailboxExportJobsOutput) out.ResultMetadata = metadata return out, nil } type ListMailboxExportJobsInput struct { // The organization ID. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. NextToken *string noSmithyDocumentSerde } type ListMailboxExportJobsOutput struct { // The mailbox export job details. Jobs []types.MailboxExportJob // The token to use to retrieve the next page of results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListMailboxExportJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListMailboxExportJobs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListMailboxExportJobs{}, 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 = addOpListMailboxExportJobsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMailboxExportJobs(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 } // ListMailboxExportJobsAPIClient is a client that implements the // ListMailboxExportJobs operation. type ListMailboxExportJobsAPIClient interface { ListMailboxExportJobs(context.Context, *ListMailboxExportJobsInput, ...func(*Options)) (*ListMailboxExportJobsOutput, error) } var _ ListMailboxExportJobsAPIClient = (*Client)(nil) // ListMailboxExportJobsPaginatorOptions is the paginator options for // ListMailboxExportJobs type ListMailboxExportJobsPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListMailboxExportJobsPaginator is a paginator for ListMailboxExportJobs type ListMailboxExportJobsPaginator struct { options ListMailboxExportJobsPaginatorOptions client ListMailboxExportJobsAPIClient params *ListMailboxExportJobsInput nextToken *string firstPage bool } // NewListMailboxExportJobsPaginator returns a new ListMailboxExportJobsPaginator func NewListMailboxExportJobsPaginator(client ListMailboxExportJobsAPIClient, params *ListMailboxExportJobsInput, optFns ...func(*ListMailboxExportJobsPaginatorOptions)) *ListMailboxExportJobsPaginator { if params == nil { params = &ListMailboxExportJobsInput{} } options := ListMailboxExportJobsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListMailboxExportJobsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMailboxExportJobsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMailboxExportJobs page. func (p *ListMailboxExportJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMailboxExportJobsOutput, 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.ListMailboxExportJobs(ctx, &params, 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_opListMailboxExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListMailboxExportJobs", } }
227
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the mailbox permissions associated with a user, group, or resource // mailbox. func (c *Client) ListMailboxPermissions(ctx context.Context, params *ListMailboxPermissionsInput, optFns ...func(*Options)) (*ListMailboxPermissionsOutput, error) { if params == nil { params = &ListMailboxPermissionsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListMailboxPermissions", params, optFns, c.addOperationListMailboxPermissionsMiddlewares) if err != nil { return nil, err } out := result.(*ListMailboxPermissionsOutput) out.ResultMetadata = metadata return out, nil } type ListMailboxPermissionsInput struct { // The identifier of the user, group, or resource for which to list mailbox // permissions. // // This member is required. EntityId *string // The identifier of the organization under which the user, group, or resource // exists. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string noSmithyDocumentSerde } type ListMailboxPermissionsOutput struct { // The token to use to retrieve the next page of results. The value is "null" when // there are no more results to return. NextToken *string // One page of the user, group, or resource mailbox permissions. Permissions []types.Permission // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListMailboxPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListMailboxPermissions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListMailboxPermissions{}, 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 = addOpListMailboxPermissionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMailboxPermissions(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 } // ListMailboxPermissionsAPIClient is a client that implements the // ListMailboxPermissions operation. type ListMailboxPermissionsAPIClient interface { ListMailboxPermissions(context.Context, *ListMailboxPermissionsInput, ...func(*Options)) (*ListMailboxPermissionsOutput, error) } var _ ListMailboxPermissionsAPIClient = (*Client)(nil) // ListMailboxPermissionsPaginatorOptions is the paginator options for // ListMailboxPermissions type ListMailboxPermissionsPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListMailboxPermissionsPaginator is a paginator for ListMailboxPermissions type ListMailboxPermissionsPaginator struct { options ListMailboxPermissionsPaginatorOptions client ListMailboxPermissionsAPIClient params *ListMailboxPermissionsInput nextToken *string firstPage bool } // NewListMailboxPermissionsPaginator returns a new ListMailboxPermissionsPaginator func NewListMailboxPermissionsPaginator(client ListMailboxPermissionsAPIClient, params *ListMailboxPermissionsInput, optFns ...func(*ListMailboxPermissionsPaginatorOptions)) *ListMailboxPermissionsPaginator { if params == nil { params = &ListMailboxPermissionsInput{} } options := ListMailboxPermissionsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListMailboxPermissionsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMailboxPermissionsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMailboxPermissions page. func (p *ListMailboxPermissionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMailboxPermissionsOutput, 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.ListMailboxPermissions(ctx, &params, 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_opListMailboxPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListMailboxPermissions", } }
236
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the mail domains in a given WorkMail organization. func (c *Client) ListMailDomains(ctx context.Context, params *ListMailDomainsInput, optFns ...func(*Options)) (*ListMailDomainsOutput, error) { if params == nil { params = &ListMailDomainsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListMailDomains", params, optFns, c.addOperationListMailDomainsMiddlewares) if err != nil { return nil, err } out := result.(*ListMailDomainsOutput) out.ResultMetadata = metadata return out, nil } type ListMailDomainsInput struct { // The WorkMail organization for which to list domains. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // require a token. NextToken *string noSmithyDocumentSerde } type ListMailDomainsOutput struct { // The list of mail domain summaries, specifying domains that exist in the // specified WorkMail organization, along with the information about whether the // domain is or isn't the default. MailDomains []types.MailDomainSummary // The token to use to retrieve the next page of results. The value becomes null // when there are no more results to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListMailDomainsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListMailDomains{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListMailDomains{}, 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 = addOpListMailDomainsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMailDomains(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 } // ListMailDomainsAPIClient is a client that implements the ListMailDomains // operation. type ListMailDomainsAPIClient interface { ListMailDomains(context.Context, *ListMailDomainsInput, ...func(*Options)) (*ListMailDomainsOutput, error) } var _ ListMailDomainsAPIClient = (*Client)(nil) // ListMailDomainsPaginatorOptions is the paginator options for ListMailDomains type ListMailDomainsPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListMailDomainsPaginator is a paginator for ListMailDomains type ListMailDomainsPaginator struct { options ListMailDomainsPaginatorOptions client ListMailDomainsAPIClient params *ListMailDomainsInput nextToken *string firstPage bool } // NewListMailDomainsPaginator returns a new ListMailDomainsPaginator func NewListMailDomainsPaginator(client ListMailDomainsAPIClient, params *ListMailDomainsInput, optFns ...func(*ListMailDomainsPaginatorOptions)) *ListMailDomainsPaginator { if params == nil { params = &ListMailDomainsInput{} } options := ListMailDomainsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListMailDomainsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMailDomainsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMailDomains page. func (p *ListMailDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMailDomainsOutput, 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.ListMailDomains(ctx, &params, 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_opListMailDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListMailDomains", } }
229
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the mobile device access rules for the specified WorkMail organization. func (c *Client) ListMobileDeviceAccessRules(ctx context.Context, params *ListMobileDeviceAccessRulesInput, optFns ...func(*Options)) (*ListMobileDeviceAccessRulesOutput, error) { if params == nil { params = &ListMobileDeviceAccessRulesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListMobileDeviceAccessRules", params, optFns, c.addOperationListMobileDeviceAccessRulesMiddlewares) if err != nil { return nil, err } out := result.(*ListMobileDeviceAccessRulesOutput) out.ResultMetadata = metadata return out, nil } type ListMobileDeviceAccessRulesInput struct { // The WorkMail organization for which to list the rules. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type ListMobileDeviceAccessRulesOutput struct { // The list of mobile device access rules that exist under the specified WorkMail // organization. Rules []types.MobileDeviceAccessRule // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListMobileDeviceAccessRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListMobileDeviceAccessRules{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListMobileDeviceAccessRules{}, 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 = addOpListMobileDeviceAccessRulesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMobileDeviceAccessRules(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_opListMobileDeviceAccessRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListMobileDeviceAccessRules", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns summaries of the customer's organizations. func (c *Client) ListOrganizations(ctx context.Context, params *ListOrganizationsInput, optFns ...func(*Options)) (*ListOrganizationsOutput, error) { if params == nil { params = &ListOrganizationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListOrganizations", params, optFns, c.addOperationListOrganizationsMiddlewares) if err != nil { return nil, err } out := result.(*ListOrganizationsOutput) out.ResultMetadata = metadata return out, nil } type ListOrganizationsInput struct { // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string noSmithyDocumentSerde } type ListOrganizationsOutput struct { // The token to use to retrieve the next page of results. The value is "null" when // there are no more results to return. NextToken *string // The overview of owned organizations presented as a list of organization // summaries. OrganizationSummaries []types.OrganizationSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListOrganizationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOrganizations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOrganizations{}, 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_opListOrganizations(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 } // ListOrganizationsAPIClient is a client that implements the ListOrganizations // operation. type ListOrganizationsAPIClient interface { ListOrganizations(context.Context, *ListOrganizationsInput, ...func(*Options)) (*ListOrganizationsOutput, error) } var _ ListOrganizationsAPIClient = (*Client)(nil) // ListOrganizationsPaginatorOptions is the paginator options for ListOrganizations type ListOrganizationsPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListOrganizationsPaginator is a paginator for ListOrganizations type ListOrganizationsPaginator struct { options ListOrganizationsPaginatorOptions client ListOrganizationsAPIClient params *ListOrganizationsInput nextToken *string firstPage bool } // NewListOrganizationsPaginator returns a new ListOrganizationsPaginator func NewListOrganizationsPaginator(client ListOrganizationsAPIClient, params *ListOrganizationsInput, optFns ...func(*ListOrganizationsPaginatorOptions)) *ListOrganizationsPaginator { if params == nil { params = &ListOrganizationsInput{} } options := ListOrganizationsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListOrganizationsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizations page. func (p *ListOrganizationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOrganizationsOutput, 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.ListOrganizations(ctx, &params, 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_opListOrganizations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListOrganizations", } }
220
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the delegates associated with a resource. Users and groups can be // resource delegates and answer requests on behalf of the resource. func (c *Client) ListResourceDelegates(ctx context.Context, params *ListResourceDelegatesInput, optFns ...func(*Options)) (*ListResourceDelegatesOutput, error) { if params == nil { params = &ListResourceDelegatesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListResourceDelegates", params, optFns, c.addOperationListResourceDelegatesMiddlewares) if err != nil { return nil, err } out := result.(*ListResourceDelegatesOutput) out.ResultMetadata = metadata return out, nil } type ListResourceDelegatesInput struct { // The identifier for the organization that contains the resource for which // delegates are listed. // // This member is required. OrganizationId *string // The identifier for the resource whose delegates are listed. // // This member is required. ResourceId *string // The number of maximum results in a page. MaxResults *int32 // The token used to paginate through the delegates associated with a resource. NextToken *string noSmithyDocumentSerde } type ListResourceDelegatesOutput struct { // One page of the resource's delegates. Delegates []types.Delegate // The token used to paginate through the delegates associated with a resource. // While results are still available, it has an associated value. When the last // page is reached, the token is empty. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListResourceDelegatesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResourceDelegates{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResourceDelegates{}, 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 = addOpListResourceDelegatesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceDelegates(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 } // ListResourceDelegatesAPIClient is a client that implements the // ListResourceDelegates operation. type ListResourceDelegatesAPIClient interface { ListResourceDelegates(context.Context, *ListResourceDelegatesInput, ...func(*Options)) (*ListResourceDelegatesOutput, error) } var _ ListResourceDelegatesAPIClient = (*Client)(nil) // ListResourceDelegatesPaginatorOptions is the paginator options for // ListResourceDelegates type ListResourceDelegatesPaginatorOptions struct { // The number of maximum results in a page. 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 } // ListResourceDelegatesPaginator is a paginator for ListResourceDelegates type ListResourceDelegatesPaginator struct { options ListResourceDelegatesPaginatorOptions client ListResourceDelegatesAPIClient params *ListResourceDelegatesInput nextToken *string firstPage bool } // NewListResourceDelegatesPaginator returns a new ListResourceDelegatesPaginator func NewListResourceDelegatesPaginator(client ListResourceDelegatesAPIClient, params *ListResourceDelegatesInput, optFns ...func(*ListResourceDelegatesPaginatorOptions)) *ListResourceDelegatesPaginator { if params == nil { params = &ListResourceDelegatesInput{} } options := ListResourceDelegatesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListResourceDelegatesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceDelegatesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceDelegates page. func (p *ListResourceDelegatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceDelegatesOutput, 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.ListResourceDelegates(ctx, &params, 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_opListResourceDelegates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListResourceDelegates", } }
235
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns summaries of the organization's resources. func (c *Client) ListResources(ctx context.Context, params *ListResourcesInput, optFns ...func(*Options)) (*ListResourcesOutput, error) { if params == nil { params = &ListResourcesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListResources", params, optFns, c.addOperationListResourcesMiddlewares) if err != nil { return nil, err } out := result.(*ListResourcesOutput) out.ResultMetadata = metadata return out, nil } type ListResourcesInput struct { // The identifier for the organization under which the resources exist. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string noSmithyDocumentSerde } type ListResourcesOutput struct { // The token used to paginate through all the organization's resources. While // results are still available, it has an associated value. When the last page is // reached, the token is empty. NextToken *string // One page of the organization's resource representation. Resources []types.Resource // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResources{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResources{}, 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 = addOpListResourcesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResources(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 } // ListResourcesAPIClient is a client that implements the ListResources operation. type ListResourcesAPIClient interface { ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) } var _ ListResourcesAPIClient = (*Client)(nil) // ListResourcesPaginatorOptions is the paginator options for ListResources type ListResourcesPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListResourcesPaginator is a paginator for ListResources type ListResourcesPaginator struct { options ListResourcesPaginatorOptions client ListResourcesAPIClient params *ListResourcesInput nextToken *string firstPage bool } // NewListResourcesPaginator returns a new ListResourcesPaginator func NewListResourcesPaginator(client ListResourcesAPIClient, params *ListResourcesInput, optFns ...func(*ListResourcesPaginatorOptions)) *ListResourcesPaginator { if params == nil { params = &ListResourcesInput{} } options := ListResourcesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListResourcesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourcesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResources page. func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourcesOutput, 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.ListResources(ctx, &params, 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_opListResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListResources", } }
227
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the tags applied to an WorkMail organization resource. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The resource ARN. // // This member is required. ResourceARN *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // A list of tag key-value pairs. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, 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 = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(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_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListTagsForResource", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns summaries of the organization's users. func (c *Client) ListUsers(ctx context.Context, params *ListUsersInput, optFns ...func(*Options)) (*ListUsersOutput, error) { if params == nil { params = &ListUsersInput{} } result, metadata, err := c.invokeOperation(ctx, "ListUsers", params, optFns, c.addOperationListUsersMiddlewares) if err != nil { return nil, err } out := result.(*ListUsersOutput) out.ResultMetadata = metadata return out, nil } type ListUsersInput struct { // The identifier for the organization under which the users exist. // // This member is required. OrganizationId *string // The maximum number of results to return in a single call. MaxResults *int32 // The token to use to retrieve the next page of results. The first call does not // contain any tokens. NextToken *string noSmithyDocumentSerde } type ListUsersOutput struct { // The token to use to retrieve the next page of results. This value is `null` // when there are no more results to return. NextToken *string // The overview of users for an organization. Users []types.User // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListUsers{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListUsers{}, 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 = addOpListUsersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(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 } // ListUsersAPIClient is a client that implements the ListUsers operation. type ListUsersAPIClient interface { ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) } var _ ListUsersAPIClient = (*Client)(nil) // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results to return in a single call. 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 } // ListUsersPaginator is a paginator for ListUsers type ListUsersPaginator struct { options ListUsersPaginatorOptions client ListUsersAPIClient params *ListUsersInput nextToken *string firstPage bool } // NewListUsersPaginator returns a new ListUsersPaginator func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, optFns ...func(*ListUsersPaginatorOptions)) *ListUsersPaginator { if params == nil { params = &ListUsersInput{} } options := ListUsersPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListUsersPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUsersOutput, 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.ListUsers(ctx, &params, 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_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ListUsers", } }
226
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds a new access control rule for the specified organization. The rule allows // or denies access to the organization for the specified IPv4 addresses, access // protocol actions, user IDs and impersonation IDs. Adding a new rule with the // same name as an existing rule replaces the older rule. func (c *Client) PutAccessControlRule(ctx context.Context, params *PutAccessControlRuleInput, optFns ...func(*Options)) (*PutAccessControlRuleOutput, error) { if params == nil { params = &PutAccessControlRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "PutAccessControlRule", params, optFns, c.addOperationPutAccessControlRuleMiddlewares) if err != nil { return nil, err } out := result.(*PutAccessControlRuleOutput) out.ResultMetadata = metadata return out, nil } type PutAccessControlRuleInput struct { // The rule description. // // This member is required. Description *string // The rule effect. // // This member is required. Effect types.AccessControlRuleEffect // The rule name. // // This member is required. Name *string // The identifier of the organization. // // This member is required. OrganizationId *string // Access protocol actions to include in the rule. Valid values include ActiveSync // , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail . Actions []string // Impersonation role IDs to include in the rule. ImpersonationRoleIds []string // IPv4 CIDR ranges to include in the rule. IpRanges []string // Access protocol actions to exclude from the rule. Valid values include // ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail . NotActions []string // Impersonation role IDs to exclude from the rule. NotImpersonationRoleIds []string // IPv4 CIDR ranges to exclude from the rule. NotIpRanges []string // User IDs to exclude from the rule. NotUserIds []string // User IDs to include in the rule. UserIds []string noSmithyDocumentSerde } type PutAccessControlRuleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutAccessControlRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutAccessControlRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutAccessControlRule{}, 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 = addOpPutAccessControlRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccessControlRule(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_opPutAccessControlRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "PutAccessControlRule", } }
165
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 or updates the email monitoring configuration for a specified // organization. func (c *Client) PutEmailMonitoringConfiguration(ctx context.Context, params *PutEmailMonitoringConfigurationInput, optFns ...func(*Options)) (*PutEmailMonitoringConfigurationOutput, error) { if params == nil { params = &PutEmailMonitoringConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "PutEmailMonitoringConfiguration", params, optFns, c.addOperationPutEmailMonitoringConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*PutEmailMonitoringConfigurationOutput) out.ResultMetadata = metadata return out, nil } type PutEmailMonitoringConfigurationInput struct { // The Amazon Resource Name (ARN) of the CloudWatch Log group associated with the // email monitoring configuration. // // This member is required. LogGroupArn *string // The ID of the organization for which the email monitoring configuration is set. // // This member is required. OrganizationId *string // The Amazon Resource Name (ARN) of the IAM Role associated with the email // monitoring configuration. // // This member is required. RoleArn *string noSmithyDocumentSerde } type PutEmailMonitoringConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutEmailMonitoringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutEmailMonitoringConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration{}, 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 = addOpPutEmailMonitoringConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutEmailMonitoringConfiguration(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_opPutEmailMonitoringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "PutEmailMonitoringConfiguration", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 a DMARC policy for a given organization. func (c *Client) PutInboundDmarcSettings(ctx context.Context, params *PutInboundDmarcSettingsInput, optFns ...func(*Options)) (*PutInboundDmarcSettingsOutput, error) { if params == nil { params = &PutInboundDmarcSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "PutInboundDmarcSettings", params, optFns, c.addOperationPutInboundDmarcSettingsMiddlewares) if err != nil { return nil, err } out := result.(*PutInboundDmarcSettingsOutput) out.ResultMetadata = metadata return out, nil } type PutInboundDmarcSettingsInput struct { // Enforces or suspends a policy after it's applied. // // This member is required. Enforced *bool // The ID of the organization that you are applying the DMARC policy to. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type PutInboundDmarcSettingsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutInboundDmarcSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutInboundDmarcSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutInboundDmarcSettings{}, 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 = addOpPutInboundDmarcSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutInboundDmarcSettings(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_opPutInboundDmarcSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "PutInboundDmarcSettings", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sets permissions for a user, group, or resource. This replaces any pre-existing // permissions. func (c *Client) PutMailboxPermissions(ctx context.Context, params *PutMailboxPermissionsInput, optFns ...func(*Options)) (*PutMailboxPermissionsOutput, error) { if params == nil { params = &PutMailboxPermissionsInput{} } result, metadata, err := c.invokeOperation(ctx, "PutMailboxPermissions", params, optFns, c.addOperationPutMailboxPermissionsMiddlewares) if err != nil { return nil, err } out := result.(*PutMailboxPermissionsOutput) out.ResultMetadata = metadata return out, nil } type PutMailboxPermissionsInput struct { // The identifier of the user, group, or resource for which to update mailbox // permissions. // // This member is required. EntityId *string // The identifier of the user, group, or resource to which to grant the // permissions. // // This member is required. GranteeId *string // The identifier of the organization under which the user, group, or resource // exists. // // This member is required. OrganizationId *string // The permissions granted to the grantee. SEND_AS allows the grantee to send // email as the owner of the mailbox (the grantee is not mentioned on these // emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner // of the mailbox (the grantee is not mentioned as the physical sender of these // emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective // of other folder-level permissions set on the mailbox. // // This member is required. PermissionValues []types.PermissionType noSmithyDocumentSerde } type PutMailboxPermissionsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutMailboxPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutMailboxPermissions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutMailboxPermissions{}, 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 = addOpPutMailboxPermissionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutMailboxPermissions(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_opPutMailboxPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "PutMailboxPermissions", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates or updates a mobile device access override for the given WorkMail // organization, user, and device. func (c *Client) PutMobileDeviceAccessOverride(ctx context.Context, params *PutMobileDeviceAccessOverrideInput, optFns ...func(*Options)) (*PutMobileDeviceAccessOverrideOutput, error) { if params == nil { params = &PutMobileDeviceAccessOverrideInput{} } result, metadata, err := c.invokeOperation(ctx, "PutMobileDeviceAccessOverride", params, optFns, c.addOperationPutMobileDeviceAccessOverrideMiddlewares) if err != nil { return nil, err } out := result.(*PutMobileDeviceAccessOverrideOutput) out.ResultMetadata = metadata return out, nil } type PutMobileDeviceAccessOverrideInput struct { // The mobile device for which you create the override. DeviceId is case // insensitive. // // This member is required. DeviceId *string // The effect of the override, ALLOW or DENY . // // This member is required. Effect types.MobileDeviceAccessRuleEffect // Identifies the WorkMail organization for which you create the override. // // This member is required. OrganizationId *string // The WorkMail user for which you create the override. Accepts the following // types of user identities: // - User ID: 12345678-1234-1234-1234-123456789012 or // S-1-1-12-1234567890-123456789-123456789-1234 // - Email address: [email protected] // - User name: user // // This member is required. UserId *string // A description of the override. Description *string noSmithyDocumentSerde } type PutMobileDeviceAccessOverrideOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutMobileDeviceAccessOverrideMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutMobileDeviceAccessOverride{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutMobileDeviceAccessOverride{}, 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 = addOpPutMobileDeviceAccessOverrideValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutMobileDeviceAccessOverride(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_opPutMobileDeviceAccessOverride(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "PutMobileDeviceAccessOverride", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Puts a retention policy to the specified organization. func (c *Client) PutRetentionPolicy(ctx context.Context, params *PutRetentionPolicyInput, optFns ...func(*Options)) (*PutRetentionPolicyOutput, error) { if params == nil { params = &PutRetentionPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "PutRetentionPolicy", params, optFns, c.addOperationPutRetentionPolicyMiddlewares) if err != nil { return nil, err } out := result.(*PutRetentionPolicyOutput) out.ResultMetadata = metadata return out, nil } type PutRetentionPolicyInput struct { // The retention policy folder configurations. // // This member is required. FolderConfigurations []types.FolderConfiguration // The retention policy name. // // This member is required. Name *string // The organization ID. // // This member is required. OrganizationId *string // The retention policy description. Description *string // The retention policy ID. Id *string noSmithyDocumentSerde } type PutRetentionPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutRetentionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutRetentionPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutRetentionPolicy{}, 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 = addOpPutRetentionPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRetentionPolicy(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_opPutRetentionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "PutRetentionPolicy", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Registers a new domain in WorkMail and SES, and configures it for use by // WorkMail. Emails received by SES for this domain are routed to the specified // WorkMail organization, and WorkMail has permanent permission to use the // specified domain for sending your users' emails. func (c *Client) RegisterMailDomain(ctx context.Context, params *RegisterMailDomainInput, optFns ...func(*Options)) (*RegisterMailDomainOutput, error) { if params == nil { params = &RegisterMailDomainInput{} } result, metadata, err := c.invokeOperation(ctx, "RegisterMailDomain", params, optFns, c.addOperationRegisterMailDomainMiddlewares) if err != nil { return nil, err } out := result.(*RegisterMailDomainOutput) out.ResultMetadata = metadata return out, nil } type RegisterMailDomainInput struct { // The name of the mail domain to create in WorkMail and SES. // // This member is required. DomainName *string // The WorkMail organization under which you're creating the domain. // // This member is required. OrganizationId *string // Idempotency token used when retrying requests. ClientToken *string noSmithyDocumentSerde } type RegisterMailDomainOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRegisterMailDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterMailDomain{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterMailDomain{}, 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 = addIdempotencyToken_opRegisterMailDomainMiddleware(stack, options); err != nil { return err } if err = addOpRegisterMailDomainValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterMailDomain(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 } type idempotencyToken_initializeOpRegisterMailDomain struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpRegisterMailDomain) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpRegisterMailDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*RegisterMailDomainInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *RegisterMailDomainInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opRegisterMailDomainMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpRegisterMailDomain{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opRegisterMailDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "RegisterMailDomain", } }
168
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Registers an existing and disabled user, group, or resource for WorkMail use by // associating a mailbox and calendaring capabilities. It performs no change if the // user, group, or resource is enabled and fails if the user, group, or resource is // deleted. This operation results in the accumulation of costs. For more // information, see Pricing (https://aws.amazon.com/workmail/pricing) . The // equivalent console functionality for this operation is Enable. Users can either // be created by calling the CreateUser API operation or they can be synchronized // from your directory. For more information, see DeregisterFromWorkMail . func (c *Client) RegisterToWorkMail(ctx context.Context, params *RegisterToWorkMailInput, optFns ...func(*Options)) (*RegisterToWorkMailOutput, error) { if params == nil { params = &RegisterToWorkMailInput{} } result, metadata, err := c.invokeOperation(ctx, "RegisterToWorkMail", params, optFns, c.addOperationRegisterToWorkMailMiddlewares) if err != nil { return nil, err } out := result.(*RegisterToWorkMailOutput) out.ResultMetadata = metadata return out, nil } type RegisterToWorkMailInput struct { // The email for the user, group, or resource to be updated. // // This member is required. Email *string // The identifier for the user, group, or resource to be updated. // // This member is required. EntityId *string // The identifier for the organization under which the user, group, or resource // exists. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type RegisterToWorkMailOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRegisterToWorkMailMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterToWorkMail{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterToWorkMail{}, 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 = addOpRegisterToWorkMailValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterToWorkMail(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_opRegisterToWorkMail(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "RegisterToWorkMail", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Allows the administrator to reset the password for a user. func (c *Client) ResetPassword(ctx context.Context, params *ResetPasswordInput, optFns ...func(*Options)) (*ResetPasswordOutput, error) { if params == nil { params = &ResetPasswordInput{} } result, metadata, err := c.invokeOperation(ctx, "ResetPassword", params, optFns, c.addOperationResetPasswordMiddlewares) if err != nil { return nil, err } out := result.(*ResetPasswordOutput) out.ResultMetadata = metadata return out, nil } type ResetPasswordInput struct { // The identifier of the organization that contains the user for which the // password is reset. // // This member is required. OrganizationId *string // The new password for the user. // // This member is required. Password *string // The identifier of the user for whom the password is reset. // // This member is required. UserId *string noSmithyDocumentSerde } type ResetPasswordOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationResetPasswordMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpResetPassword{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpResetPassword{}, 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 = addOpResetPasswordValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetPassword(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_opResetPassword(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "ResetPassword", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Starts a mailbox export job to export MIME-format email messages and calendar // items from the specified mailbox to the specified Amazon Simple Storage Service // (Amazon S3) bucket. For more information, see Exporting mailbox content (https://docs.aws.amazon.com/workmail/latest/adminguide/mail-export.html) // in the WorkMail Administrator Guide. func (c *Client) StartMailboxExportJob(ctx context.Context, params *StartMailboxExportJobInput, optFns ...func(*Options)) (*StartMailboxExportJobOutput, error) { if params == nil { params = &StartMailboxExportJobInput{} } result, metadata, err := c.invokeOperation(ctx, "StartMailboxExportJob", params, optFns, c.addOperationStartMailboxExportJobMiddlewares) if err != nil { return nil, err } out := result.(*StartMailboxExportJobOutput) out.ResultMetadata = metadata return out, nil } type StartMailboxExportJobInput struct { // The idempotency token for the client request. // // This member is required. ClientToken *string // The identifier of the user or resource associated with the mailbox. // // This member is required. EntityId *string // The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS // KMS) key that encrypts the exported mailbox content. // // This member is required. KmsKeyArn *string // The identifier associated with the organization. // // This member is required. OrganizationId *string // The ARN of the AWS Identity and Access Management (IAM) role that grants write // permission to the S3 bucket. // // This member is required. RoleArn *string // The name of the S3 bucket. // // This member is required. S3BucketName *string // The S3 bucket prefix. // // This member is required. S3Prefix *string // The mailbox export job description. Description *string noSmithyDocumentSerde } type StartMailboxExportJobOutput struct { // The job ID. JobId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStartMailboxExportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartMailboxExportJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartMailboxExportJob{}, 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 = addIdempotencyToken_opStartMailboxExportJobMiddleware(stack, options); err != nil { return err } if err = addOpStartMailboxExportJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartMailboxExportJob(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 } type idempotencyToken_initializeOpStartMailboxExportJob struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpStartMailboxExportJob) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpStartMailboxExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*StartMailboxExportJobInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *StartMailboxExportJobInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opStartMailboxExportJobMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpStartMailboxExportJob{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opStartMailboxExportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "StartMailboxExportJob", } }
199
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Applies the specified tags to the specified WorkMailorganization resource. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The resource ARN. // // This member is required. ResourceARN *string // The tag key-value pairs. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, 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 = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(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_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "TagResource", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Performs a test on an availability provider to ensure that access is allowed. // For EWS, it verifies the provided credentials can be used to successfully log // in. For Lambda, it verifies that the Lambda function can be invoked and that the // resource access policy was configured to deny anonymous access. An anonymous // invocation is one done without providing either a SourceArn or SourceAccount // header. The request must contain either one provider definition ( EwsProvider // or LambdaProvider ) or the DomainName parameter. If the DomainName parameter is // provided, the configuration stored under the DomainName will be tested. func (c *Client) TestAvailabilityConfiguration(ctx context.Context, params *TestAvailabilityConfigurationInput, optFns ...func(*Options)) (*TestAvailabilityConfigurationOutput, error) { if params == nil { params = &TestAvailabilityConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "TestAvailabilityConfiguration", params, optFns, c.addOperationTestAvailabilityConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*TestAvailabilityConfigurationOutput) out.ResultMetadata = metadata return out, nil } type TestAvailabilityConfigurationInput struct { // The WorkMail organization where the availability provider will be tested. // // This member is required. OrganizationId *string // The domain to which the provider applies. If this field is provided, a stored // availability provider associated to this domain name will be tested. DomainName *string // Describes an EWS based availability provider. This is only used as input to the // service. EwsProvider *types.EwsAvailabilityProvider // Describes a Lambda based availability provider. LambdaProvider *types.LambdaAvailabilityProvider noSmithyDocumentSerde } type TestAvailabilityConfigurationOutput struct { // String containing the reason for a failed test if TestPassed is false. FailureReason *string // Boolean indicating whether the test passed or failed. TestPassed bool // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTestAvailabilityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpTestAvailabilityConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTestAvailabilityConfiguration{}, 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 = addOpTestAvailabilityConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestAvailabilityConfiguration(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_opTestAvailabilityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "TestAvailabilityConfiguration", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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" ) // Untags the specified tags from the specified WorkMail organization resource. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The resource ARN. // // This member is required. ResourceARN *string // The tag keys. // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, 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 = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(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_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UntagResource", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an existing AvailabilityConfiguration for the given WorkMail // organization and domain. func (c *Client) UpdateAvailabilityConfiguration(ctx context.Context, params *UpdateAvailabilityConfigurationInput, optFns ...func(*Options)) (*UpdateAvailabilityConfigurationOutput, error) { if params == nil { params = &UpdateAvailabilityConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateAvailabilityConfiguration", params, optFns, c.addOperationUpdateAvailabilityConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateAvailabilityConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateAvailabilityConfigurationInput struct { // The domain to which the provider applies the availability configuration. // // This member is required. DomainName *string // The WorkMail organization for which the AvailabilityConfiguration will be // updated. // // This member is required. OrganizationId *string // The EWS availability provider definition. The request must contain exactly one // provider definition, either EwsProvider or LambdaProvider . The previously // stored provider will be overridden by the one provided. EwsProvider *types.EwsAvailabilityProvider // The Lambda availability provider definition. The request must contain exactly // one provider definition, either EwsProvider or LambdaProvider . The previously // stored provider will be overridden by the one provided. LambdaProvider *types.LambdaAvailabilityProvider noSmithyDocumentSerde } type UpdateAvailabilityConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateAvailabilityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAvailabilityConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAvailabilityConfiguration{}, 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 = addOpUpdateAvailabilityConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAvailabilityConfiguration(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_opUpdateAvailabilityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UpdateAvailabilityConfiguration", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 the default mail domain for an organization. The default mail domain is // used by the WorkMail AWS Console to suggest an email address when enabling a // mail user. You can only have one default domain. func (c *Client) UpdateDefaultMailDomain(ctx context.Context, params *UpdateDefaultMailDomainInput, optFns ...func(*Options)) (*UpdateDefaultMailDomainOutput, error) { if params == nil { params = &UpdateDefaultMailDomainInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateDefaultMailDomain", params, optFns, c.addOperationUpdateDefaultMailDomainMiddlewares) if err != nil { return nil, err } out := result.(*UpdateDefaultMailDomainOutput) out.ResultMetadata = metadata return out, nil } type UpdateDefaultMailDomainInput struct { // The domain name that will become the default domain. // // This member is required. DomainName *string // The WorkMail organization for which to list domains. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type UpdateDefaultMailDomainOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateDefaultMailDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateDefaultMailDomain{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateDefaultMailDomain{}, 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 = addOpUpdateDefaultMailDomainValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDefaultMailDomain(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_opUpdateDefaultMailDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UpdateDefaultMailDomain", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an impersonation role for the given WorkMail organization. func (c *Client) UpdateImpersonationRole(ctx context.Context, params *UpdateImpersonationRoleInput, optFns ...func(*Options)) (*UpdateImpersonationRoleOutput, error) { if params == nil { params = &UpdateImpersonationRoleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateImpersonationRole", params, optFns, c.addOperationUpdateImpersonationRoleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateImpersonationRoleOutput) out.ResultMetadata = metadata return out, nil } type UpdateImpersonationRoleInput struct { // The ID of the impersonation role to update. // // This member is required. ImpersonationRoleId *string // The updated impersonation role name. // // This member is required. Name *string // The WorkMail organization that contains the impersonation role to update. // // This member is required. OrganizationId *string // The updated list of rules. // // This member is required. Rules []types.ImpersonationRule // The updated impersonation role type. // // This member is required. Type types.ImpersonationRoleType // The updated impersonation role description. Description *string noSmithyDocumentSerde } type UpdateImpersonationRoleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateImpersonationRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateImpersonationRole{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateImpersonationRole{}, 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 = addOpUpdateImpersonationRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateImpersonationRole(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_opUpdateImpersonationRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UpdateImpersonationRole", } }
144
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 a user's current mailbox quota for a specified organization and user. func (c *Client) UpdateMailboxQuota(ctx context.Context, params *UpdateMailboxQuotaInput, optFns ...func(*Options)) (*UpdateMailboxQuotaOutput, error) { if params == nil { params = &UpdateMailboxQuotaInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateMailboxQuota", params, optFns, c.addOperationUpdateMailboxQuotaMiddlewares) if err != nil { return nil, err } out := result.(*UpdateMailboxQuotaOutput) out.ResultMetadata = metadata return out, nil } type UpdateMailboxQuotaInput struct { // The updated mailbox quota, in MB, for the specified user. // // This member is required. MailboxQuota *int32 // The identifier for the organization that contains the user for whom to update // the mailbox quota. // // This member is required. OrganizationId *string // The identifer for the user for whom to update the mailbox quota. // // This member is required. UserId *string noSmithyDocumentSerde } type UpdateMailboxQuotaOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateMailboxQuotaMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMailboxQuota{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMailboxQuota{}, 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 = addOpUpdateMailboxQuotaValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMailboxQuota(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_opUpdateMailboxQuota(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UpdateMailboxQuota", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates a mobile device access rule for the specified WorkMail organization. func (c *Client) UpdateMobileDeviceAccessRule(ctx context.Context, params *UpdateMobileDeviceAccessRuleInput, optFns ...func(*Options)) (*UpdateMobileDeviceAccessRuleOutput, error) { if params == nil { params = &UpdateMobileDeviceAccessRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateMobileDeviceAccessRule", params, optFns, c.addOperationUpdateMobileDeviceAccessRuleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateMobileDeviceAccessRuleOutput) out.ResultMetadata = metadata return out, nil } type UpdateMobileDeviceAccessRuleInput struct { // The effect of the rule when it matches. Allowed values are ALLOW or DENY . // // This member is required. Effect types.MobileDeviceAccessRuleEffect // The identifier of the rule to be updated. // // This member is required. MobileDeviceAccessRuleId *string // The updated rule name. // // This member is required. Name *string // The WorkMail organization under which the rule will be updated. // // This member is required. OrganizationId *string // The updated rule description. Description *string // Device models that the updated rule will match. DeviceModels []string // Device operating systems that the updated rule will match. DeviceOperatingSystems []string // Device types that the updated rule will match. DeviceTypes []string // User agents that the updated rule will match. DeviceUserAgents []string // Device models that the updated rule will not match. All other device models // will match. NotDeviceModels []string // Device operating systems that the updated rule will not match. All other device // operating systems will match. NotDeviceOperatingSystems []string // Device types that the updated rule will not match. All other device types will // match. NotDeviceTypes []string // User agents that the updated rule will not match. All other user agents will // match. NotDeviceUserAgents []string noSmithyDocumentSerde } type UpdateMobileDeviceAccessRuleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateMobileDeviceAccessRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMobileDeviceAccessRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMobileDeviceAccessRule{}, 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 = addOpUpdateMobileDeviceAccessRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMobileDeviceAccessRule(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_opUpdateMobileDeviceAccessRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UpdateMobileDeviceAccessRule", } }
167
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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 the primary email for a user, group, or resource. The current email is // moved into the list of aliases (or swapped between an existing alias and the // current primary email), and the email provided in the input is promoted as the // primary. func (c *Client) UpdatePrimaryEmailAddress(ctx context.Context, params *UpdatePrimaryEmailAddressInput, optFns ...func(*Options)) (*UpdatePrimaryEmailAddressOutput, error) { if params == nil { params = &UpdatePrimaryEmailAddressInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdatePrimaryEmailAddress", params, optFns, c.addOperationUpdatePrimaryEmailAddressMiddlewares) if err != nil { return nil, err } out := result.(*UpdatePrimaryEmailAddressOutput) out.ResultMetadata = metadata return out, nil } type UpdatePrimaryEmailAddressInput struct { // The value of the email to be updated as primary. // // This member is required. Email *string // The user, group, or resource to update. // // This member is required. EntityId *string // The organization that contains the user, group, or resource to update. // // This member is required. OrganizationId *string noSmithyDocumentSerde } type UpdatePrimaryEmailAddressOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdatePrimaryEmailAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdatePrimaryEmailAddress{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdatePrimaryEmailAddress{}, 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 = addOpUpdatePrimaryEmailAddressValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePrimaryEmailAddress(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_opUpdatePrimaryEmailAddress(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UpdatePrimaryEmailAddress", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates data for the resource. To have the latest information, it must be // preceded by a DescribeResource call. The dataset in the request should be the // one expected when performing another DescribeResource call. func (c *Client) UpdateResource(ctx context.Context, params *UpdateResourceInput, optFns ...func(*Options)) (*UpdateResourceOutput, error) { if params == nil { params = &UpdateResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateResource", params, optFns, c.addOperationUpdateResourceMiddlewares) if err != nil { return nil, err } out := result.(*UpdateResourceOutput) out.ResultMetadata = metadata return out, nil } type UpdateResourceInput struct { // The identifier associated with the organization for which the resource is // updated. // // This member is required. OrganizationId *string // The identifier of the resource to be updated. // // This member is required. ResourceId *string // The resource's booking options to be updated. BookingOptions *types.BookingOptions // The name of the resource to be updated. Name *string noSmithyDocumentSerde } type UpdateResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateResource{}, 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 = addOpUpdateResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateResource(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_opUpdateResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmail", OperationName: "UpdateResource", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/workmail/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "math" "strings" ) type awsAwsjson11_deserializeOpAssociateDelegateToResource struct { } func (*awsAwsjson11_deserializeOpAssociateDelegateToResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAssociateDelegateToResource) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorAssociateDelegateToResource(response, &metadata) } output := &AssociateDelegateToResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAssociateDelegateToResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAssociateDelegateToResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAssociateMemberToGroup struct { } func (*awsAwsjson11_deserializeOpAssociateMemberToGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAssociateMemberToGroup) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorAssociateMemberToGroup(response, &metadata) } output := &AssociateMemberToGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAssociateMemberToGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAssociateMemberToGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAssumeImpersonationRole struct { } func (*awsAwsjson11_deserializeOpAssumeImpersonationRole) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAssumeImpersonationRole) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorAssumeImpersonationRole(response, &metadata) } output := &AssumeImpersonationRoleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAssumeImpersonationRoleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAssumeImpersonationRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCancelMailboxExportJob struct { } func (*awsAwsjson11_deserializeOpCancelMailboxExportJob) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCancelMailboxExportJob) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCancelMailboxExportJob(response, &metadata) } output := &CancelMailboxExportJobOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCancelMailboxExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCancelMailboxExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateAlias struct { } func (*awsAwsjson11_deserializeOpCreateAlias) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateAlias) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateAlias(response, &metadata) } output := &CreateAliasOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EmailAddressInUseException", errorCode): return awsAwsjson11_deserializeErrorEmailAddressInUseException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("MailDomainNotFoundException", errorCode): return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) case strings.EqualFold("MailDomainStateException", errorCode): return awsAwsjson11_deserializeErrorMailDomainStateException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateAvailabilityConfiguration struct { } func (*awsAwsjson11_deserializeOpCreateAvailabilityConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateAvailabilityConfiguration) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateAvailabilityConfiguration(response, &metadata) } output := &CreateAvailabilityConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateAvailabilityConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateAvailabilityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("NameAvailabilityException", errorCode): return awsAwsjson11_deserializeErrorNameAvailabilityException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateGroup struct { } func (*awsAwsjson11_deserializeOpCreateGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateGroup) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateGroup(response, &metadata) } output := &CreateGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("NameAvailabilityException", errorCode): return awsAwsjson11_deserializeErrorNameAvailabilityException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ReservedNameException", errorCode): return awsAwsjson11_deserializeErrorReservedNameException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateImpersonationRole struct { } func (*awsAwsjson11_deserializeOpCreateImpersonationRole) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateImpersonationRole) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateImpersonationRole(response, &metadata) } output := &CreateImpersonationRoleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateImpersonationRoleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateImpersonationRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateMobileDeviceAccessRule struct { } func (*awsAwsjson11_deserializeOpCreateMobileDeviceAccessRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateMobileDeviceAccessRule) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateMobileDeviceAccessRule(response, &metadata) } output := &CreateMobileDeviceAccessRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateMobileDeviceAccessRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateMobileDeviceAccessRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateOrganization struct { } func (*awsAwsjson11_deserializeOpCreateOrganization) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateOrganization) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateOrganization(response, &metadata) } output := &CreateOrganizationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateOrganizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryInUseException", errorCode): return awsAwsjson11_deserializeErrorDirectoryInUseException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("NameAvailabilityException", errorCode): return awsAwsjson11_deserializeErrorNameAvailabilityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateResource struct { } func (*awsAwsjson11_deserializeOpCreateResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateResource) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateResource(response, &metadata) } output := &CreateResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("NameAvailabilityException", errorCode): return awsAwsjson11_deserializeErrorNameAvailabilityException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ReservedNameException", errorCode): return awsAwsjson11_deserializeErrorReservedNameException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateUser struct { } func (*awsAwsjson11_deserializeOpCreateUser) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateUser) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateUser(response, &metadata) } output := &CreateUserOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidPasswordException", errorCode): return awsAwsjson11_deserializeErrorInvalidPasswordException(response, errorBody) case strings.EqualFold("NameAvailabilityException", errorCode): return awsAwsjson11_deserializeErrorNameAvailabilityException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ReservedNameException", errorCode): return awsAwsjson11_deserializeErrorReservedNameException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteAccessControlRule struct { } func (*awsAwsjson11_deserializeOpDeleteAccessControlRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteAccessControlRule) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorDeleteAccessControlRule(response, &metadata) } output := &DeleteAccessControlRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteAccessControlRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteAccessControlRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteAlias struct { } func (*awsAwsjson11_deserializeOpDeleteAlias) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteAlias) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorDeleteAlias(response, &metadata) } output := &DeleteAliasOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteAvailabilityConfiguration struct { } func (*awsAwsjson11_deserializeOpDeleteAvailabilityConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteAvailabilityConfiguration) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorDeleteAvailabilityConfiguration(response, &metadata) } output := &DeleteAvailabilityConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteAvailabilityConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteAvailabilityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteEmailMonitoringConfiguration struct { } func (*awsAwsjson11_deserializeOpDeleteEmailMonitoringConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteEmailMonitoringConfiguration) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorDeleteEmailMonitoringConfiguration(response, &metadata) } output := &DeleteEmailMonitoringConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteEmailMonitoringConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteEmailMonitoringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteGroup struct { } func (*awsAwsjson11_deserializeOpDeleteGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteGroup) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorDeleteGroup(response, &metadata) } output := &DeleteGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteImpersonationRole struct { } func (*awsAwsjson11_deserializeOpDeleteImpersonationRole) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteImpersonationRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(response, &metadata) } output := &DeleteImpersonationRoleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteImpersonationRoleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteMailboxPermissions struct { } func (*awsAwsjson11_deserializeOpDeleteMailboxPermissions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteMailboxPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(response, &metadata) } output := &DeleteMailboxPermissionsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteMailboxPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride struct { } func (*awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(response, &metadata) } output := &DeleteMobileDeviceAccessOverrideOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule struct { } func (*awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(response, &metadata) } output := &DeleteMobileDeviceAccessRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteOrganization struct { } func (*awsAwsjson11_deserializeOpDeleteOrganization) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteOrganization(response, &metadata) } output := &DeleteOrganizationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteOrganizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteResource struct { } func (*awsAwsjson11_deserializeOpDeleteResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteResource(response, &metadata) } output := &DeleteResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteRetentionPolicy struct { } func (*awsAwsjson11_deserializeOpDeleteRetentionPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteRetentionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response, &metadata) } output := &DeleteRetentionPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteRetentionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteUser struct { } func (*awsAwsjson11_deserializeOpDeleteUser) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeleteUser(response, &metadata) } output := &DeleteUserOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeregisterFromWorkMail struct { } func (*awsAwsjson11_deserializeOpDeregisterFromWorkMail) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeregisterFromWorkMail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response, &metadata) } output := &DeregisterFromWorkMailOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeregisterFromWorkMailOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeregisterMailDomain struct { } func (*awsAwsjson11_deserializeOpDeregisterMailDomain) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeregisterMailDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDeregisterMailDomain(response, &metadata) } output := &DeregisterMailDomainOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeregisterMailDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeregisterMailDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidCustomSesConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidCustomSesConfigurationException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MailDomainInUseException", errorCode): return awsAwsjson11_deserializeErrorMailDomainInUseException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration struct { } func (*awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(response, &metadata) } output := &DescribeEmailMonitoringConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeEmailMonitoringConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeGroup struct { } func (*awsAwsjson11_deserializeOpDescribeGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDescribeGroup(response, &metadata) } output := &DescribeGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeInboundDmarcSettings struct { } func (*awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(response, &metadata) } output := &DescribeInboundDmarcSettingsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeInboundDmarcSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeMailboxExportJob struct { } func (*awsAwsjson11_deserializeOpDescribeMailboxExportJob) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeMailboxExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDescribeMailboxExportJob(response, &metadata) } output := &DescribeMailboxExportJobOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeMailboxExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeMailboxExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeOrganization struct { } func (*awsAwsjson11_deserializeOpDescribeOrganization) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDescribeOrganization(response, &metadata) } output := &DescribeOrganizationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeOrganizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeResource struct { } func (*awsAwsjson11_deserializeOpDescribeResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDescribeResource(response, &metadata) } output := &DescribeResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeUser struct { } func (*awsAwsjson11_deserializeOpDescribeUser) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDescribeUser(response, &metadata) } output := &DescribeUserOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDisassociateDelegateFromResource struct { } func (*awsAwsjson11_deserializeOpDisassociateDelegateFromResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDisassociateDelegateFromResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response, &metadata) } output := &DisassociateDelegateFromResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDisassociateDelegateFromResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDisassociateMemberFromGroup struct { } func (*awsAwsjson11_deserializeOpDisassociateMemberFromGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDisassociateMemberFromGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(response, &metadata) } output := &DisassociateMemberFromGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDisassociateMemberFromGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetAccessControlEffect struct { } func (*awsAwsjson11_deserializeOpGetAccessControlEffect) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetAccessControlEffect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetAccessControlEffect(response, &metadata) } output := &GetAccessControlEffectOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetAccessControlEffectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetAccessControlEffect(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetDefaultRetentionPolicy struct { } func (*awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(response, &metadata) } output := &GetDefaultRetentionPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetDefaultRetentionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetImpersonationRole struct { } func (*awsAwsjson11_deserializeOpGetImpersonationRole) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetImpersonationRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetImpersonationRole(response, &metadata) } output := &GetImpersonationRoleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetImpersonationRoleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetImpersonationRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetImpersonationRoleEffect struct { } func (*awsAwsjson11_deserializeOpGetImpersonationRoleEffect) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetImpersonationRoleEffect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response, &metadata) } output := &GetImpersonationRoleEffectOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetImpersonationRoleEffectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetMailboxDetails struct { } func (*awsAwsjson11_deserializeOpGetMailboxDetails) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetMailboxDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetMailboxDetails(response, &metadata) } output := &GetMailboxDetailsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetMailboxDetailsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetMailboxDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetMailDomain struct { } func (*awsAwsjson11_deserializeOpGetMailDomain) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetMailDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetMailDomain(response, &metadata) } output := &GetMailDomainOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetMailDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetMailDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MailDomainNotFoundException", errorCode): return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect struct { } func (*awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(response, &metadata) } output := &GetMobileDeviceAccessEffectOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessEffectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride struct { } func (*awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(response, &metadata) } output := &GetMobileDeviceAccessOverrideOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListAccessControlRules struct { } func (*awsAwsjson11_deserializeOpListAccessControlRules) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListAccessControlRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListAccessControlRules(response, &metadata) } output := &ListAccessControlRulesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListAccessControlRulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListAccessControlRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListAliases struct { } func (*awsAwsjson11_deserializeOpListAliases) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListAliases(response, &metadata) } output := &ListAliasesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListAliasesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListAvailabilityConfigurations struct { } func (*awsAwsjson11_deserializeOpListAvailabilityConfigurations) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListAvailabilityConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(response, &metadata) } output := &ListAvailabilityConfigurationsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListAvailabilityConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListGroupMembers struct { } func (*awsAwsjson11_deserializeOpListGroupMembers) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListGroupMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListGroupMembers(response, &metadata) } output := &ListGroupMembersOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListGroupMembersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListGroupMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListGroups struct { } func (*awsAwsjson11_deserializeOpListGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListGroups(response, &metadata) } output := &ListGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListImpersonationRoles struct { } func (*awsAwsjson11_deserializeOpListImpersonationRoles) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListImpersonationRoles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListImpersonationRoles(response, &metadata) } output := &ListImpersonationRolesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListImpersonationRolesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListImpersonationRoles(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListMailboxExportJobs struct { } func (*awsAwsjson11_deserializeOpListMailboxExportJobs) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListMailboxExportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListMailboxExportJobs(response, &metadata) } output := &ListMailboxExportJobsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListMailboxExportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListMailboxExportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListMailboxPermissions struct { } func (*awsAwsjson11_deserializeOpListMailboxPermissions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListMailboxPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListMailboxPermissions(response, &metadata) } output := &ListMailboxPermissionsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListMailboxPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListMailboxPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListMailDomains struct { } func (*awsAwsjson11_deserializeOpListMailDomains) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListMailDomains) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListMailDomains(response, &metadata) } output := &ListMailDomainsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListMailDomainsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListMailDomains(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides struct { } func (*awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(response, &metadata) } output := &ListMobileDeviceAccessOverridesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessOverridesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListMobileDeviceAccessRules struct { } func (*awsAwsjson11_deserializeOpListMobileDeviceAccessRules) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListMobileDeviceAccessRules(response, &metadata) } output := &ListMobileDeviceAccessRulesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessRulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListOrganizations struct { } func (*awsAwsjson11_deserializeOpListOrganizations) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListOrganizations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListOrganizations(response, &metadata) } output := &ListOrganizationsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListOrganizationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListOrganizations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListResourceDelegates struct { } func (*awsAwsjson11_deserializeOpListResourceDelegates) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListResourceDelegates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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, awsAwsjson11_deserializeOpErrorListResourceDelegates(response, &metadata) } output := &ListResourceDelegatesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListResourceDelegatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListResourceDelegates(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListResources struct { } func (*awsAwsjson11_deserializeOpListResources) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListResources(response, &metadata) } output := &ListResourcesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListTagsForResource struct { } func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListUsers struct { } func (*awsAwsjson11_deserializeOpListUsers) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListUsers(response, &metadata) } output := &ListUsersOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListUsersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutAccessControlRule struct { } func (*awsAwsjson11_deserializeOpPutAccessControlRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutAccessControlRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutAccessControlRule(response, &metadata) } output := &PutAccessControlRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutAccessControlRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutAccessControlRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration struct { } func (*awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutEmailMonitoringConfiguration(response, &metadata) } output := &PutEmailMonitoringConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutEmailMonitoringConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutEmailMonitoringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutInboundDmarcSettings struct { } func (*awsAwsjson11_deserializeOpPutInboundDmarcSettings) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutInboundDmarcSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutInboundDmarcSettings(response, &metadata) } output := &PutInboundDmarcSettingsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutInboundDmarcSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutInboundDmarcSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutMailboxPermissions struct { } func (*awsAwsjson11_deserializeOpPutMailboxPermissions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutMailboxPermissions) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorPutMailboxPermissions(response, &metadata) } output := &PutMailboxPermissionsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutMailboxPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutMailboxPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutMobileDeviceAccessOverride struct { } func (*awsAwsjson11_deserializeOpPutMobileDeviceAccessOverride) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutMobileDeviceAccessOverride) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorPutMobileDeviceAccessOverride(response, &metadata) } output := &PutMobileDeviceAccessOverrideOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutMobileDeviceAccessOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutMobileDeviceAccessOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutRetentionPolicy struct { } func (*awsAwsjson11_deserializeOpPutRetentionPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutRetentionPolicy) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorPutRetentionPolicy(response, &metadata) } output := &PutRetentionPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutRetentionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutRetentionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRegisterMailDomain struct { } func (*awsAwsjson11_deserializeOpRegisterMailDomain) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRegisterMailDomain) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorRegisterMailDomain(response, &metadata) } output := &RegisterMailDomainOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentRegisterMailDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorRegisterMailDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("MailDomainInUseException", errorCode): return awsAwsjson11_deserializeErrorMailDomainInUseException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRegisterToWorkMail struct { } func (*awsAwsjson11_deserializeOpRegisterToWorkMail) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRegisterToWorkMail) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorRegisterToWorkMail(response, &metadata) } output := &RegisterToWorkMailOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentRegisterToWorkMailOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorRegisterToWorkMail(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EmailAddressInUseException", errorCode): return awsAwsjson11_deserializeErrorEmailAddressInUseException(response, errorBody) case strings.EqualFold("EntityAlreadyRegisteredException", errorCode): return awsAwsjson11_deserializeErrorEntityAlreadyRegisteredException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MailDomainNotFoundException", errorCode): return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) case strings.EqualFold("MailDomainStateException", errorCode): return awsAwsjson11_deserializeErrorMailDomainStateException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpResetPassword struct { } func (*awsAwsjson11_deserializeOpResetPassword) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpResetPassword) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorResetPassword(response, &metadata) } output := &ResetPasswordOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentResetPasswordOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorResetPassword(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidPasswordException", errorCode): return awsAwsjson11_deserializeErrorInvalidPasswordException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpStartMailboxExportJob struct { } func (*awsAwsjson11_deserializeOpStartMailboxExportJob) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpStartMailboxExportJob) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorStartMailboxExportJob(response, &metadata) } output := &StartMailboxExportJobOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentStartMailboxExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorStartMailboxExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpTagResource struct { } func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpTestAvailabilityConfiguration struct { } func (*awsAwsjson11_deserializeOpTestAvailabilityConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpTestAvailabilityConfiguration) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorTestAvailabilityConfiguration(response, &metadata) } output := &TestAvailabilityConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentTestAvailabilityConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorTestAvailabilityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUntagResource struct { } func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateAvailabilityConfiguration struct { } func (*awsAwsjson11_deserializeOpUpdateAvailabilityConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateAvailabilityConfiguration) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateAvailabilityConfiguration(response, &metadata) } output := &UpdateAvailabilityConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateAvailabilityConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateAvailabilityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateDefaultMailDomain struct { } func (*awsAwsjson11_deserializeOpUpdateDefaultMailDomain) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateDefaultMailDomain) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateDefaultMailDomain(response, &metadata) } output := &UpdateDefaultMailDomainOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateDefaultMailDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateDefaultMailDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MailDomainNotFoundException", errorCode): return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) case strings.EqualFold("MailDomainStateException", errorCode): return awsAwsjson11_deserializeErrorMailDomainStateException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateImpersonationRole struct { } func (*awsAwsjson11_deserializeOpUpdateImpersonationRole) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateImpersonationRole) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateImpersonationRole(response, &metadata) } output := &UpdateImpersonationRoleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateImpersonationRoleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateImpersonationRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateMailboxQuota struct { } func (*awsAwsjson11_deserializeOpUpdateMailboxQuota) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateMailboxQuota) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateMailboxQuota(response, &metadata) } output := &UpdateMailboxQuotaOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateMailboxQuotaOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateMailboxQuota(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateMobileDeviceAccessRule struct { } func (*awsAwsjson11_deserializeOpUpdateMobileDeviceAccessRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateMobileDeviceAccessRule) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateMobileDeviceAccessRule(response, &metadata) } output := &UpdateMobileDeviceAccessRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateMobileDeviceAccessRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateMobileDeviceAccessRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdatePrimaryEmailAddress struct { } func (*awsAwsjson11_deserializeOpUpdatePrimaryEmailAddress) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdatePrimaryEmailAddress) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdatePrimaryEmailAddress(response, &metadata) } output := &UpdatePrimaryEmailAddressOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdatePrimaryEmailAddressOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdatePrimaryEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EmailAddressInUseException", errorCode): return awsAwsjson11_deserializeErrorEmailAddressInUseException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("MailDomainNotFoundException", errorCode): return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) case strings.EqualFold("MailDomainStateException", errorCode): return awsAwsjson11_deserializeErrorMailDomainStateException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateResource struct { } func (*awsAwsjson11_deserializeOpUpdateResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateResource) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateResource(response, &metadata) } output := &UpdateResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("DirectoryUnavailableException", errorCode): return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) case strings.EqualFold("EmailAddressInUseException", errorCode): return awsAwsjson11_deserializeErrorEmailAddressInUseException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) case strings.EqualFold("InvalidConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidConfigurationException(response, errorBody) case strings.EqualFold("MailDomainNotFoundException", errorCode): return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) case strings.EqualFold("MailDomainStateException", errorCode): return awsAwsjson11_deserializeErrorMailDomainStateException(response, errorBody) case strings.EqualFold("NameAvailabilityException", errorCode): return awsAwsjson11_deserializeErrorNameAvailabilityException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorDirectoryInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.DirectoryInUseException{} err := awsAwsjson11_deserializeDocumentDirectoryInUseException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.DirectoryServiceAuthenticationFailedException{} err := awsAwsjson11_deserializeDocumentDirectoryServiceAuthenticationFailedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorDirectoryUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.DirectoryUnavailableException{} err := awsAwsjson11_deserializeDocumentDirectoryUnavailableException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEmailAddressInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EmailAddressInUseException{} err := awsAwsjson11_deserializeDocumentEmailAddressInUseException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEntityAlreadyRegisteredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EntityAlreadyRegisteredException{} err := awsAwsjson11_deserializeDocumentEntityAlreadyRegisteredException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEntityNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EntityNotFoundException{} err := awsAwsjson11_deserializeDocumentEntityNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEntityStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EntityStateException{} err := awsAwsjson11_deserializeDocumentEntityStateException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidConfigurationException{} err := awsAwsjson11_deserializeDocumentInvalidConfigurationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidCustomSesConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidCustomSesConfigurationException{} err := awsAwsjson11_deserializeDocumentInvalidCustomSesConfigurationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidParameterException{} err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidPasswordException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidPasswordException{} err := awsAwsjson11_deserializeDocumentInvalidPasswordException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.LimitExceededException{} err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorMailDomainInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.MailDomainInUseException{} err := awsAwsjson11_deserializeDocumentMailDomainInUseException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorMailDomainNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.MailDomainNotFoundException{} err := awsAwsjson11_deserializeDocumentMailDomainNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorMailDomainStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.MailDomainStateException{} err := awsAwsjson11_deserializeDocumentMailDomainStateException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorNameAvailabilityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.NameAvailabilityException{} err := awsAwsjson11_deserializeDocumentNameAvailabilityException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorOrganizationNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.OrganizationNotFoundException{} err := awsAwsjson11_deserializeDocumentOrganizationNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorOrganizationStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.OrganizationStateException{} err := awsAwsjson11_deserializeDocumentOrganizationStateException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorReservedNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ReservedNameException{} err := awsAwsjson11_deserializeDocumentReservedNameException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ResourceNotFoundException{} err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.TooManyTagsException{} err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.UnsupportedOperationException{} err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeDocumentAccessControlRule(v **types.AccessControlRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AccessControlRule if *v == nil { sv = &types.AccessControlRule{} } else { sv = *v } for key, value := range shape { switch key { case "Actions": if err := awsAwsjson11_deserializeDocumentActionsList(&sv.Actions, value); err != nil { return err } case "DateCreated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DateModified": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessControlRuleDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessControlRuleEffect to be of type string, got %T instead", value) } sv.Effect = types.AccessControlRuleEffect(jtv) } case "ImpersonationRoleIds": if err := awsAwsjson11_deserializeDocumentImpersonationRoleIdList(&sv.ImpersonationRoleIds, value); err != nil { return err } case "IpRanges": if err := awsAwsjson11_deserializeDocumentIpRangeList(&sv.IpRanges, value); err != nil { return err } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessControlRuleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "NotActions": if err := awsAwsjson11_deserializeDocumentActionsList(&sv.NotActions, value); err != nil { return err } case "NotImpersonationRoleIds": if err := awsAwsjson11_deserializeDocumentImpersonationRoleIdList(&sv.NotImpersonationRoleIds, value); err != nil { return err } case "NotIpRanges": if err := awsAwsjson11_deserializeDocumentIpRangeList(&sv.NotIpRanges, value); err != nil { return err } case "NotUserIds": if err := awsAwsjson11_deserializeDocumentUserIdList(&sv.NotUserIds, value); err != nil { return err } case "UserIds": if err := awsAwsjson11_deserializeDocumentUserIdList(&sv.UserIds, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAccessControlRuleNameList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessControlRuleName to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAccessControlRulesList(v *[]types.AccessControlRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.AccessControlRule if *v == nil { cv = []types.AccessControlRule{} } else { cv = *v } for _, value := range shape { var col types.AccessControlRule destAddr := &col if err := awsAwsjson11_deserializeDocumentAccessControlRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentActionsList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessControlRuleAction to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAliases(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAvailabilityConfiguration(v **types.AvailabilityConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AvailabilityConfiguration if *v == nil { sv = &types.AvailabilityConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "DateCreated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DateModified": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DomainName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) } sv.DomainName = ptr.String(jtv) } case "EwsProvider": if err := awsAwsjson11_deserializeDocumentRedactedEwsAvailabilityProvider(&sv.EwsProvider, value); err != nil { return err } case "LambdaProvider": if err := awsAwsjson11_deserializeDocumentLambdaAvailabilityProvider(&sv.LambdaProvider, value); err != nil { return err } case "ProviderType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AvailabilityProviderType to be of type string, got %T instead", value) } sv.ProviderType = types.AvailabilityProviderType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAvailabilityConfigurationList(v *[]types.AvailabilityConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.AvailabilityConfiguration if *v == nil { cv = []types.AvailabilityConfiguration{} } else { cv = *v } for _, value := range shape { var col types.AvailabilityConfiguration destAddr := &col if err := awsAwsjson11_deserializeDocumentAvailabilityConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentBookingOptions(v **types.BookingOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.BookingOptions if *v == nil { sv = &types.BookingOptions{} } else { sv = *v } for key, value := range shape { switch key { case "AutoAcceptRequests": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.AutoAcceptRequests = jtv } case "AutoDeclineConflictingRequests": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.AutoDeclineConflictingRequests = jtv } case "AutoDeclineRecurringRequests": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.AutoDeclineRecurringRequests = jtv } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDelegate(v **types.Delegate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Delegate if *v == nil { sv = &types.Delegate{} } else { sv = *v } for key, value := range shape { switch key { case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MemberType to be of type string, got %T instead", value) } sv.Type = types.MemberType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDeviceModelList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DeviceModel to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDeviceOperatingSystemList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DeviceOperatingSystem to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDeviceTypeList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DeviceType to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDeviceUserAgentList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DeviceUserAgent to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDirectoryInUseException(v **types.DirectoryInUseException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DirectoryInUseException if *v == nil { sv = &types.DirectoryInUseException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDirectoryServiceAuthenticationFailedException(v **types.DirectoryServiceAuthenticationFailedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DirectoryServiceAuthenticationFailedException if *v == nil { sv = &types.DirectoryServiceAuthenticationFailedException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDirectoryUnavailableException(v **types.DirectoryUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DirectoryUnavailableException if *v == nil { sv = &types.DirectoryUnavailableException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDnsRecord(v **types.DnsRecord, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DnsRecord if *v == nil { sv = &types.DnsRecord{} } else { sv = *v } for key, value := range shape { switch key { case "Hostname": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Hostname = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDnsRecords(v *[]types.DnsRecord, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.DnsRecord if *v == nil { cv = []types.DnsRecord{} } else { cv = *v } for _, value := range shape { var col types.DnsRecord destAddr := &col if err := awsAwsjson11_deserializeDocumentDnsRecord(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentEmailAddressInUseException(v **types.EmailAddressInUseException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EmailAddressInUseException if *v == nil { sv = &types.EmailAddressInUseException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEntityAlreadyRegisteredException(v **types.EntityAlreadyRegisteredException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EntityAlreadyRegisteredException if *v == nil { sv = &types.EntityAlreadyRegisteredException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEntityNotFoundException(v **types.EntityNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EntityNotFoundException if *v == nil { sv = &types.EntityNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEntityStateException(v **types.EntityStateException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EntityStateException if *v == nil { sv = &types.EntityStateException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentFolderConfiguration(v **types.FolderConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.FolderConfiguration if *v == nil { sv = &types.FolderConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "Action": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RetentionAction to be of type string, got %T instead", value) } sv.Action = types.RetentionAction(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FolderName to be of type string, got %T instead", value) } sv.Name = types.FolderName(jtv) } case "Period": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RetentionPeriod to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Period = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentFolderConfigurations(v *[]types.FolderConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.FolderConfiguration if *v == nil { cv = []types.FolderConfiguration{} } else { cv = *v } for _, value := range shape { var col types.FolderConfiguration destAddr := &col if err := awsAwsjson11_deserializeDocumentFolderConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentGroup(v **types.Group, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Group if *v == nil { sv = &types.Group{} } else { sv = *v } for key, value := range shape { switch key { case "DisabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DisabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Email": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } sv.Email = ptr.String(jtv) } case "EnabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GroupName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityState to be of type string, got %T instead", value) } sv.State = types.EntityState(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGroups(v *[]types.Group, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Group if *v == nil { cv = []types.Group{} } else { cv = *v } for _, value := range shape { var col types.Group destAddr := &col if err := awsAwsjson11_deserializeDocumentGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentImpersonationMatchedRule(v **types.ImpersonationMatchedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ImpersonationMatchedRule if *v == nil { sv = &types.ImpersonationMatchedRule{} } else { sv = *v } for key, value := range shape { switch key { case "ImpersonationRuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRuleId to be of type string, got %T instead", value) } sv.ImpersonationRuleId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRuleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentImpersonationMatchedRuleList(v *[]types.ImpersonationMatchedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ImpersonationMatchedRule if *v == nil { cv = []types.ImpersonationMatchedRule{} } else { cv = *v } for _, value := range shape { var col types.ImpersonationMatchedRule destAddr := &col if err := awsAwsjson11_deserializeDocumentImpersonationMatchedRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentImpersonationRole(v **types.ImpersonationRole, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ImpersonationRole if *v == nil { sv = &types.ImpersonationRole{} } else { sv = *v } for key, value := range shape { switch key { case "DateCreated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DateModified": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "ImpersonationRoleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleId to be of type string, got %T instead", value) } sv.ImpersonationRoleId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleType to be of type string, got %T instead", value) } sv.Type = types.ImpersonationRoleType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentImpersonationRoleIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentImpersonationRoleList(v *[]types.ImpersonationRole, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ImpersonationRole if *v == nil { cv = []types.ImpersonationRole{} } else { cv = *v } for _, value := range shape { var col types.ImpersonationRole destAddr := &col if err := awsAwsjson11_deserializeDocumentImpersonationRole(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentImpersonationRule(v **types.ImpersonationRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ImpersonationRule if *v == nil { sv = &types.ImpersonationRule{} } else { sv = *v } for key, value := range shape { switch key { case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRuleDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessEffect to be of type string, got %T instead", value) } sv.Effect = types.AccessEffect(jtv) } case "ImpersonationRuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRuleId to be of type string, got %T instead", value) } sv.ImpersonationRuleId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRuleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "NotTargetUsers": if err := awsAwsjson11_deserializeDocumentTargetUsers(&sv.NotTargetUsers, value); err != nil { return err } case "TargetUsers": if err := awsAwsjson11_deserializeDocumentTargetUsers(&sv.TargetUsers, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentImpersonationRuleList(v *[]types.ImpersonationRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ImpersonationRule if *v == nil { cv = []types.ImpersonationRule{} } else { cv = *v } for _, value := range shape { var col types.ImpersonationRule destAddr := &col if err := awsAwsjson11_deserializeDocumentImpersonationRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentInvalidConfigurationException(v **types.InvalidConfigurationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidConfigurationException if *v == nil { sv = &types.InvalidConfigurationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidCustomSesConfigurationException(v **types.InvalidCustomSesConfigurationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidCustomSesConfigurationException if *v == nil { sv = &types.InvalidCustomSesConfigurationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidParameterException if *v == nil { sv = &types.InvalidParameterException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidPasswordException(v **types.InvalidPasswordException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidPasswordException if *v == nil { sv = &types.InvalidPasswordException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIpRangeList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpRange to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentJobs(v *[]types.MailboxExportJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.MailboxExportJob if *v == nil { cv = []types.MailboxExportJob{} } else { cv = *v } for _, value := range shape { var col types.MailboxExportJob destAddr := &col if err := awsAwsjson11_deserializeDocumentMailboxExportJob(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentLambdaAvailabilityProvider(v **types.LambdaAvailabilityProvider, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LambdaAvailabilityProvider if *v == nil { sv = &types.LambdaAvailabilityProvider{} } else { sv = *v } for key, value := range shape { switch key { case "LambdaArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LambdaArn to be of type string, got %T instead", value) } sv.LambdaArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LimitExceededException if *v == nil { sv = &types.LimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMailboxExportJob(v **types.MailboxExportJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MailboxExportJob if *v == nil { sv = &types.MailboxExportJob{} } else { sv = *v } for key, value := range shape { switch key { case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EndTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "EntityId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.EntityId = ptr.String(jtv) } case "EstimatedProgress": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Percentage to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.EstimatedProgress = int32(i64) } case "JobId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MailboxExportJobId to be of type string, got %T instead", value) } sv.JobId = ptr.String(jtv) } case "S3BucketName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) } sv.S3BucketName = ptr.String(jtv) } case "S3Path": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3ObjectKey to be of type string, got %T instead", value) } sv.S3Path = ptr.String(jtv) } case "StartTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MailboxExportJobState to be of type string, got %T instead", value) } sv.State = types.MailboxExportJobState(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMailDomainInUseException(v **types.MailDomainInUseException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MailDomainInUseException if *v == nil { sv = &types.MailDomainInUseException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMailDomainNotFoundException(v **types.MailDomainNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MailDomainNotFoundException if *v == nil { sv = &types.MailDomainNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMailDomains(v *[]types.MailDomainSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.MailDomainSummary if *v == nil { cv = []types.MailDomainSummary{} } else { cv = *v } for _, value := range shape { var col types.MailDomainSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentMailDomainSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentMailDomainStateException(v **types.MailDomainStateException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MailDomainStateException if *v == nil { sv = &types.MailDomainStateException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMailDomainSummary(v **types.MailDomainSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MailDomainSummary if *v == nil { sv = &types.MailDomainSummary{} } else { sv = *v } for key, value := range shape { switch key { case "DefaultDomain": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.DefaultDomain = jtv } case "DomainName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) } sv.DomainName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMember(v **types.Member, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Member if *v == nil { sv = &types.Member{} } else { sv = *v } for key, value := range shape { switch key { case "DisabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DisabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "EnabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityState to be of type string, got %T instead", value) } sv.State = types.EntityState(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MemberType to be of type string, got %T instead", value) } sv.Type = types.MemberType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMembers(v *[]types.Member, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Member if *v == nil { cv = []types.Member{} } else { cv = *v } for _, value := range shape { var col types.Member destAddr := &col if err := awsAwsjson11_deserializeDocumentMember(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentMobileDeviceAccessMatchedRule(v **types.MobileDeviceAccessMatchedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MobileDeviceAccessMatchedRule if *v == nil { sv = &types.MobileDeviceAccessMatchedRule{} } else { sv = *v } for key, value := range shape { switch key { case "MobileDeviceAccessRuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleId to be of type string, got %T instead", value) } sv.MobileDeviceAccessRuleId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMobileDeviceAccessMatchedRuleList(v *[]types.MobileDeviceAccessMatchedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.MobileDeviceAccessMatchedRule if *v == nil { cv = []types.MobileDeviceAccessMatchedRule{} } else { cv = *v } for _, value := range shape { var col types.MobileDeviceAccessMatchedRule destAddr := &col if err := awsAwsjson11_deserializeDocumentMobileDeviceAccessMatchedRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentMobileDeviceAccessOverride(v **types.MobileDeviceAccessOverride, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MobileDeviceAccessOverride if *v == nil { sv = &types.MobileDeviceAccessOverride{} } else { sv = *v } for key, value := range shape { switch key { case "DateCreated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DateModified": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "DeviceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) } sv.DeviceId = ptr.String(jtv) } case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleEffect to be of type string, got %T instead", value) } sv.Effect = types.MobileDeviceAccessRuleEffect(jtv) } case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMobileDeviceAccessOverridesList(v *[]types.MobileDeviceAccessOverride, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.MobileDeviceAccessOverride if *v == nil { cv = []types.MobileDeviceAccessOverride{} } else { cv = *v } for _, value := range shape { var col types.MobileDeviceAccessOverride destAddr := &col if err := awsAwsjson11_deserializeDocumentMobileDeviceAccessOverride(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentMobileDeviceAccessRule(v **types.MobileDeviceAccessRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MobileDeviceAccessRule if *v == nil { sv = &types.MobileDeviceAccessRule{} } else { sv = *v } for key, value := range shape { switch key { case "DateCreated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DateModified": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "DeviceModels": if err := awsAwsjson11_deserializeDocumentDeviceModelList(&sv.DeviceModels, value); err != nil { return err } case "DeviceOperatingSystems": if err := awsAwsjson11_deserializeDocumentDeviceOperatingSystemList(&sv.DeviceOperatingSystems, value); err != nil { return err } case "DeviceTypes": if err := awsAwsjson11_deserializeDocumentDeviceTypeList(&sv.DeviceTypes, value); err != nil { return err } case "DeviceUserAgents": if err := awsAwsjson11_deserializeDocumentDeviceUserAgentList(&sv.DeviceUserAgents, value); err != nil { return err } case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleEffect to be of type string, got %T instead", value) } sv.Effect = types.MobileDeviceAccessRuleEffect(jtv) } case "MobileDeviceAccessRuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleId to be of type string, got %T instead", value) } sv.MobileDeviceAccessRuleId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "NotDeviceModels": if err := awsAwsjson11_deserializeDocumentDeviceModelList(&sv.NotDeviceModels, value); err != nil { return err } case "NotDeviceOperatingSystems": if err := awsAwsjson11_deserializeDocumentDeviceOperatingSystemList(&sv.NotDeviceOperatingSystems, value); err != nil { return err } case "NotDeviceTypes": if err := awsAwsjson11_deserializeDocumentDeviceTypeList(&sv.NotDeviceTypes, value); err != nil { return err } case "NotDeviceUserAgents": if err := awsAwsjson11_deserializeDocumentDeviceUserAgentList(&sv.NotDeviceUserAgents, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMobileDeviceAccessRulesList(v *[]types.MobileDeviceAccessRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.MobileDeviceAccessRule if *v == nil { cv = []types.MobileDeviceAccessRule{} } else { cv = *v } for _, value := range shape { var col types.MobileDeviceAccessRule destAddr := &col if err := awsAwsjson11_deserializeDocumentMobileDeviceAccessRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentNameAvailabilityException(v **types.NameAvailabilityException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.NameAvailabilityException if *v == nil { sv = &types.NameAvailabilityException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOrganizationNotFoundException(v **types.OrganizationNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.OrganizationNotFoundException if *v == nil { sv = &types.OrganizationNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOrganizationStateException(v **types.OrganizationStateException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.OrganizationStateException if *v == nil { sv = &types.OrganizationStateException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOrganizationSummaries(v *[]types.OrganizationSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.OrganizationSummary if *v == nil { cv = []types.OrganizationSummary{} } else { cv = *v } for _, value := range shape { var col types.OrganizationSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentOrganizationSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentOrganizationSummary(v **types.OrganizationSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.OrganizationSummary if *v == nil { sv = &types.OrganizationSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Alias": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OrganizationName to be of type string, got %T instead", value) } sv.Alias = ptr.String(jtv) } case "DefaultMailDomain": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) } sv.DefaultMailDomain = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "OrganizationId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OrganizationId to be of type string, got %T instead", value) } sv.OrganizationId = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.State = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPermission(v **types.Permission, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Permission if *v == nil { sv = &types.Permission{} } else { sv = *v } for key, value := range shape { switch key { case "GranteeId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.GranteeId = ptr.String(jtv) } case "GranteeType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MemberType to be of type string, got %T instead", value) } sv.GranteeType = types.MemberType(jtv) } case "PermissionValues": if err := awsAwsjson11_deserializeDocumentPermissionValues(&sv.PermissionValues, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPermissions(v *[]types.Permission, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Permission if *v == nil { cv = []types.Permission{} } else { cv = *v } for _, value := range shape { var col types.Permission destAddr := &col if err := awsAwsjson11_deserializeDocumentPermission(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPermissionValues(v *[]types.PermissionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PermissionType if *v == nil { cv = []types.PermissionType{} } else { cv = *v } for _, value := range shape { var col types.PermissionType if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PermissionType to be of type string, got %T instead", value) } col = types.PermissionType(jtv) } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRedactedEwsAvailabilityProvider(v **types.RedactedEwsAvailabilityProvider, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RedactedEwsAvailabilityProvider if *v == nil { sv = &types.RedactedEwsAvailabilityProvider{} } else { sv = *v } for key, value := range shape { switch key { case "EwsEndpoint": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.EwsEndpoint = ptr.String(jtv) } case "EwsUsername": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExternalUserName to be of type string, got %T instead", value) } sv.EwsUsername = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentReservedNameException(v **types.ReservedNameException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ReservedNameException if *v == nil { sv = &types.ReservedNameException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Resource if *v == nil { sv = &types.Resource{} } else { sv = *v } for key, value := range shape { switch key { case "DisabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DisabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Email": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } sv.Email = ptr.String(jtv) } case "EnabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityState to be of type string, got %T instead", value) } sv.State = types.EntityState(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } sv.Type = types.ResourceType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceDelegates(v *[]types.Delegate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Delegate if *v == nil { cv = []types.Delegate{} } else { cv = *v } for _, value := range shape { var col types.Delegate destAddr := &col if err := awsAwsjson11_deserializeDocumentDelegate(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResources(v *[]types.Resource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Resource if *v == nil { cv = []types.Resource{} } else { cv = *v } for _, value := range shape { var col types.Resource destAddr := &col if err := awsAwsjson11_deserializeDocumentResource(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "Key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTargetUsers(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityIdentifier to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TooManyTagsException if *v == nil { sv = &types.TooManyTagsException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.UnsupportedOperationException if *v == nil { sv = &types.UnsupportedOperationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.User if *v == nil { sv = &types.User{} } else { sv = *v } for key, value := range shape { switch key { case "DisabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DisabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DisplayName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.DisplayName = ptr.String(jtv) } case "Email": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } sv.Email = ptr.String(jtv) } case "EnabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityState to be of type string, got %T instead", value) } sv.State = types.EntityState(jtv) } case "UserRole": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserRole to be of type string, got %T instead", value) } sv.UserRole = types.UserRole(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUserIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentUsers(v *[]types.User, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.User if *v == nil { cv = []types.User{} } else { cv = *v } for _, value := range shape { var col types.User destAddr := &col if err := awsAwsjson11_deserializeDocumentUser(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeOpDocumentAssociateDelegateToResourceOutput(v **AssociateDelegateToResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AssociateDelegateToResourceOutput if *v == nil { sv = &AssociateDelegateToResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAssociateMemberToGroupOutput(v **AssociateMemberToGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AssociateMemberToGroupOutput if *v == nil { sv = &AssociateMemberToGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAssumeImpersonationRoleOutput(v **AssumeImpersonationRoleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AssumeImpersonationRoleOutput if *v == nil { sv = &AssumeImpersonationRoleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ExpiresIn": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ExpiresIn to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ExpiresIn = ptr.Int64(i64) } case "Token": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationToken to be of type string, got %T instead", value) } sv.Token = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCancelMailboxExportJobOutput(v **CancelMailboxExportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CancelMailboxExportJobOutput if *v == nil { sv = &CancelMailboxExportJobOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateAliasOutput(v **CreateAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateAliasOutput if *v == nil { sv = &CreateAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateAvailabilityConfigurationOutput(v **CreateAvailabilityConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateAvailabilityConfigurationOutput if *v == nil { sv = &CreateAvailabilityConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateGroupOutput if *v == nil { sv = &CreateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateImpersonationRoleOutput(v **CreateImpersonationRoleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateImpersonationRoleOutput if *v == nil { sv = &CreateImpersonationRoleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ImpersonationRoleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleId to be of type string, got %T instead", value) } sv.ImpersonationRoleId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateMobileDeviceAccessRuleOutput(v **CreateMobileDeviceAccessRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateMobileDeviceAccessRuleOutput if *v == nil { sv = &CreateMobileDeviceAccessRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "MobileDeviceAccessRuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleId to be of type string, got %T instead", value) } sv.MobileDeviceAccessRuleId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateOrganizationOutput(v **CreateOrganizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateOrganizationOutput if *v == nil { sv = &CreateOrganizationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "OrganizationId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OrganizationId to be of type string, got %T instead", value) } sv.OrganizationId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateResourceOutput(v **CreateResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateResourceOutput if *v == nil { sv = &CreateResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateUserOutput if *v == nil { sv = &CreateUserOutput{} } else { sv = *v } for key, value := range shape { switch key { case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteAccessControlRuleOutput(v **DeleteAccessControlRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteAccessControlRuleOutput if *v == nil { sv = &DeleteAccessControlRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteAliasOutput(v **DeleteAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteAliasOutput if *v == nil { sv = &DeleteAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteAvailabilityConfigurationOutput(v **DeleteAvailabilityConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteAvailabilityConfigurationOutput if *v == nil { sv = &DeleteAvailabilityConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteEmailMonitoringConfigurationOutput(v **DeleteEmailMonitoringConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteEmailMonitoringConfigurationOutput if *v == nil { sv = &DeleteEmailMonitoringConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteGroupOutput if *v == nil { sv = &DeleteGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteImpersonationRoleOutput(v **DeleteImpersonationRoleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteImpersonationRoleOutput if *v == nil { sv = &DeleteImpersonationRoleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteMailboxPermissionsOutput(v **DeleteMailboxPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteMailboxPermissionsOutput if *v == nil { sv = &DeleteMailboxPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessOverrideOutput(v **DeleteMobileDeviceAccessOverrideOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteMobileDeviceAccessOverrideOutput if *v == nil { sv = &DeleteMobileDeviceAccessOverrideOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessRuleOutput(v **DeleteMobileDeviceAccessRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteMobileDeviceAccessRuleOutput if *v == nil { sv = &DeleteMobileDeviceAccessRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteOrganizationOutput(v **DeleteOrganizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteOrganizationOutput if *v == nil { sv = &DeleteOrganizationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "OrganizationId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OrganizationId to be of type string, got %T instead", value) } sv.OrganizationId = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.State = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteResourceOutput(v **DeleteResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteResourceOutput if *v == nil { sv = &DeleteResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteRetentionPolicyOutput(v **DeleteRetentionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteRetentionPolicyOutput if *v == nil { sv = &DeleteRetentionPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteUserOutput if *v == nil { sv = &DeleteUserOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeregisterFromWorkMailOutput(v **DeregisterFromWorkMailOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeregisterFromWorkMailOutput if *v == nil { sv = &DeregisterFromWorkMailOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeregisterMailDomainOutput(v **DeregisterMailDomainOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeregisterMailDomainOutput if *v == nil { sv = &DeregisterMailDomainOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeEmailMonitoringConfigurationOutput(v **DescribeEmailMonitoringConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeEmailMonitoringConfigurationOutput if *v == nil { sv = &DescribeEmailMonitoringConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "LogGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LogGroupArn to be of type string, got %T instead", value) } sv.LogGroupArn = ptr.String(jtv) } case "RoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeGroupOutput if *v == nil { sv = &DescribeGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DisabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DisabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Email": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } sv.Email = ptr.String(jtv) } case "EnabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GroupName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityState to be of type string, got %T instead", value) } sv.State = types.EntityState(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeInboundDmarcSettingsOutput(v **DescribeInboundDmarcSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeInboundDmarcSettingsOutput if *v == nil { sv = &DescribeInboundDmarcSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Enforced": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Enforced = jtv } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeMailboxExportJobOutput(v **DescribeMailboxExportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeMailboxExportJobOutput if *v == nil { sv = &DescribeMailboxExportJobOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EndTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "EntityId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.EntityId = ptr.String(jtv) } case "ErrorInfo": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MailboxExportErrorInfo to be of type string, got %T instead", value) } sv.ErrorInfo = ptr.String(jtv) } case "EstimatedProgress": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Percentage to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.EstimatedProgress = int32(i64) } case "KmsKeyArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) } sv.KmsKeyArn = ptr.String(jtv) } case "RoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } case "S3BucketName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) } sv.S3BucketName = ptr.String(jtv) } case "S3Path": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3ObjectKey to be of type string, got %T instead", value) } sv.S3Path = ptr.String(jtv) } case "S3Prefix": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3ObjectKey to be of type string, got %T instead", value) } sv.S3Prefix = ptr.String(jtv) } case "StartTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MailboxExportJobState to be of type string, got %T instead", value) } sv.State = types.MailboxExportJobState(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeOrganizationOutput(v **DescribeOrganizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeOrganizationOutput if *v == nil { sv = &DescribeOrganizationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Alias": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OrganizationName to be of type string, got %T instead", value) } sv.Alias = ptr.String(jtv) } case "ARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) } sv.ARN = ptr.String(jtv) } case "CompletedDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CompletedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DefaultMailDomain": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.DefaultMailDomain = ptr.String(jtv) } case "DirectoryId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.DirectoryId = ptr.String(jtv) } case "DirectoryType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.DirectoryType = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "OrganizationId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OrganizationId to be of type string, got %T instead", value) } sv.OrganizationId = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.State = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(v **DescribeResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeResourceOutput if *v == nil { sv = &DescribeResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "BookingOptions": if err := awsAwsjson11_deserializeDocumentBookingOptions(&sv.BookingOptions, value); err != nil { return err } case "DisabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DisabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Email": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } sv.Email = ptr.String(jtv) } case "EnabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityState to be of type string, got %T instead", value) } sv.State = types.EntityState(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } sv.Type = types.ResourceType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeUserOutput if *v == nil { sv = &DescribeUserOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DisabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DisabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DisplayName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.DisplayName = ptr.String(jtv) } case "Email": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } sv.Email = ptr.String(jtv) } case "EnabledDate": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityState to be of type string, got %T instead", value) } sv.State = types.EntityState(jtv) } case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } case "UserRole": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserRole to be of type string, got %T instead", value) } sv.UserRole = types.UserRole(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDisassociateDelegateFromResourceOutput(v **DisassociateDelegateFromResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DisassociateDelegateFromResourceOutput if *v == nil { sv = &DisassociateDelegateFromResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDisassociateMemberFromGroupOutput(v **DisassociateMemberFromGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DisassociateMemberFromGroupOutput if *v == nil { sv = &DisassociateMemberFromGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetAccessControlEffectOutput(v **GetAccessControlEffectOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetAccessControlEffectOutput if *v == nil { sv = &GetAccessControlEffectOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessControlRuleEffect to be of type string, got %T instead", value) } sv.Effect = types.AccessControlRuleEffect(jtv) } case "MatchedRules": if err := awsAwsjson11_deserializeDocumentAccessControlRuleNameList(&sv.MatchedRules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetDefaultRetentionPolicyOutput(v **GetDefaultRetentionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetDefaultRetentionPolicyOutput if *v == nil { sv = &GetDefaultRetentionPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "FolderConfigurations": if err := awsAwsjson11_deserializeDocumentFolderConfigurations(&sv.FolderConfigurations, value); err != nil { return err } case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ShortString to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ShortString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetImpersonationRoleEffectOutput(v **GetImpersonationRoleEffectOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetImpersonationRoleEffectOutput if *v == nil { sv = &GetImpersonationRoleEffectOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessEffect to be of type string, got %T instead", value) } sv.Effect = types.AccessEffect(jtv) } case "MatchedRules": if err := awsAwsjson11_deserializeDocumentImpersonationMatchedRuleList(&sv.MatchedRules, value); err != nil { return err } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleType to be of type string, got %T instead", value) } sv.Type = types.ImpersonationRoleType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetImpersonationRoleOutput(v **GetImpersonationRoleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetImpersonationRoleOutput if *v == nil { sv = &GetImpersonationRoleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DateCreated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DateModified": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "ImpersonationRoleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleId to be of type string, got %T instead", value) } sv.ImpersonationRoleId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Rules": if err := awsAwsjson11_deserializeDocumentImpersonationRuleList(&sv.Rules, value); err != nil { return err } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImpersonationRoleType to be of type string, got %T instead", value) } sv.Type = types.ImpersonationRoleType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetMailboxDetailsOutput(v **GetMailboxDetailsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetMailboxDetailsOutput if *v == nil { sv = &GetMailboxDetailsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "MailboxQuota": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MailboxQuota to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MailboxQuota = ptr.Int32(int32(i64)) } case "MailboxSize": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.MailboxSize = f64 case string: var f64 float64 switch { case strings.EqualFold(jtv, "NaN"): f64 = math.NaN() case strings.EqualFold(jtv, "Infinity"): f64 = math.Inf(1) case strings.EqualFold(jtv, "-Infinity"): f64 = math.Inf(-1) default: return fmt.Errorf("unknown JSON number value: %s", jtv) } sv.MailboxSize = f64 default: return fmt.Errorf("expected MailboxSize to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetMailDomainOutput(v **GetMailDomainOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetMailDomainOutput if *v == nil { sv = &GetMailDomainOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DkimVerificationStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DnsRecordVerificationStatus to be of type string, got %T instead", value) } sv.DkimVerificationStatus = types.DnsRecordVerificationStatus(jtv) } case "IsDefault": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.IsDefault = jtv } case "IsTestDomain": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.IsTestDomain = jtv } case "OwnershipVerificationStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DnsRecordVerificationStatus to be of type string, got %T instead", value) } sv.OwnershipVerificationStatus = types.DnsRecordVerificationStatus(jtv) } case "Records": if err := awsAwsjson11_deserializeDocumentDnsRecords(&sv.Records, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessEffectOutput(v **GetMobileDeviceAccessEffectOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetMobileDeviceAccessEffectOutput if *v == nil { sv = &GetMobileDeviceAccessEffectOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleEffect to be of type string, got %T instead", value) } sv.Effect = types.MobileDeviceAccessRuleEffect(jtv) } case "MatchedRules": if err := awsAwsjson11_deserializeDocumentMobileDeviceAccessMatchedRuleList(&sv.MatchedRules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessOverrideOutput(v **GetMobileDeviceAccessOverrideOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetMobileDeviceAccessOverrideOutput if *v == nil { sv = &GetMobileDeviceAccessOverrideOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DateCreated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DateModified": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "DeviceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) } sv.DeviceId = ptr.String(jtv) } case "Effect": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MobileDeviceAccessRuleEffect to be of type string, got %T instead", value) } sv.Effect = types.MobileDeviceAccessRuleEffect(jtv) } case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListAccessControlRulesOutput(v **ListAccessControlRulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListAccessControlRulesOutput if *v == nil { sv = &ListAccessControlRulesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Rules": if err := awsAwsjson11_deserializeDocumentAccessControlRulesList(&sv.Rules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListAliasesOutput if *v == nil { sv = &ListAliasesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Aliases": if err := awsAwsjson11_deserializeDocumentAliases(&sv.Aliases, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListAvailabilityConfigurationsOutput(v **ListAvailabilityConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListAvailabilityConfigurationsOutput if *v == nil { sv = &ListAvailabilityConfigurationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AvailabilityConfigurations": if err := awsAwsjson11_deserializeDocumentAvailabilityConfigurationList(&sv.AvailabilityConfigurations, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListGroupMembersOutput(v **ListGroupMembersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListGroupMembersOutput if *v == nil { sv = &ListGroupMembersOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Members": if err := awsAwsjson11_deserializeDocumentMembers(&sv.Members, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListGroupsOutput if *v == nil { sv = &ListGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Groups": if err := awsAwsjson11_deserializeDocumentGroups(&sv.Groups, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListImpersonationRolesOutput(v **ListImpersonationRolesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListImpersonationRolesOutput if *v == nil { sv = &ListImpersonationRolesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Roles": if err := awsAwsjson11_deserializeDocumentImpersonationRoleList(&sv.Roles, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListMailboxExportJobsOutput(v **ListMailboxExportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListMailboxExportJobsOutput if *v == nil { sv = &ListMailboxExportJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Jobs": if err := awsAwsjson11_deserializeDocumentJobs(&sv.Jobs, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListMailboxPermissionsOutput(v **ListMailboxPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListMailboxPermissionsOutput if *v == nil { sv = &ListMailboxPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Permissions": if err := awsAwsjson11_deserializeDocumentPermissions(&sv.Permissions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListMailDomainsOutput(v **ListMailDomainsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListMailDomainsOutput if *v == nil { sv = &ListMailDomainsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "MailDomains": if err := awsAwsjson11_deserializeDocumentMailDomains(&sv.MailDomains, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessOverridesOutput(v **ListMobileDeviceAccessOverridesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListMobileDeviceAccessOverridesOutput if *v == nil { sv = &ListMobileDeviceAccessOverridesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Overrides": if err := awsAwsjson11_deserializeDocumentMobileDeviceAccessOverridesList(&sv.Overrides, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessRulesOutput(v **ListMobileDeviceAccessRulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListMobileDeviceAccessRulesOutput if *v == nil { sv = &ListMobileDeviceAccessRulesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Rules": if err := awsAwsjson11_deserializeDocumentMobileDeviceAccessRulesList(&sv.Rules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListOrganizationsOutput(v **ListOrganizationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListOrganizationsOutput if *v == nil { sv = &ListOrganizationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "OrganizationSummaries": if err := awsAwsjson11_deserializeDocumentOrganizationSummaries(&sv.OrganizationSummaries, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListResourceDelegatesOutput(v **ListResourceDelegatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListResourceDelegatesOutput if *v == nil { sv = &ListResourceDelegatesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Delegates": if err := awsAwsjson11_deserializeDocumentResourceDelegates(&sv.Delegates, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListResourcesOutput if *v == nil { sv = &ListResourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Resources": if err := awsAwsjson11_deserializeDocumentResources(&sv.Resources, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Tags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListUsersOutput if *v == nil { sv = &ListUsersOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Users": if err := awsAwsjson11_deserializeDocumentUsers(&sv.Users, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutAccessControlRuleOutput(v **PutAccessControlRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutAccessControlRuleOutput if *v == nil { sv = &PutAccessControlRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutEmailMonitoringConfigurationOutput(v **PutEmailMonitoringConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutEmailMonitoringConfigurationOutput if *v == nil { sv = &PutEmailMonitoringConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutInboundDmarcSettingsOutput(v **PutInboundDmarcSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutInboundDmarcSettingsOutput if *v == nil { sv = &PutInboundDmarcSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutMailboxPermissionsOutput(v **PutMailboxPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutMailboxPermissionsOutput if *v == nil { sv = &PutMailboxPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutMobileDeviceAccessOverrideOutput(v **PutMobileDeviceAccessOverrideOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutMobileDeviceAccessOverrideOutput if *v == nil { sv = &PutMobileDeviceAccessOverrideOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutRetentionPolicyOutput(v **PutRetentionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutRetentionPolicyOutput if *v == nil { sv = &PutRetentionPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRegisterMailDomainOutput(v **RegisterMailDomainOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *RegisterMailDomainOutput if *v == nil { sv = &RegisterMailDomainOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRegisterToWorkMailOutput(v **RegisterToWorkMailOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *RegisterToWorkMailOutput if *v == nil { sv = &RegisterToWorkMailOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentResetPasswordOutput(v **ResetPasswordOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ResetPasswordOutput if *v == nil { sv = &ResetPasswordOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentStartMailboxExportJobOutput(v **StartMailboxExportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *StartMailboxExportJobOutput if *v == nil { sv = &StartMailboxExportJobOutput{} } else { sv = *v } for key, value := range shape { switch key { case "JobId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MailboxExportJobId to be of type string, got %T instead", value) } sv.JobId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentTestAvailabilityConfigurationOutput(v **TestAvailabilityConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *TestAvailabilityConfigurationOutput if *v == nil { sv = &TestAvailabilityConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailureReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.FailureReason = ptr.String(jtv) } case "TestPassed": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.TestPassed = jtv } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateAvailabilityConfigurationOutput(v **UpdateAvailabilityConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateAvailabilityConfigurationOutput if *v == nil { sv = &UpdateAvailabilityConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateDefaultMailDomainOutput(v **UpdateDefaultMailDomainOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateDefaultMailDomainOutput if *v == nil { sv = &UpdateDefaultMailDomainOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateImpersonationRoleOutput(v **UpdateImpersonationRoleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateImpersonationRoleOutput if *v == nil { sv = &UpdateImpersonationRoleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateMailboxQuotaOutput(v **UpdateMailboxQuotaOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateMailboxQuotaOutput if *v == nil { sv = &UpdateMailboxQuotaOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateMobileDeviceAccessRuleOutput(v **UpdateMobileDeviceAccessRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateMobileDeviceAccessRuleOutput if *v == nil { sv = &UpdateMobileDeviceAccessRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdatePrimaryEmailAddressOutput(v **UpdatePrimaryEmailAddressOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdatePrimaryEmailAddressOutput if *v == nil { sv = &UpdatePrimaryEmailAddressOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateResourceOutput(v **UpdateResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateResourceOutput if *v == nil { sv = &UpdateResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil }
17,933
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package workmail provides the API client, operations, and parameter types for // Amazon WorkMail. // // WorkMail is a secure, managed business email and calendaring service with // support for existing desktop and mobile email clients. You can access your // email, contacts, and calendars using Microsoft Outlook, your browser, or other // native iOS and Android email applications. You can integrate WorkMail with your // existing corporate directory and control both the keys that encrypt your data // and the location in which your data is stored. The WorkMail API is designed for // the following scenarios: // // - Listing and describing organizations // // - Managing users // // - Managing groups // // - Managing resources // // All WorkMail API operations are Amazon-authenticated and certificate-signed. // They not only require the use of the AWS SDK, but also allow for the exclusive // use of AWS Identity and Access Management users and roles to help facilitate // access, trust, and permission policies. By creating a role and allowing an IAM // user to access the WorkMail site, the IAM user gains full administrative // visibility into the entire WorkMail organization (or as set in the IAM policy). // This includes, but is not limited to, the ability to create, update, and delete // users, groups, and resources. This allows developers to perform the scenarios // listed above, as well as give users the ability to grant access on a selective // basis using the IAM model. package workmail
33
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail 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/workmail/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 = "workmail" } 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 workmail // goModuleVersion is the tagged release for this module const goModuleVersion = "1.18.12"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/workmail/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) type awsAwsjson11_serializeOpAssociateDelegateToResource struct { } func (*awsAwsjson11_serializeOpAssociateDelegateToResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAssociateDelegateToResource) 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.(*AssociateDelegateToResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.AssociateDelegateToResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAssociateDelegateToResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAssociateMemberToGroup struct { } func (*awsAwsjson11_serializeOpAssociateMemberToGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAssociateMemberToGroup) 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.(*AssociateMemberToGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.AssociateMemberToGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAssociateMemberToGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAssumeImpersonationRole struct { } func (*awsAwsjson11_serializeOpAssumeImpersonationRole) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAssumeImpersonationRole) 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.(*AssumeImpersonationRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.AssumeImpersonationRole") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAssumeImpersonationRoleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCancelMailboxExportJob struct { } func (*awsAwsjson11_serializeOpCancelMailboxExportJob) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCancelMailboxExportJob) 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.(*CancelMailboxExportJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CancelMailboxExportJob") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCancelMailboxExportJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateAlias struct { } func (*awsAwsjson11_serializeOpCreateAlias) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateAlias) 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.(*CreateAliasInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateAlias") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateAliasInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateAvailabilityConfiguration struct { } func (*awsAwsjson11_serializeOpCreateAvailabilityConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateAvailabilityConfiguration) 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.(*CreateAvailabilityConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateAvailabilityConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateAvailabilityConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateGroup struct { } func (*awsAwsjson11_serializeOpCreateGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateGroup) 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.(*CreateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateImpersonationRole struct { } func (*awsAwsjson11_serializeOpCreateImpersonationRole) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateImpersonationRole) 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.(*CreateImpersonationRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateImpersonationRole") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateImpersonationRoleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateMobileDeviceAccessRule struct { } func (*awsAwsjson11_serializeOpCreateMobileDeviceAccessRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateMobileDeviceAccessRule) 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.(*CreateMobileDeviceAccessRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateMobileDeviceAccessRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateMobileDeviceAccessRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateOrganization struct { } func (*awsAwsjson11_serializeOpCreateOrganization) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateOrganization) 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.(*CreateOrganizationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateOrganization") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateOrganizationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateResource struct { } func (*awsAwsjson11_serializeOpCreateResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateResource) 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.(*CreateResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateUser struct { } func (*awsAwsjson11_serializeOpCreateUser) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateUser) 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.(*CreateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.CreateUser") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteAccessControlRule struct { } func (*awsAwsjson11_serializeOpDeleteAccessControlRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteAccessControlRule) 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.(*DeleteAccessControlRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteAccessControlRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteAccessControlRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteAlias struct { } func (*awsAwsjson11_serializeOpDeleteAlias) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteAlias) 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.(*DeleteAliasInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteAlias") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteAliasInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteAvailabilityConfiguration struct { } func (*awsAwsjson11_serializeOpDeleteAvailabilityConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteAvailabilityConfiguration) 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.(*DeleteAvailabilityConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteAvailabilityConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteAvailabilityConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteEmailMonitoringConfiguration struct { } func (*awsAwsjson11_serializeOpDeleteEmailMonitoringConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteEmailMonitoringConfiguration) 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.(*DeleteEmailMonitoringConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteEmailMonitoringConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteEmailMonitoringConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteGroup struct { } func (*awsAwsjson11_serializeOpDeleteGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteGroup) 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.(*DeleteGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteImpersonationRole struct { } func (*awsAwsjson11_serializeOpDeleteImpersonationRole) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteImpersonationRole) 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.(*DeleteImpersonationRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteImpersonationRole") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteImpersonationRoleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteMailboxPermissions struct { } func (*awsAwsjson11_serializeOpDeleteMailboxPermissions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteMailboxPermissions) 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.(*DeleteMailboxPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteMailboxPermissions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteMailboxPermissionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteMobileDeviceAccessOverride struct { } func (*awsAwsjson11_serializeOpDeleteMobileDeviceAccessOverride) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteMobileDeviceAccessOverride) 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.(*DeleteMobileDeviceAccessOverrideInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteMobileDeviceAccessOverride") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteMobileDeviceAccessOverrideInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteMobileDeviceAccessRule struct { } func (*awsAwsjson11_serializeOpDeleteMobileDeviceAccessRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteMobileDeviceAccessRule) 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.(*DeleteMobileDeviceAccessRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteMobileDeviceAccessRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteMobileDeviceAccessRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteOrganization struct { } func (*awsAwsjson11_serializeOpDeleteOrganization) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteOrganization) 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.(*DeleteOrganizationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteOrganization") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteOrganizationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteResource struct { } func (*awsAwsjson11_serializeOpDeleteResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteResource) 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.(*DeleteResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteRetentionPolicy struct { } func (*awsAwsjson11_serializeOpDeleteRetentionPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteRetentionPolicy) 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.(*DeleteRetentionPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteRetentionPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteRetentionPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteUser struct { } func (*awsAwsjson11_serializeOpDeleteUser) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteUser) 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.(*DeleteUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeleteUser") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeregisterFromWorkMail struct { } func (*awsAwsjson11_serializeOpDeregisterFromWorkMail) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeregisterFromWorkMail) 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.(*DeregisterFromWorkMailInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeregisterFromWorkMail") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeregisterFromWorkMailInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeregisterMailDomain struct { } func (*awsAwsjson11_serializeOpDeregisterMailDomain) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeregisterMailDomain) 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.(*DeregisterMailDomainInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DeregisterMailDomain") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeregisterMailDomainInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeEmailMonitoringConfiguration struct { } func (*awsAwsjson11_serializeOpDescribeEmailMonitoringConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeEmailMonitoringConfiguration) 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.(*DescribeEmailMonitoringConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DescribeEmailMonitoringConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeEmailMonitoringConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeGroup struct { } func (*awsAwsjson11_serializeOpDescribeGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeGroup) 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.(*DescribeGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DescribeGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeInboundDmarcSettings struct { } func (*awsAwsjson11_serializeOpDescribeInboundDmarcSettings) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeInboundDmarcSettings) 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.(*DescribeInboundDmarcSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DescribeInboundDmarcSettings") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeInboundDmarcSettingsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeMailboxExportJob struct { } func (*awsAwsjson11_serializeOpDescribeMailboxExportJob) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeMailboxExportJob) 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.(*DescribeMailboxExportJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DescribeMailboxExportJob") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeMailboxExportJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeOrganization struct { } func (*awsAwsjson11_serializeOpDescribeOrganization) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeOrganization) 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.(*DescribeOrganizationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DescribeOrganization") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeOrganizationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeResource struct { } func (*awsAwsjson11_serializeOpDescribeResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeResource) 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.(*DescribeResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DescribeResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeUser struct { } func (*awsAwsjson11_serializeOpDescribeUser) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeUser) 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.(*DescribeUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DescribeUser") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDisassociateDelegateFromResource struct { } func (*awsAwsjson11_serializeOpDisassociateDelegateFromResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDisassociateDelegateFromResource) 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.(*DisassociateDelegateFromResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DisassociateDelegateFromResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDisassociateDelegateFromResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDisassociateMemberFromGroup struct { } func (*awsAwsjson11_serializeOpDisassociateMemberFromGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDisassociateMemberFromGroup) 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.(*DisassociateMemberFromGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.DisassociateMemberFromGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDisassociateMemberFromGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetAccessControlEffect struct { } func (*awsAwsjson11_serializeOpGetAccessControlEffect) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetAccessControlEffect) 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.(*GetAccessControlEffectInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetAccessControlEffect") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetAccessControlEffectInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetDefaultRetentionPolicy struct { } func (*awsAwsjson11_serializeOpGetDefaultRetentionPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetDefaultRetentionPolicy) 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.(*GetDefaultRetentionPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetDefaultRetentionPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetDefaultRetentionPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetImpersonationRole struct { } func (*awsAwsjson11_serializeOpGetImpersonationRole) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetImpersonationRole) 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.(*GetImpersonationRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetImpersonationRole") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetImpersonationRoleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetImpersonationRoleEffect struct { } func (*awsAwsjson11_serializeOpGetImpersonationRoleEffect) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetImpersonationRoleEffect) 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.(*GetImpersonationRoleEffectInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetImpersonationRoleEffect") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetImpersonationRoleEffectInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetMailboxDetails struct { } func (*awsAwsjson11_serializeOpGetMailboxDetails) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetMailboxDetails) 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.(*GetMailboxDetailsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetMailboxDetails") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetMailboxDetailsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetMailDomain struct { } func (*awsAwsjson11_serializeOpGetMailDomain) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetMailDomain) 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.(*GetMailDomainInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetMailDomain") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetMailDomainInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetMobileDeviceAccessEffect struct { } func (*awsAwsjson11_serializeOpGetMobileDeviceAccessEffect) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetMobileDeviceAccessEffect) 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.(*GetMobileDeviceAccessEffectInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetMobileDeviceAccessEffect") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetMobileDeviceAccessEffectInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetMobileDeviceAccessOverride struct { } func (*awsAwsjson11_serializeOpGetMobileDeviceAccessOverride) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetMobileDeviceAccessOverride) 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.(*GetMobileDeviceAccessOverrideInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.GetMobileDeviceAccessOverride") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetMobileDeviceAccessOverrideInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListAccessControlRules struct { } func (*awsAwsjson11_serializeOpListAccessControlRules) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListAccessControlRules) 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.(*ListAccessControlRulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListAccessControlRules") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListAccessControlRulesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListAliases struct { } func (*awsAwsjson11_serializeOpListAliases) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListAliases) 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.(*ListAliasesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListAliases") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListAliasesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListAvailabilityConfigurations struct { } func (*awsAwsjson11_serializeOpListAvailabilityConfigurations) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListAvailabilityConfigurations) 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.(*ListAvailabilityConfigurationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListAvailabilityConfigurations") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListAvailabilityConfigurationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListGroupMembers struct { } func (*awsAwsjson11_serializeOpListGroupMembers) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListGroupMembers) 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.(*ListGroupMembersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListGroupMembers") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListGroupMembersInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListGroups struct { } func (*awsAwsjson11_serializeOpListGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListGroups) 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.(*ListGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListGroupsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListImpersonationRoles struct { } func (*awsAwsjson11_serializeOpListImpersonationRoles) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListImpersonationRoles) 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.(*ListImpersonationRolesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListImpersonationRoles") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListImpersonationRolesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListMailboxExportJobs struct { } func (*awsAwsjson11_serializeOpListMailboxExportJobs) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListMailboxExportJobs) 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.(*ListMailboxExportJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMailboxExportJobs") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListMailboxExportJobsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListMailboxPermissions struct { } func (*awsAwsjson11_serializeOpListMailboxPermissions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListMailboxPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListMailboxPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMailboxPermissions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListMailboxPermissionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListMailDomains struct { } func (*awsAwsjson11_serializeOpListMailDomains) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListMailDomains) 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.(*ListMailDomainsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMailDomains") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListMailDomainsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListMobileDeviceAccessOverrides struct { } func (*awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) 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.(*ListMobileDeviceAccessOverridesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMobileDeviceAccessOverrides") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListMobileDeviceAccessOverridesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListMobileDeviceAccessRules struct { } func (*awsAwsjson11_serializeOpListMobileDeviceAccessRules) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListMobileDeviceAccessRules) 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.(*ListMobileDeviceAccessRulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMobileDeviceAccessRules") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListMobileDeviceAccessRulesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListOrganizations struct { } func (*awsAwsjson11_serializeOpListOrganizations) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListOrganizations) 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.(*ListOrganizationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListOrganizations") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListOrganizationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListResourceDelegates struct { } func (*awsAwsjson11_serializeOpListResourceDelegates) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListResourceDelegates) 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.(*ListResourceDelegatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListResourceDelegates") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListResourceDelegatesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListResources struct { } func (*awsAwsjson11_serializeOpListResources) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListResources) 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.(*ListResourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListResources") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListResourcesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListTagsForResource struct { } func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListTagsForResource) 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.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListUsers struct { } func (*awsAwsjson11_serializeOpListUsers) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListUsers) 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.(*ListUsersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListUsers") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListUsersInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutAccessControlRule struct { } func (*awsAwsjson11_serializeOpPutAccessControlRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutAccessControlRule) 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.(*PutAccessControlRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.PutAccessControlRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutAccessControlRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutEmailMonitoringConfiguration struct { } func (*awsAwsjson11_serializeOpPutEmailMonitoringConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutEmailMonitoringConfiguration) 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.(*PutEmailMonitoringConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.PutEmailMonitoringConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutEmailMonitoringConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutInboundDmarcSettings struct { } func (*awsAwsjson11_serializeOpPutInboundDmarcSettings) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutInboundDmarcSettings) 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.(*PutInboundDmarcSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.PutInboundDmarcSettings") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutInboundDmarcSettingsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutMailboxPermissions struct { } func (*awsAwsjson11_serializeOpPutMailboxPermissions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutMailboxPermissions) 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.(*PutMailboxPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.PutMailboxPermissions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutMailboxPermissionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutMobileDeviceAccessOverride struct { } func (*awsAwsjson11_serializeOpPutMobileDeviceAccessOverride) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutMobileDeviceAccessOverride) 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.(*PutMobileDeviceAccessOverrideInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.PutMobileDeviceAccessOverride") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutMobileDeviceAccessOverrideInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutRetentionPolicy struct { } func (*awsAwsjson11_serializeOpPutRetentionPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutRetentionPolicy) 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.(*PutRetentionPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.PutRetentionPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutRetentionPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpRegisterMailDomain struct { } func (*awsAwsjson11_serializeOpRegisterMailDomain) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRegisterMailDomain) 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.(*RegisterMailDomainInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.RegisterMailDomain") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRegisterMailDomainInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpRegisterToWorkMail struct { } func (*awsAwsjson11_serializeOpRegisterToWorkMail) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRegisterToWorkMail) 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.(*RegisterToWorkMailInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.RegisterToWorkMail") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRegisterToWorkMailInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpResetPassword struct { } func (*awsAwsjson11_serializeOpResetPassword) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpResetPassword) 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.(*ResetPasswordInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ResetPassword") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentResetPasswordInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpStartMailboxExportJob struct { } func (*awsAwsjson11_serializeOpStartMailboxExportJob) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpStartMailboxExportJob) 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.(*StartMailboxExportJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.StartMailboxExportJob") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentStartMailboxExportJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpTagResource struct { } func (*awsAwsjson11_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpTagResource) 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.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpTestAvailabilityConfiguration struct { } func (*awsAwsjson11_serializeOpTestAvailabilityConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpTestAvailabilityConfiguration) 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.(*TestAvailabilityConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.TestAvailabilityConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentTestAvailabilityConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUntagResource struct { } func (*awsAwsjson11_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUntagResource) 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.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateAvailabilityConfiguration struct { } func (*awsAwsjson11_serializeOpUpdateAvailabilityConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateAvailabilityConfiguration) 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.(*UpdateAvailabilityConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UpdateAvailabilityConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateAvailabilityConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateDefaultMailDomain struct { } func (*awsAwsjson11_serializeOpUpdateDefaultMailDomain) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateDefaultMailDomain) 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.(*UpdateDefaultMailDomainInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UpdateDefaultMailDomain") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateDefaultMailDomainInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateImpersonationRole struct { } func (*awsAwsjson11_serializeOpUpdateImpersonationRole) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateImpersonationRole) 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.(*UpdateImpersonationRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UpdateImpersonationRole") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateImpersonationRoleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateMailboxQuota struct { } func (*awsAwsjson11_serializeOpUpdateMailboxQuota) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateMailboxQuota) 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.(*UpdateMailboxQuotaInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UpdateMailboxQuota") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateMailboxQuotaInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateMobileDeviceAccessRule struct { } func (*awsAwsjson11_serializeOpUpdateMobileDeviceAccessRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateMobileDeviceAccessRule) 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.(*UpdateMobileDeviceAccessRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UpdateMobileDeviceAccessRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateMobileDeviceAccessRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdatePrimaryEmailAddress struct { } func (*awsAwsjson11_serializeOpUpdatePrimaryEmailAddress) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdatePrimaryEmailAddress) 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.(*UpdatePrimaryEmailAddressInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UpdatePrimaryEmailAddress") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdatePrimaryEmailAddressInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateResource struct { } func (*awsAwsjson11_serializeOpUpdateResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateResource) 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.(*UpdateResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.UpdateResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentActionsList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentBookingOptions(v *types.BookingOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AutoAcceptRequests { ok := object.Key("AutoAcceptRequests") ok.Boolean(v.AutoAcceptRequests) } if v.AutoDeclineConflictingRequests { ok := object.Key("AutoDeclineConflictingRequests") ok.Boolean(v.AutoDeclineConflictingRequests) } if v.AutoDeclineRecurringRequests { ok := object.Key("AutoDeclineRecurringRequests") ok.Boolean(v.AutoDeclineRecurringRequests) } return nil } func awsAwsjson11_serializeDocumentDeviceModelList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentDeviceOperatingSystemList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentDeviceTypeList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentDeviceUserAgentList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentDomain(v *types.Domain, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.HostedZoneId != nil { ok := object.Key("HostedZoneId") ok.String(*v.HostedZoneId) } return nil } func awsAwsjson11_serializeDocumentDomains(v []types.Domain, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDomain(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentEwsAvailabilityProvider(v *types.EwsAvailabilityProvider, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EwsEndpoint != nil { ok := object.Key("EwsEndpoint") ok.String(*v.EwsEndpoint) } if v.EwsPassword != nil { ok := object.Key("EwsPassword") ok.String(*v.EwsPassword) } if v.EwsUsername != nil { ok := object.Key("EwsUsername") ok.String(*v.EwsUsername) } return nil } func awsAwsjson11_serializeDocumentFolderConfiguration(v *types.FolderConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if len(v.Name) > 0 { ok := object.Key("Name") ok.String(string(v.Name)) } if v.Period != nil { ok := object.Key("Period") ok.Integer(*v.Period) } return nil } func awsAwsjson11_serializeDocumentFolderConfigurations(v []types.FolderConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentFolderConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentImpersonationRoleIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentImpersonationRule(v *types.ImpersonationRule, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if len(v.Effect) > 0 { ok := object.Key("Effect") ok.String(string(v.Effect)) } if v.ImpersonationRuleId != nil { ok := object.Key("ImpersonationRuleId") ok.String(*v.ImpersonationRuleId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.NotTargetUsers != nil { ok := object.Key("NotTargetUsers") if err := awsAwsjson11_serializeDocumentTargetUsers(v.NotTargetUsers, ok); err != nil { return err } } if v.TargetUsers != nil { ok := object.Key("TargetUsers") if err := awsAwsjson11_serializeDocumentTargetUsers(v.TargetUsers, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentImpersonationRuleList(v []types.ImpersonationRule, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentImpersonationRule(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentIpRangeList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentLambdaAvailabilityProvider(v *types.LambdaAvailabilityProvider, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LambdaArn != nil { ok := object.Key("LambdaArn") ok.String(*v.LambdaArn) } return nil } func awsAwsjson11_serializeDocumentPermissionValues(v []types.PermissionType, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentTargetUsers(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentUserIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeOpDocumentAssociateDelegateToResourceInput(v *AssociateDelegateToResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentAssociateMemberToGroupInput(v *AssociateMemberToGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.MemberId != nil { ok := object.Key("MemberId") ok.String(*v.MemberId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentAssumeImpersonationRoleInput(v *AssumeImpersonationRoleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImpersonationRoleId != nil { ok := object.Key("ImpersonationRoleId") ok.String(*v.ImpersonationRoleId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentCancelMailboxExportJobInput(v *CancelMailboxExportJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.JobId != nil { ok := object.Key("JobId") ok.String(*v.JobId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentCreateAliasInput(v *CreateAliasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Alias != nil { ok := object.Key("Alias") ok.String(*v.Alias) } if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentCreateAvailabilityConfigurationInput(v *CreateAvailabilityConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.EwsProvider != nil { ok := object.Key("EwsProvider") if err := awsAwsjson11_serializeDocumentEwsAvailabilityProvider(v.EwsProvider, ok); err != nil { return err } } if v.LambdaProvider != nil { ok := object.Key("LambdaProvider") if err := awsAwsjson11_serializeDocumentLambdaAvailabilityProvider(v.LambdaProvider, ok); err != nil { return err } } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentCreateGroupInput(v *CreateGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentCreateImpersonationRoleInput(v *CreateImpersonationRoleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.Rules != nil { ok := object.Key("Rules") if err := awsAwsjson11_serializeDocumentImpersonationRuleList(v.Rules, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeOpDocumentCreateMobileDeviceAccessRuleInput(v *CreateMobileDeviceAccessRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DeviceModels != nil { ok := object.Key("DeviceModels") if err := awsAwsjson11_serializeDocumentDeviceModelList(v.DeviceModels, ok); err != nil { return err } } if v.DeviceOperatingSystems != nil { ok := object.Key("DeviceOperatingSystems") if err := awsAwsjson11_serializeDocumentDeviceOperatingSystemList(v.DeviceOperatingSystems, ok); err != nil { return err } } if v.DeviceTypes != nil { ok := object.Key("DeviceTypes") if err := awsAwsjson11_serializeDocumentDeviceTypeList(v.DeviceTypes, ok); err != nil { return err } } if v.DeviceUserAgents != nil { ok := object.Key("DeviceUserAgents") if err := awsAwsjson11_serializeDocumentDeviceUserAgentList(v.DeviceUserAgents, ok); err != nil { return err } } if len(v.Effect) > 0 { ok := object.Key("Effect") ok.String(string(v.Effect)) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.NotDeviceModels != nil { ok := object.Key("NotDeviceModels") if err := awsAwsjson11_serializeDocumentDeviceModelList(v.NotDeviceModels, ok); err != nil { return err } } if v.NotDeviceOperatingSystems != nil { ok := object.Key("NotDeviceOperatingSystems") if err := awsAwsjson11_serializeDocumentDeviceOperatingSystemList(v.NotDeviceOperatingSystems, ok); err != nil { return err } } if v.NotDeviceTypes != nil { ok := object.Key("NotDeviceTypes") if err := awsAwsjson11_serializeDocumentDeviceTypeList(v.NotDeviceTypes, ok); err != nil { return err } } if v.NotDeviceUserAgents != nil { ok := object.Key("NotDeviceUserAgents") if err := awsAwsjson11_serializeDocumentDeviceUserAgentList(v.NotDeviceUserAgents, ok); err != nil { return err } } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentCreateOrganizationInput(v *CreateOrganizationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Alias != nil { ok := object.Key("Alias") ok.String(*v.Alias) } if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } if v.Domains != nil { ok := object.Key("Domains") if err := awsAwsjson11_serializeDocumentDomains(v.Domains, ok); err != nil { return err } } if v.EnableInteroperability { ok := object.Key("EnableInteroperability") ok.Boolean(v.EnableInteroperability) } if v.KmsKeyArn != nil { ok := object.Key("KmsKeyArn") ok.String(*v.KmsKeyArn) } return nil } func awsAwsjson11_serializeOpDocumentCreateResourceInput(v *CreateResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DisplayName != nil { ok := object.Key("DisplayName") ok.String(*v.DisplayName) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.Password != nil { ok := object.Key("Password") ok.String(*v.Password) } return nil } func awsAwsjson11_serializeOpDocumentDeleteAccessControlRuleInput(v *DeleteAccessControlRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteAliasInput(v *DeleteAliasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Alias != nil { ok := object.Key("Alias") ok.String(*v.Alias) } if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteAvailabilityConfigurationInput(v *DeleteAvailabilityConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteEmailMonitoringConfigurationInput(v *DeleteEmailMonitoringConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteGroupInput(v *DeleteGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteImpersonationRoleInput(v *DeleteImpersonationRoleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImpersonationRoleId != nil { ok := object.Key("ImpersonationRoleId") ok.String(*v.ImpersonationRoleId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteMailboxPermissionsInput(v *DeleteMailboxPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.GranteeId != nil { ok := object.Key("GranteeId") ok.String(*v.GranteeId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteMobileDeviceAccessOverrideInput(v *DeleteMobileDeviceAccessOverrideInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeviceId != nil { ok := object.Key("DeviceId") ok.String(*v.DeviceId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteMobileDeviceAccessRuleInput(v *DeleteMobileDeviceAccessRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MobileDeviceAccessRuleId != nil { ok := object.Key("MobileDeviceAccessRuleId") ok.String(*v.MobileDeviceAccessRuleId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteOrganizationInput(v *DeleteOrganizationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } { ok := object.Key("DeleteDirectory") ok.Boolean(v.DeleteDirectory) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteResourceInput(v *DeleteResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteRetentionPolicyInput(v *DeleteRetentionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteUserInput(v *DeleteUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentDeregisterFromWorkMailInput(v *DeregisterFromWorkMailInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDeregisterMailDomainInput(v *DeregisterMailDomainInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeEmailMonitoringConfigurationInput(v *DescribeEmailMonitoringConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeGroupInput(v *DescribeGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeInboundDmarcSettingsInput(v *DescribeInboundDmarcSettingsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeMailboxExportJobInput(v *DescribeMailboxExportJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.JobId != nil { ok := object.Key("JobId") ok.String(*v.JobId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeOrganizationInput(v *DescribeOrganizationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeResourceInput(v *DescribeResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeUserInput(v *DescribeUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentDisassociateDelegateFromResourceInput(v *DisassociateDelegateFromResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDisassociateMemberFromGroupInput(v *DisassociateMemberFromGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.MemberId != nil { ok := object.Key("MemberId") ok.String(*v.MemberId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentGetAccessControlEffectInput(v *GetAccessControlEffectInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Action != nil { ok := object.Key("Action") ok.String(*v.Action) } if v.ImpersonationRoleId != nil { ok := object.Key("ImpersonationRoleId") ok.String(*v.ImpersonationRoleId) } if v.IpAddress != nil { ok := object.Key("IpAddress") ok.String(*v.IpAddress) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentGetDefaultRetentionPolicyInput(v *GetDefaultRetentionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentGetImpersonationRoleEffectInput(v *GetImpersonationRoleEffectInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImpersonationRoleId != nil { ok := object.Key("ImpersonationRoleId") ok.String(*v.ImpersonationRoleId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.TargetUser != nil { ok := object.Key("TargetUser") ok.String(*v.TargetUser) } return nil } func awsAwsjson11_serializeOpDocumentGetImpersonationRoleInput(v *GetImpersonationRoleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImpersonationRoleId != nil { ok := object.Key("ImpersonationRoleId") ok.String(*v.ImpersonationRoleId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentGetMailboxDetailsInput(v *GetMailboxDetailsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentGetMailDomainInput(v *GetMailDomainInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentGetMobileDeviceAccessEffectInput(v *GetMobileDeviceAccessEffectInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeviceModel != nil { ok := object.Key("DeviceModel") ok.String(*v.DeviceModel) } if v.DeviceOperatingSystem != nil { ok := object.Key("DeviceOperatingSystem") ok.String(*v.DeviceOperatingSystem) } if v.DeviceType != nil { ok := object.Key("DeviceType") ok.String(*v.DeviceType) } if v.DeviceUserAgent != nil { ok := object.Key("DeviceUserAgent") ok.String(*v.DeviceUserAgent) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentGetMobileDeviceAccessOverrideInput(v *GetMobileDeviceAccessOverrideInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeviceId != nil { ok := object.Key("DeviceId") ok.String(*v.DeviceId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentListAccessControlRulesInput(v *ListAccessControlRulesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListAliasesInput(v *ListAliasesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListAvailabilityConfigurationsInput(v *ListAvailabilityConfigurationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListGroupMembersInput(v *ListGroupMembersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListGroupsInput(v *ListGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListImpersonationRolesInput(v *ListImpersonationRolesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListMailboxExportJobsInput(v *ListMailboxExportJobsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListMailboxPermissionsInput(v *ListMailboxPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListMailDomainsInput(v *ListMailDomainsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListMobileDeviceAccessOverridesInput(v *ListMobileDeviceAccessOverridesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeviceId != nil { ok := object.Key("DeviceId") ok.String(*v.DeviceId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentListMobileDeviceAccessRulesInput(v *ListMobileDeviceAccessRulesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListOrganizationsInput(v *ListOrganizationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListResourceDelegatesInput(v *ListResourceDelegatesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentListResourcesInput(v *ListResourcesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeOpDocumentListUsersInput(v *ListUsersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentPutAccessControlRuleInput(v *PutAccessControlRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Actions != nil { ok := object.Key("Actions") if err := awsAwsjson11_serializeDocumentActionsList(v.Actions, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if len(v.Effect) > 0 { ok := object.Key("Effect") ok.String(string(v.Effect)) } if v.ImpersonationRoleIds != nil { ok := object.Key("ImpersonationRoleIds") if err := awsAwsjson11_serializeDocumentImpersonationRoleIdList(v.ImpersonationRoleIds, ok); err != nil { return err } } if v.IpRanges != nil { ok := object.Key("IpRanges") if err := awsAwsjson11_serializeDocumentIpRangeList(v.IpRanges, ok); err != nil { return err } } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.NotActions != nil { ok := object.Key("NotActions") if err := awsAwsjson11_serializeDocumentActionsList(v.NotActions, ok); err != nil { return err } } if v.NotImpersonationRoleIds != nil { ok := object.Key("NotImpersonationRoleIds") if err := awsAwsjson11_serializeDocumentImpersonationRoleIdList(v.NotImpersonationRoleIds, ok); err != nil { return err } } if v.NotIpRanges != nil { ok := object.Key("NotIpRanges") if err := awsAwsjson11_serializeDocumentIpRangeList(v.NotIpRanges, ok); err != nil { return err } } if v.NotUserIds != nil { ok := object.Key("NotUserIds") if err := awsAwsjson11_serializeDocumentUserIdList(v.NotUserIds, ok); err != nil { return err } } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserIds != nil { ok := object.Key("UserIds") if err := awsAwsjson11_serializeDocumentUserIdList(v.UserIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentPutEmailMonitoringConfigurationInput(v *PutEmailMonitoringConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LogGroupArn != nil { ok := object.Key("LogGroupArn") ok.String(*v.LogGroupArn) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } return nil } func awsAwsjson11_serializeOpDocumentPutInboundDmarcSettingsInput(v *PutInboundDmarcSettingsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Enforced != nil { ok := object.Key("Enforced") ok.Boolean(*v.Enforced) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentPutMailboxPermissionsInput(v *PutMailboxPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.GranteeId != nil { ok := object.Key("GranteeId") ok.String(*v.GranteeId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.PermissionValues != nil { ok := object.Key("PermissionValues") if err := awsAwsjson11_serializeDocumentPermissionValues(v.PermissionValues, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentPutMobileDeviceAccessOverrideInput(v *PutMobileDeviceAccessOverrideInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DeviceId != nil { ok := object.Key("DeviceId") ok.String(*v.DeviceId) } if len(v.Effect) > 0 { ok := object.Key("Effect") ok.String(string(v.Effect)) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentPutRetentionPolicyInput(v *PutRetentionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.FolderConfigurations != nil { ok := object.Key("FolderConfigurations") if err := awsAwsjson11_serializeDocumentFolderConfigurations(v.FolderConfigurations, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentRegisterMailDomainInput(v *RegisterMailDomainInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentRegisterToWorkMailInput(v *RegisterToWorkMailInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Email != nil { ok := object.Key("Email") ok.String(*v.Email) } if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentResetPasswordInput(v *ResetPasswordInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.Password != nil { ok := object.Key("Password") ok.String(*v.Password) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentStartMailboxExportJobInput(v *StartMailboxExportJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.KmsKeyArn != nil { ok := object.Key("KmsKeyArn") ok.String(*v.KmsKeyArn) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.S3BucketName != nil { ok := object.Key("S3BucketName") ok.String(*v.S3BucketName) } if v.S3Prefix != nil { ok := object.Key("S3Prefix") ok.String(*v.S3Prefix) } return nil } func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentTestAvailabilityConfigurationInput(v *TestAvailabilityConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.EwsProvider != nil { ok := object.Key("EwsProvider") if err := awsAwsjson11_serializeDocumentEwsAvailabilityProvider(v.EwsProvider, ok); err != nil { return err } } if v.LambdaProvider != nil { ok := object.Key("LambdaProvider") if err := awsAwsjson11_serializeDocumentLambdaAvailabilityProvider(v.LambdaProvider, ok); err != nil { return err } } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateAvailabilityConfigurationInput(v *UpdateAvailabilityConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.EwsProvider != nil { ok := object.Key("EwsProvider") if err := awsAwsjson11_serializeDocumentEwsAvailabilityProvider(v.EwsProvider, ok); err != nil { return err } } if v.LambdaProvider != nil { ok := object.Key("LambdaProvider") if err := awsAwsjson11_serializeDocumentLambdaAvailabilityProvider(v.LambdaProvider, ok); err != nil { return err } } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentUpdateDefaultMailDomainInput(v *UpdateDefaultMailDomainInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentUpdateImpersonationRoleInput(v *UpdateImpersonationRoleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.ImpersonationRoleId != nil { ok := object.Key("ImpersonationRoleId") ok.String(*v.ImpersonationRoleId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.Rules != nil { ok := object.Key("Rules") if err := awsAwsjson11_serializeDocumentImpersonationRuleList(v.Rules, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeOpDocumentUpdateMailboxQuotaInput(v *UpdateMailboxQuotaInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MailboxQuota != nil { ok := object.Key("MailboxQuota") ok.Integer(*v.MailboxQuota) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentUpdateMobileDeviceAccessRuleInput(v *UpdateMobileDeviceAccessRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DeviceModels != nil { ok := object.Key("DeviceModels") if err := awsAwsjson11_serializeDocumentDeviceModelList(v.DeviceModels, ok); err != nil { return err } } if v.DeviceOperatingSystems != nil { ok := object.Key("DeviceOperatingSystems") if err := awsAwsjson11_serializeDocumentDeviceOperatingSystemList(v.DeviceOperatingSystems, ok); err != nil { return err } } if v.DeviceTypes != nil { ok := object.Key("DeviceTypes") if err := awsAwsjson11_serializeDocumentDeviceTypeList(v.DeviceTypes, ok); err != nil { return err } } if v.DeviceUserAgents != nil { ok := object.Key("DeviceUserAgents") if err := awsAwsjson11_serializeDocumentDeviceUserAgentList(v.DeviceUserAgents, ok); err != nil { return err } } if len(v.Effect) > 0 { ok := object.Key("Effect") ok.String(string(v.Effect)) } if v.MobileDeviceAccessRuleId != nil { ok := object.Key("MobileDeviceAccessRuleId") ok.String(*v.MobileDeviceAccessRuleId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.NotDeviceModels != nil { ok := object.Key("NotDeviceModels") if err := awsAwsjson11_serializeDocumentDeviceModelList(v.NotDeviceModels, ok); err != nil { return err } } if v.NotDeviceOperatingSystems != nil { ok := object.Key("NotDeviceOperatingSystems") if err := awsAwsjson11_serializeDocumentDeviceOperatingSystemList(v.NotDeviceOperatingSystems, ok); err != nil { return err } } if v.NotDeviceTypes != nil { ok := object.Key("NotDeviceTypes") if err := awsAwsjson11_serializeDocumentDeviceTypeList(v.NotDeviceTypes, ok); err != nil { return err } } if v.NotDeviceUserAgents != nil { ok := object.Key("NotDeviceUserAgents") if err := awsAwsjson11_serializeDocumentDeviceUserAgentList(v.NotDeviceUserAgents, ok); err != nil { return err } } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentUpdatePrimaryEmailAddressInput(v *UpdatePrimaryEmailAddressInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Email != nil { ok := object.Key("Email") ok.String(*v.Email) } if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } return nil } func awsAwsjson11_serializeOpDocumentUpdateResourceInput(v *UpdateResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BookingOptions != nil { ok := object.Key("BookingOptions") if err := awsAwsjson11_serializeDocumentBookingOptions(v.BookingOptions, ok); err != nil { return err } } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil }
6,698
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmail import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/workmail/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAssociateDelegateToResource struct { } func (*validateOpAssociateDelegateToResource) ID() string { return "OperationInputValidation" } func (m *validateOpAssociateDelegateToResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociateDelegateToResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociateDelegateToResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAssociateMemberToGroup struct { } func (*validateOpAssociateMemberToGroup) ID() string { return "OperationInputValidation" } func (m *validateOpAssociateMemberToGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociateMemberToGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociateMemberToGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAssumeImpersonationRole struct { } func (*validateOpAssumeImpersonationRole) ID() string { return "OperationInputValidation" } func (m *validateOpAssumeImpersonationRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssumeImpersonationRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssumeImpersonationRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCancelMailboxExportJob struct { } func (*validateOpCancelMailboxExportJob) ID() string { return "OperationInputValidation" } func (m *validateOpCancelMailboxExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CancelMailboxExportJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCancelMailboxExportJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateAlias struct { } func (*validateOpCreateAlias) ID() string { return "OperationInputValidation" } func (m *validateOpCreateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateAvailabilityConfiguration struct { } func (*validateOpCreateAvailabilityConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpCreateAvailabilityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateAvailabilityConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateAvailabilityConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateGroup struct { } func (*validateOpCreateGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateImpersonationRole struct { } func (*validateOpCreateImpersonationRole) ID() string { return "OperationInputValidation" } func (m *validateOpCreateImpersonationRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateImpersonationRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateImpersonationRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateMobileDeviceAccessRule struct { } func (*validateOpCreateMobileDeviceAccessRule) ID() string { return "OperationInputValidation" } func (m *validateOpCreateMobileDeviceAccessRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateMobileDeviceAccessRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateMobileDeviceAccessRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateOrganization struct { } func (*validateOpCreateOrganization) ID() string { return "OperationInputValidation" } func (m *validateOpCreateOrganization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateOrganizationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateOrganizationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateResource struct { } func (*validateOpCreateResource) ID() string { return "OperationInputValidation" } func (m *validateOpCreateResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateUser struct { } func (*validateOpCreateUser) ID() string { return "OperationInputValidation" } func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteAccessControlRule struct { } func (*validateOpDeleteAccessControlRule) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteAccessControlRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteAccessControlRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteAccessControlRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteAlias struct { } func (*validateOpDeleteAlias) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteAvailabilityConfiguration struct { } func (*validateOpDeleteAvailabilityConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteAvailabilityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteAvailabilityConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteAvailabilityConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteEmailMonitoringConfiguration struct { } func (*validateOpDeleteEmailMonitoringConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteEmailMonitoringConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteEmailMonitoringConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteEmailMonitoringConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteGroup struct { } func (*validateOpDeleteGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteImpersonationRole struct { } func (*validateOpDeleteImpersonationRole) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteImpersonationRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteImpersonationRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteImpersonationRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteMailboxPermissions struct { } func (*validateOpDeleteMailboxPermissions) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteMailboxPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteMailboxPermissionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteMailboxPermissionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteMobileDeviceAccessOverride struct { } func (*validateOpDeleteMobileDeviceAccessOverride) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteMobileDeviceAccessOverride) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteMobileDeviceAccessOverrideInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteMobileDeviceAccessOverrideInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteMobileDeviceAccessRule struct { } func (*validateOpDeleteMobileDeviceAccessRule) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteMobileDeviceAccessRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteMobileDeviceAccessRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteMobileDeviceAccessRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteOrganization struct { } func (*validateOpDeleteOrganization) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteOrganization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteOrganizationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteOrganizationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteResource struct { } func (*validateOpDeleteResource) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRetentionPolicy struct { } func (*validateOpDeleteRetentionPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRetentionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRetentionPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRetentionPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteUser struct { } func (*validateOpDeleteUser) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeregisterFromWorkMail struct { } func (*validateOpDeregisterFromWorkMail) ID() string { return "OperationInputValidation" } func (m *validateOpDeregisterFromWorkMail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeregisterFromWorkMailInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeregisterFromWorkMailInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeregisterMailDomain struct { } func (*validateOpDeregisterMailDomain) ID() string { return "OperationInputValidation" } func (m *validateOpDeregisterMailDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeregisterMailDomainInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeregisterMailDomainInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeEmailMonitoringConfiguration struct { } func (*validateOpDescribeEmailMonitoringConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeEmailMonitoringConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeEmailMonitoringConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeEmailMonitoringConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeGroup struct { } func (*validateOpDescribeGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeInboundDmarcSettings struct { } func (*validateOpDescribeInboundDmarcSettings) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeInboundDmarcSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeInboundDmarcSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeInboundDmarcSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeMailboxExportJob struct { } func (*validateOpDescribeMailboxExportJob) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeMailboxExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeMailboxExportJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeMailboxExportJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeOrganization struct { } func (*validateOpDescribeOrganization) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeOrganization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeOrganizationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeOrganizationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeResource struct { } func (*validateOpDescribeResource) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeUser struct { } func (*validateOpDescribeUser) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDisassociateDelegateFromResource struct { } func (*validateOpDisassociateDelegateFromResource) ID() string { return "OperationInputValidation" } func (m *validateOpDisassociateDelegateFromResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DisassociateDelegateFromResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDisassociateDelegateFromResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDisassociateMemberFromGroup struct { } func (*validateOpDisassociateMemberFromGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDisassociateMemberFromGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DisassociateMemberFromGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDisassociateMemberFromGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetAccessControlEffect struct { } func (*validateOpGetAccessControlEffect) ID() string { return "OperationInputValidation" } func (m *validateOpGetAccessControlEffect) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetAccessControlEffectInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetAccessControlEffectInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetDefaultRetentionPolicy struct { } func (*validateOpGetDefaultRetentionPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetDefaultRetentionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetDefaultRetentionPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetDefaultRetentionPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetImpersonationRoleEffect struct { } func (*validateOpGetImpersonationRoleEffect) ID() string { return "OperationInputValidation" } func (m *validateOpGetImpersonationRoleEffect) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetImpersonationRoleEffectInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetImpersonationRoleEffectInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetImpersonationRole struct { } func (*validateOpGetImpersonationRole) ID() string { return "OperationInputValidation" } func (m *validateOpGetImpersonationRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetImpersonationRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetImpersonationRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetMailboxDetails struct { } func (*validateOpGetMailboxDetails) ID() string { return "OperationInputValidation" } func (m *validateOpGetMailboxDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetMailboxDetailsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetMailboxDetailsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetMailDomain struct { } func (*validateOpGetMailDomain) ID() string { return "OperationInputValidation" } func (m *validateOpGetMailDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetMailDomainInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetMailDomainInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetMobileDeviceAccessEffect struct { } func (*validateOpGetMobileDeviceAccessEffect) ID() string { return "OperationInputValidation" } func (m *validateOpGetMobileDeviceAccessEffect) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetMobileDeviceAccessEffectInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetMobileDeviceAccessEffectInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetMobileDeviceAccessOverride struct { } func (*validateOpGetMobileDeviceAccessOverride) ID() string { return "OperationInputValidation" } func (m *validateOpGetMobileDeviceAccessOverride) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetMobileDeviceAccessOverrideInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetMobileDeviceAccessOverrideInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAccessControlRules struct { } func (*validateOpListAccessControlRules) ID() string { return "OperationInputValidation" } func (m *validateOpListAccessControlRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAccessControlRulesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAccessControlRulesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAliases struct { } func (*validateOpListAliases) ID() string { return "OperationInputValidation" } func (m *validateOpListAliases) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAliasesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAliasesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAvailabilityConfigurations struct { } func (*validateOpListAvailabilityConfigurations) ID() string { return "OperationInputValidation" } func (m *validateOpListAvailabilityConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAvailabilityConfigurationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAvailabilityConfigurationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroupMembers struct { } func (*validateOpListGroupMembers) ID() string { return "OperationInputValidation" } func (m *validateOpListGroupMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupMembersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupMembersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroups struct { } func (*validateOpListGroups) ID() string { return "OperationInputValidation" } func (m *validateOpListGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListImpersonationRoles struct { } func (*validateOpListImpersonationRoles) ID() string { return "OperationInputValidation" } func (m *validateOpListImpersonationRoles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListImpersonationRolesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListImpersonationRolesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListMailboxExportJobs struct { } func (*validateOpListMailboxExportJobs) ID() string { return "OperationInputValidation" } func (m *validateOpListMailboxExportJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListMailboxExportJobsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListMailboxExportJobsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListMailboxPermissions struct { } func (*validateOpListMailboxPermissions) ID() string { return "OperationInputValidation" } func (m *validateOpListMailboxPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListMailboxPermissionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListMailboxPermissionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListMailDomains struct { } func (*validateOpListMailDomains) ID() string { return "OperationInputValidation" } func (m *validateOpListMailDomains) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListMailDomainsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListMailDomainsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListMobileDeviceAccessOverrides struct { } func (*validateOpListMobileDeviceAccessOverrides) ID() string { return "OperationInputValidation" } func (m *validateOpListMobileDeviceAccessOverrides) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListMobileDeviceAccessOverridesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListMobileDeviceAccessOverridesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListMobileDeviceAccessRules struct { } func (*validateOpListMobileDeviceAccessRules) ID() string { return "OperationInputValidation" } func (m *validateOpListMobileDeviceAccessRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListMobileDeviceAccessRulesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListMobileDeviceAccessRulesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListResourceDelegates struct { } func (*validateOpListResourceDelegates) ID() string { return "OperationInputValidation" } func (m *validateOpListResourceDelegates) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListResourceDelegatesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListResourceDelegatesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListResources struct { } func (*validateOpListResources) ID() string { return "OperationInputValidation" } func (m *validateOpListResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListResourcesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListResourcesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListUsers struct { } func (*validateOpListUsers) ID() string { return "OperationInputValidation" } func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListUsersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListUsersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutAccessControlRule struct { } func (*validateOpPutAccessControlRule) ID() string { return "OperationInputValidation" } func (m *validateOpPutAccessControlRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutAccessControlRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutAccessControlRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutEmailMonitoringConfiguration struct { } func (*validateOpPutEmailMonitoringConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpPutEmailMonitoringConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutEmailMonitoringConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutEmailMonitoringConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutInboundDmarcSettings struct { } func (*validateOpPutInboundDmarcSettings) ID() string { return "OperationInputValidation" } func (m *validateOpPutInboundDmarcSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutInboundDmarcSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutInboundDmarcSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutMailboxPermissions struct { } func (*validateOpPutMailboxPermissions) ID() string { return "OperationInputValidation" } func (m *validateOpPutMailboxPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutMailboxPermissionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutMailboxPermissionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutMobileDeviceAccessOverride struct { } func (*validateOpPutMobileDeviceAccessOverride) ID() string { return "OperationInputValidation" } func (m *validateOpPutMobileDeviceAccessOverride) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutMobileDeviceAccessOverrideInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutMobileDeviceAccessOverrideInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutRetentionPolicy struct { } func (*validateOpPutRetentionPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutRetentionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutRetentionPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutRetentionPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRegisterMailDomain struct { } func (*validateOpRegisterMailDomain) ID() string { return "OperationInputValidation" } func (m *validateOpRegisterMailDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RegisterMailDomainInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRegisterMailDomainInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRegisterToWorkMail struct { } func (*validateOpRegisterToWorkMail) ID() string { return "OperationInputValidation" } func (m *validateOpRegisterToWorkMail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RegisterToWorkMailInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRegisterToWorkMailInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpResetPassword struct { } func (*validateOpResetPassword) ID() string { return "OperationInputValidation" } func (m *validateOpResetPassword) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ResetPasswordInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpResetPasswordInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartMailboxExportJob struct { } func (*validateOpStartMailboxExportJob) ID() string { return "OperationInputValidation" } func (m *validateOpStartMailboxExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartMailboxExportJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartMailboxExportJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTestAvailabilityConfiguration struct { } func (*validateOpTestAvailabilityConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpTestAvailabilityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TestAvailabilityConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTestAvailabilityConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateAvailabilityConfiguration struct { } func (*validateOpUpdateAvailabilityConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateAvailabilityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateAvailabilityConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateAvailabilityConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateDefaultMailDomain struct { } func (*validateOpUpdateDefaultMailDomain) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateDefaultMailDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateDefaultMailDomainInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateDefaultMailDomainInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateImpersonationRole struct { } func (*validateOpUpdateImpersonationRole) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateImpersonationRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateImpersonationRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateImpersonationRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateMailboxQuota struct { } func (*validateOpUpdateMailboxQuota) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateMailboxQuota) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateMailboxQuotaInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateMailboxQuotaInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateMobileDeviceAccessRule struct { } func (*validateOpUpdateMobileDeviceAccessRule) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateMobileDeviceAccessRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateMobileDeviceAccessRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateMobileDeviceAccessRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdatePrimaryEmailAddress struct { } func (*validateOpUpdatePrimaryEmailAddress) ID() string { return "OperationInputValidation" } func (m *validateOpUpdatePrimaryEmailAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdatePrimaryEmailAddressInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdatePrimaryEmailAddressInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateResource struct { } func (*validateOpUpdateResource) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAssociateDelegateToResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateDelegateToResource{}, middleware.After) } func addOpAssociateMemberToGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateMemberToGroup{}, middleware.After) } func addOpAssumeImpersonationRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssumeImpersonationRole{}, middleware.After) } func addOpCancelMailboxExportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelMailboxExportJob{}, middleware.After) } func addOpCreateAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAlias{}, middleware.After) } func addOpCreateAvailabilityConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAvailabilityConfiguration{}, middleware.After) } func addOpCreateGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateGroup{}, middleware.After) } func addOpCreateImpersonationRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateImpersonationRole{}, middleware.After) } func addOpCreateMobileDeviceAccessRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMobileDeviceAccessRule{}, middleware.After) } func addOpCreateOrganizationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOrganization{}, middleware.After) } func addOpCreateResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateResource{}, middleware.After) } func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) } func addOpDeleteAccessControlRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAccessControlRule{}, middleware.After) } func addOpDeleteAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAlias{}, middleware.After) } func addOpDeleteAvailabilityConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAvailabilityConfiguration{}, middleware.After) } func addOpDeleteEmailMonitoringConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteEmailMonitoringConfiguration{}, middleware.After) } func addOpDeleteGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGroup{}, middleware.After) } func addOpDeleteImpersonationRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteImpersonationRole{}, middleware.After) } func addOpDeleteMailboxPermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMailboxPermissions{}, middleware.After) } func addOpDeleteMobileDeviceAccessOverrideValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMobileDeviceAccessOverride{}, middleware.After) } func addOpDeleteMobileDeviceAccessRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMobileDeviceAccessRule{}, middleware.After) } func addOpDeleteOrganizationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteOrganization{}, middleware.After) } func addOpDeleteResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteResource{}, middleware.After) } func addOpDeleteRetentionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRetentionPolicy{}, middleware.After) } func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) } func addOpDeregisterFromWorkMailValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterFromWorkMail{}, middleware.After) } func addOpDeregisterMailDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterMailDomain{}, middleware.After) } func addOpDescribeEmailMonitoringConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEmailMonitoringConfiguration{}, middleware.After) } func addOpDescribeGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeGroup{}, middleware.After) } func addOpDescribeInboundDmarcSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeInboundDmarcSettings{}, middleware.After) } func addOpDescribeMailboxExportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeMailboxExportJob{}, middleware.After) } func addOpDescribeOrganizationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeOrganization{}, middleware.After) } func addOpDescribeResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeResource{}, middleware.After) } func addOpDescribeUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeUser{}, middleware.After) } func addOpDisassociateDelegateFromResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateDelegateFromResource{}, middleware.After) } func addOpDisassociateMemberFromGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateMemberFromGroup{}, middleware.After) } func addOpGetAccessControlEffectValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAccessControlEffect{}, middleware.After) } func addOpGetDefaultRetentionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDefaultRetentionPolicy{}, middleware.After) } func addOpGetImpersonationRoleEffectValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetImpersonationRoleEffect{}, middleware.After) } func addOpGetImpersonationRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetImpersonationRole{}, middleware.After) } func addOpGetMailboxDetailsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMailboxDetails{}, middleware.After) } func addOpGetMailDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMailDomain{}, middleware.After) } func addOpGetMobileDeviceAccessEffectValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMobileDeviceAccessEffect{}, middleware.After) } func addOpGetMobileDeviceAccessOverrideValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMobileDeviceAccessOverride{}, middleware.After) } func addOpListAccessControlRulesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAccessControlRules{}, middleware.After) } func addOpListAliasesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAliases{}, middleware.After) } func addOpListAvailabilityConfigurationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAvailabilityConfigurations{}, middleware.After) } func addOpListGroupMembersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroupMembers{}, middleware.After) } func addOpListGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroups{}, middleware.After) } func addOpListImpersonationRolesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListImpersonationRoles{}, middleware.After) } func addOpListMailboxExportJobsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMailboxExportJobs{}, middleware.After) } func addOpListMailboxPermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMailboxPermissions{}, middleware.After) } func addOpListMailDomainsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMailDomains{}, middleware.After) } func addOpListMobileDeviceAccessOverridesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMobileDeviceAccessOverrides{}, middleware.After) } func addOpListMobileDeviceAccessRulesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMobileDeviceAccessRules{}, middleware.After) } func addOpListResourceDelegatesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListResourceDelegates{}, middleware.After) } func addOpListResourcesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListResources{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) } func addOpPutAccessControlRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutAccessControlRule{}, middleware.After) } func addOpPutEmailMonitoringConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutEmailMonitoringConfiguration{}, middleware.After) } func addOpPutInboundDmarcSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutInboundDmarcSettings{}, middleware.After) } func addOpPutMailboxPermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutMailboxPermissions{}, middleware.After) } func addOpPutMobileDeviceAccessOverrideValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutMobileDeviceAccessOverride{}, middleware.After) } func addOpPutRetentionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutRetentionPolicy{}, middleware.After) } func addOpRegisterMailDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRegisterMailDomain{}, middleware.After) } func addOpRegisterToWorkMailValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRegisterToWorkMail{}, middleware.After) } func addOpResetPasswordValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpResetPassword{}, middleware.After) } func addOpStartMailboxExportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartMailboxExportJob{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpTestAvailabilityConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTestAvailabilityConfiguration{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateAvailabilityConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAvailabilityConfiguration{}, middleware.After) } func addOpUpdateDefaultMailDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDefaultMailDomain{}, middleware.After) } func addOpUpdateImpersonationRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateImpersonationRole{}, middleware.After) } func addOpUpdateMailboxQuotaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMailboxQuota{}, middleware.After) } func addOpUpdateMobileDeviceAccessRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMobileDeviceAccessRule{}, middleware.After) } func addOpUpdatePrimaryEmailAddressValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdatePrimaryEmailAddress{}, middleware.After) } func addOpUpdateResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateResource{}, middleware.After) } func validateEwsAvailabilityProvider(v *types.EwsAvailabilityProvider) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EwsAvailabilityProvider"} if v.EwsEndpoint == nil { invalidParams.Add(smithy.NewErrParamRequired("EwsEndpoint")) } if v.EwsUsername == nil { invalidParams.Add(smithy.NewErrParamRequired("EwsUsername")) } if v.EwsPassword == nil { invalidParams.Add(smithy.NewErrParamRequired("EwsPassword")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFolderConfiguration(v *types.FolderConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FolderConfiguration"} if len(v.Name) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFolderConfigurations(v []types.FolderConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FolderConfigurations"} for i := range v { if err := validateFolderConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateImpersonationRule(v *types.ImpersonationRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ImpersonationRule"} if v.ImpersonationRuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImpersonationRuleId")) } if len(v.Effect) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Effect")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateImpersonationRuleList(v []types.ImpersonationRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ImpersonationRuleList"} for i := range v { if err := validateImpersonationRule(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateLambdaAvailabilityProvider(v *types.LambdaAvailabilityProvider) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LambdaAvailabilityProvider"} if v.LambdaArn == nil { invalidParams.Add(smithy.NewErrParamRequired("LambdaArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagList(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagList"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociateDelegateToResourceInput(v *AssociateDelegateToResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateDelegateToResourceInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociateMemberToGroupInput(v *AssociateMemberToGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateMemberToGroupInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.MemberId == nil { invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssumeImpersonationRoleInput(v *AssumeImpersonationRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssumeImpersonationRoleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ImpersonationRoleId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImpersonationRoleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCancelMailboxExportJobInput(v *CancelMailboxExportJobInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CancelMailboxExportJobInput"} if v.ClientToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) } if v.JobId == nil { invalidParams.Add(smithy.NewErrParamRequired("JobId")) } if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateAliasInput(v *CreateAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateAliasInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if v.Alias == nil { invalidParams.Add(smithy.NewErrParamRequired("Alias")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateAvailabilityConfigurationInput(v *CreateAvailabilityConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateAvailabilityConfigurationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } if v.EwsProvider != nil { if err := validateEwsAvailabilityProvider(v.EwsProvider); err != nil { invalidParams.AddNested("EwsProvider", err.(smithy.InvalidParamsError)) } } if v.LambdaProvider != nil { if err := validateLambdaAvailabilityProvider(v.LambdaProvider); err != nil { invalidParams.AddNested("LambdaProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateGroupInput(v *CreateGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateGroupInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateImpersonationRoleInput(v *CreateImpersonationRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateImpersonationRoleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if v.Rules == nil { invalidParams.Add(smithy.NewErrParamRequired("Rules")) } else if v.Rules != nil { if err := validateImpersonationRuleList(v.Rules); err != nil { invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateMobileDeviceAccessRuleInput(v *CreateMobileDeviceAccessRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateMobileDeviceAccessRuleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Effect) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Effect")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateOrganizationInput(v *CreateOrganizationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateOrganizationInput"} if v.Alias == nil { invalidParams.Add(smithy.NewErrParamRequired("Alias")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateResourceInput(v *CreateResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateResourceInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateUserInput(v *CreateUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.DisplayName == nil { invalidParams.Add(smithy.NewErrParamRequired("DisplayName")) } if v.Password == nil { invalidParams.Add(smithy.NewErrParamRequired("Password")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteAccessControlRuleInput(v *DeleteAccessControlRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteAccessControlRuleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteAliasInput(v *DeleteAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteAliasInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if v.Alias == nil { invalidParams.Add(smithy.NewErrParamRequired("Alias")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteAvailabilityConfigurationInput(v *DeleteAvailabilityConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteAvailabilityConfigurationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteEmailMonitoringConfigurationInput(v *DeleteEmailMonitoringConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteEmailMonitoringConfigurationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteGroupInput(v *DeleteGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteGroupInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteImpersonationRoleInput(v *DeleteImpersonationRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteImpersonationRoleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ImpersonationRoleId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImpersonationRoleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteMailboxPermissionsInput(v *DeleteMailboxPermissionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteMailboxPermissionsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if v.GranteeId == nil { invalidParams.Add(smithy.NewErrParamRequired("GranteeId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteMobileDeviceAccessOverrideInput(v *DeleteMobileDeviceAccessOverrideInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteMobileDeviceAccessOverrideInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if v.DeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteMobileDeviceAccessRuleInput(v *DeleteMobileDeviceAccessRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteMobileDeviceAccessRuleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.MobileDeviceAccessRuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("MobileDeviceAccessRuleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteOrganizationInput(v *DeleteOrganizationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteOrganizationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteResourceInput(v *DeleteResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteResourceInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRetentionPolicyInput(v *DeleteRetentionPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRetentionPolicyInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteUserInput(v *DeleteUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteUserInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeregisterFromWorkMailInput(v *DeregisterFromWorkMailInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeregisterFromWorkMailInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeregisterMailDomainInput(v *DeregisterMailDomainInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeregisterMailDomainInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeEmailMonitoringConfigurationInput(v *DescribeEmailMonitoringConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeEmailMonitoringConfigurationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeGroupInput(v *DescribeGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeGroupInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeInboundDmarcSettingsInput(v *DescribeInboundDmarcSettingsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeInboundDmarcSettingsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeMailboxExportJobInput(v *DescribeMailboxExportJobInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeMailboxExportJobInput"} if v.JobId == nil { invalidParams.Add(smithy.NewErrParamRequired("JobId")) } if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeOrganizationInput(v *DescribeOrganizationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeOrganizationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeResourceInput(v *DescribeResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeResourceInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeUserInput(v *DescribeUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeUserInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDisassociateDelegateFromResourceInput(v *DisassociateDelegateFromResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateDelegateFromResourceInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDisassociateMemberFromGroupInput(v *DisassociateMemberFromGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateMemberFromGroupInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.MemberId == nil { invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetAccessControlEffectInput(v *GetAccessControlEffectInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetAccessControlEffectInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.IpAddress == nil { invalidParams.Add(smithy.NewErrParamRequired("IpAddress")) } if v.Action == nil { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetDefaultRetentionPolicyInput(v *GetDefaultRetentionPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetDefaultRetentionPolicyInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetImpersonationRoleEffectInput(v *GetImpersonationRoleEffectInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetImpersonationRoleEffectInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ImpersonationRoleId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImpersonationRoleId")) } if v.TargetUser == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetUser")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetImpersonationRoleInput(v *GetImpersonationRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetImpersonationRoleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ImpersonationRoleId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImpersonationRoleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetMailboxDetailsInput(v *GetMailboxDetailsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetMailboxDetailsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetMailDomainInput(v *GetMailDomainInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetMailDomainInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetMobileDeviceAccessEffectInput(v *GetMobileDeviceAccessEffectInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetMobileDeviceAccessEffectInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetMobileDeviceAccessOverrideInput(v *GetMobileDeviceAccessOverrideInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetMobileDeviceAccessOverrideInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if v.DeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListAccessControlRulesInput(v *ListAccessControlRulesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAccessControlRulesInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListAliasesInput(v *ListAliasesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAliasesInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListAvailabilityConfigurationsInput(v *ListAvailabilityConfigurationsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAvailabilityConfigurationsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupMembersInput(v *ListGroupMembersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupMembersInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupsInput(v *ListGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListImpersonationRolesInput(v *ListImpersonationRolesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListImpersonationRolesInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListMailboxExportJobsInput(v *ListMailboxExportJobsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListMailboxExportJobsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListMailboxPermissionsInput(v *ListMailboxPermissionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListMailboxPermissionsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListMailDomainsInput(v *ListMailDomainsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListMailDomainsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListMobileDeviceAccessOverridesInput(v *ListMobileDeviceAccessOverridesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListMobileDeviceAccessOverridesInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListMobileDeviceAccessRulesInput(v *ListMobileDeviceAccessRulesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListMobileDeviceAccessRulesInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListResourceDelegatesInput(v *ListResourceDelegatesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListResourceDelegatesInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListResourcesInput(v *ListResourcesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListResourcesInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListUsersInput(v *ListUsersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListUsersInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutAccessControlRuleInput(v *PutAccessControlRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutAccessControlRuleInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Effect) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Effect")) } if v.Description == nil { invalidParams.Add(smithy.NewErrParamRequired("Description")) } if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutEmailMonitoringConfigurationInput(v *PutEmailMonitoringConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutEmailMonitoringConfigurationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.LogGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("LogGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutInboundDmarcSettingsInput(v *PutInboundDmarcSettingsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutInboundDmarcSettingsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Enforced == nil { invalidParams.Add(smithy.NewErrParamRequired("Enforced")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutMailboxPermissionsInput(v *PutMailboxPermissionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutMailboxPermissionsInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if v.GranteeId == nil { invalidParams.Add(smithy.NewErrParamRequired("GranteeId")) } if v.PermissionValues == nil { invalidParams.Add(smithy.NewErrParamRequired("PermissionValues")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutMobileDeviceAccessOverrideInput(v *PutMobileDeviceAccessOverrideInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutMobileDeviceAccessOverrideInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if v.DeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) } if len(v.Effect) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Effect")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutRetentionPolicyInput(v *PutRetentionPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutRetentionPolicyInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.FolderConfigurations == nil { invalidParams.Add(smithy.NewErrParamRequired("FolderConfigurations")) } else if v.FolderConfigurations != nil { if err := validateFolderConfigurations(v.FolderConfigurations); err != nil { invalidParams.AddNested("FolderConfigurations", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRegisterMailDomainInput(v *RegisterMailDomainInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegisterMailDomainInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRegisterToWorkMailInput(v *RegisterToWorkMailInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegisterToWorkMailInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if v.Email == nil { invalidParams.Add(smithy.NewErrParamRequired("Email")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpResetPasswordInput(v *ResetPasswordInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ResetPasswordInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if v.Password == nil { invalidParams.Add(smithy.NewErrParamRequired("Password")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartMailboxExportJobInput(v *StartMailboxExportJobInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartMailboxExportJobInput"} if v.ClientToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) } if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.KmsKeyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("KmsKeyArn")) } if v.S3BucketName == nil { invalidParams.Add(smithy.NewErrParamRequired("S3BucketName")) } if v.S3Prefix == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Prefix")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTestAvailabilityConfigurationInput(v *TestAvailabilityConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TestAvailabilityConfigurationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EwsProvider != nil { if err := validateEwsAvailabilityProvider(v.EwsProvider); err != nil { invalidParams.AddNested("EwsProvider", err.(smithy.InvalidParamsError)) } } if v.LambdaProvider != nil { if err := validateLambdaAvailabilityProvider(v.LambdaProvider); err != nil { invalidParams.AddNested("LambdaProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateAvailabilityConfigurationInput(v *UpdateAvailabilityConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateAvailabilityConfigurationInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } if v.EwsProvider != nil { if err := validateEwsAvailabilityProvider(v.EwsProvider); err != nil { invalidParams.AddNested("EwsProvider", err.(smithy.InvalidParamsError)) } } if v.LambdaProvider != nil { if err := validateLambdaAvailabilityProvider(v.LambdaProvider); err != nil { invalidParams.AddNested("LambdaProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateDefaultMailDomainInput(v *UpdateDefaultMailDomainInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateDefaultMailDomainInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateImpersonationRoleInput(v *UpdateImpersonationRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateImpersonationRoleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ImpersonationRoleId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImpersonationRoleId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if v.Rules == nil { invalidParams.Add(smithy.NewErrParamRequired("Rules")) } else if v.Rules != nil { if err := validateImpersonationRuleList(v.Rules); err != nil { invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateMailboxQuotaInput(v *UpdateMailboxQuotaInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateMailboxQuotaInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if v.MailboxQuota == nil { invalidParams.Add(smithy.NewErrParamRequired("MailboxQuota")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateMobileDeviceAccessRuleInput(v *UpdateMobileDeviceAccessRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateMobileDeviceAccessRuleInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.MobileDeviceAccessRuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("MobileDeviceAccessRuleId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Effect) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Effect")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdatePrimaryEmailAddressInput(v *UpdatePrimaryEmailAddressInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdatePrimaryEmailAddressInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if v.Email == nil { invalidParams.Add(smithy.NewErrParamRequired("Email")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateResourceInput(v *UpdateResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateResourceInput"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
3,577
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 WorkMail 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: "workmail.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workmail-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workmail-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmail.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "workmail.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workmail-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workmail-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmail.{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: "workmail-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmail.{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: "workmail-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmail.{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: "workmail-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmail.{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: "workmail-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmail.{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: "workmail.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workmail-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workmail-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmail.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
308
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 AccessControlRuleEffect string // Enum values for AccessControlRuleEffect const ( AccessControlRuleEffectAllow AccessControlRuleEffect = "ALLOW" AccessControlRuleEffectDeny AccessControlRuleEffect = "DENY" ) // Values returns all known values for AccessControlRuleEffect. 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 (AccessControlRuleEffect) Values() []AccessControlRuleEffect { return []AccessControlRuleEffect{ "ALLOW", "DENY", } } type AccessEffect string // Enum values for AccessEffect const ( AccessEffectAllow AccessEffect = "ALLOW" AccessEffectDeny AccessEffect = "DENY" ) // Values returns all known values for AccessEffect. 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 (AccessEffect) Values() []AccessEffect { return []AccessEffect{ "ALLOW", "DENY", } } type AvailabilityProviderType string // Enum values for AvailabilityProviderType const ( AvailabilityProviderTypeEws AvailabilityProviderType = "EWS" AvailabilityProviderTypeLambda AvailabilityProviderType = "LAMBDA" ) // Values returns all known values for AvailabilityProviderType. 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 (AvailabilityProviderType) Values() []AvailabilityProviderType { return []AvailabilityProviderType{ "EWS", "LAMBDA", } } type DnsRecordVerificationStatus string // Enum values for DnsRecordVerificationStatus const ( DnsRecordVerificationStatusPending DnsRecordVerificationStatus = "PENDING" DnsRecordVerificationStatusVerified DnsRecordVerificationStatus = "VERIFIED" DnsRecordVerificationStatusFailed DnsRecordVerificationStatus = "FAILED" ) // Values returns all known values for DnsRecordVerificationStatus. 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 (DnsRecordVerificationStatus) Values() []DnsRecordVerificationStatus { return []DnsRecordVerificationStatus{ "PENDING", "VERIFIED", "FAILED", } } type EntityState string // Enum values for EntityState const ( EntityStateEnabled EntityState = "ENABLED" EntityStateDisabled EntityState = "DISABLED" EntityStateDeleted EntityState = "DELETED" ) // Values returns all known values for EntityState. 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 (EntityState) Values() []EntityState { return []EntityState{ "ENABLED", "DISABLED", "DELETED", } } type FolderName string // Enum values for FolderName const ( FolderNameInbox FolderName = "INBOX" FolderNameDeletedItems FolderName = "DELETED_ITEMS" FolderNameSentItems FolderName = "SENT_ITEMS" FolderNameDrafts FolderName = "DRAFTS" FolderNameJunkEmail FolderName = "JUNK_EMAIL" ) // Values returns all known values for FolderName. 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 (FolderName) Values() []FolderName { return []FolderName{ "INBOX", "DELETED_ITEMS", "SENT_ITEMS", "DRAFTS", "JUNK_EMAIL", } } type ImpersonationRoleType string // Enum values for ImpersonationRoleType const ( ImpersonationRoleTypeFullAccess ImpersonationRoleType = "FULL_ACCESS" ImpersonationRoleTypeReadOnly ImpersonationRoleType = "READ_ONLY" ) // Values returns all known values for ImpersonationRoleType. 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 (ImpersonationRoleType) Values() []ImpersonationRoleType { return []ImpersonationRoleType{ "FULL_ACCESS", "READ_ONLY", } } type MailboxExportJobState string // Enum values for MailboxExportJobState const ( MailboxExportJobStateRunning MailboxExportJobState = "RUNNING" MailboxExportJobStateCompleted MailboxExportJobState = "COMPLETED" MailboxExportJobStateFailed MailboxExportJobState = "FAILED" MailboxExportJobStateCancelled MailboxExportJobState = "CANCELLED" ) // Values returns all known values for MailboxExportJobState. 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 (MailboxExportJobState) Values() []MailboxExportJobState { return []MailboxExportJobState{ "RUNNING", "COMPLETED", "FAILED", "CANCELLED", } } type MemberType string // Enum values for MemberType const ( MemberTypeGroup MemberType = "GROUP" MemberTypeUser MemberType = "USER" ) // Values returns all known values for MemberType. 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 (MemberType) Values() []MemberType { return []MemberType{ "GROUP", "USER", } } type MobileDeviceAccessRuleEffect string // Enum values for MobileDeviceAccessRuleEffect const ( MobileDeviceAccessRuleEffectAllow MobileDeviceAccessRuleEffect = "ALLOW" MobileDeviceAccessRuleEffectDeny MobileDeviceAccessRuleEffect = "DENY" ) // Values returns all known values for MobileDeviceAccessRuleEffect. 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 (MobileDeviceAccessRuleEffect) Values() []MobileDeviceAccessRuleEffect { return []MobileDeviceAccessRuleEffect{ "ALLOW", "DENY", } } type PermissionType string // Enum values for PermissionType const ( PermissionTypeFullAccess PermissionType = "FULL_ACCESS" PermissionTypeSendAs PermissionType = "SEND_AS" PermissionTypeSendOnBehalf PermissionType = "SEND_ON_BEHALF" ) // Values returns all known values for PermissionType. 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 (PermissionType) Values() []PermissionType { return []PermissionType{ "FULL_ACCESS", "SEND_AS", "SEND_ON_BEHALF", } } type ResourceType string // Enum values for ResourceType const ( ResourceTypeRoom ResourceType = "ROOM" ResourceTypeEquipment ResourceType = "EQUIPMENT" ) // Values returns all known values for ResourceType. 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 (ResourceType) Values() []ResourceType { return []ResourceType{ "ROOM", "EQUIPMENT", } } type RetentionAction string // Enum values for RetentionAction const ( RetentionActionNone RetentionAction = "NONE" RetentionActionDelete RetentionAction = "DELETE" RetentionActionPermanentlyDelete RetentionAction = "PERMANENTLY_DELETE" ) // Values returns all known values for RetentionAction. 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 (RetentionAction) Values() []RetentionAction { return []RetentionAction{ "NONE", "DELETE", "PERMANENTLY_DELETE", } } type UserRole string // Enum values for UserRole const ( UserRoleUser UserRole = "USER" UserRoleResource UserRole = "RESOURCE" UserRoleSystemUser UserRole = "SYSTEM_USER" ) // Values returns all known values for UserRole. 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 (UserRole) Values() []UserRole { return []UserRole{ "USER", "RESOURCE", "SYSTEM_USER", } }
277
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" ) // The directory is already in use by another WorkMail organization in the same // account and Region. type DirectoryInUseException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DirectoryInUseException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DirectoryInUseException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DirectoryInUseException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DirectoryInUseException" } return *e.ErrorCodeOverride } func (e *DirectoryInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The directory service doesn't recognize the credentials supplied by WorkMail. type DirectoryServiceAuthenticationFailedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DirectoryServiceAuthenticationFailedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DirectoryServiceAuthenticationFailedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DirectoryServiceAuthenticationFailedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DirectoryServiceAuthenticationFailedException" } return *e.ErrorCodeOverride } func (e *DirectoryServiceAuthenticationFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The directory is unavailable. It might be located in another Region or deleted. type DirectoryUnavailableException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DirectoryUnavailableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DirectoryUnavailableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DirectoryUnavailableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DirectoryUnavailableException" } return *e.ErrorCodeOverride } func (e *DirectoryUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The email address that you're trying to assign is already created for a // different user, group, or resource. type EmailAddressInUseException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EmailAddressInUseException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EmailAddressInUseException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EmailAddressInUseException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EmailAddressInUseException" } return *e.ErrorCodeOverride } func (e *EmailAddressInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The user, group, or resource that you're trying to register is already // registered. type EntityAlreadyRegisteredException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EntityAlreadyRegisteredException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EntityAlreadyRegisteredException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EntityAlreadyRegisteredException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EntityAlreadyRegisteredException" } return *e.ErrorCodeOverride } func (e *EntityAlreadyRegisteredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The identifier supplied for the user, group, or resource does not exist in your // organization. type EntityNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EntityNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EntityNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EntityNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EntityNotFoundException" } return *e.ErrorCodeOverride } func (e *EntityNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You are performing an operation on a user, group, or resource that isn't in the // expected state, such as trying to delete an active user. type EntityStateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EntityStateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EntityStateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EntityStateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EntityStateException" } return *e.ErrorCodeOverride } func (e *EntityStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The configuration for a resource isn't valid. A resource must either be able to // auto-respond to requests or have at least one delegate associated that can do so // on its behalf. type InvalidConfigurationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidConfigurationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidConfigurationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidConfigurationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidConfigurationException" } return *e.ErrorCodeOverride } func (e *InvalidConfigurationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You SES configuration has customizations that WorkMail cannot save. The error // message lists the invalid setting. For examples of invalid settings, refer to // CreateReceiptRule (https://docs.aws.amazon.com/ses/latest/APIReference/API_CreateReceiptRule.html) // . type InvalidCustomSesConfigurationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidCustomSesConfigurationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidCustomSesConfigurationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidCustomSesConfigurationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidCustomSesConfigurationException" } return *e.ErrorCodeOverride } func (e *InvalidCustomSesConfigurationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // One or more of the input parameters don't match the service's restrictions. type InvalidParameterException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidParameterException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidParameterException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidParameterException" } return *e.ErrorCodeOverride } func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The supplied password doesn't match the minimum security constraints, such as // length or use of special characters. type InvalidPasswordException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidPasswordException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidPasswordException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidPasswordException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidPasswordException" } return *e.ErrorCodeOverride } func (e *InvalidPasswordException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request exceeds the limit of the resource. 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 "LimitExceededException" } return *e.ErrorCodeOverride } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The domain you're trying to change is in use by another user or organization in // your account. See the error message for details. type MailDomainInUseException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MailDomainInUseException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MailDomainInUseException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MailDomainInUseException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MailDomainInUseException" } return *e.ErrorCodeOverride } func (e *MailDomainInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The domain specified is not found in your organization. type MailDomainNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MailDomainNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MailDomainNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MailDomainNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MailDomainNotFoundException" } return *e.ErrorCodeOverride } func (e *MailDomainNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // After a domain has been added to the organization, it must be verified. The // domain is not yet verified. type MailDomainStateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MailDomainStateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MailDomainStateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MailDomainStateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MailDomainStateException" } return *e.ErrorCodeOverride } func (e *MailDomainStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The user, group, or resource name isn't unique in WorkMail. type NameAvailabilityException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NameAvailabilityException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NameAvailabilityException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NameAvailabilityException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NameAvailabilityException" } return *e.ErrorCodeOverride } func (e *NameAvailabilityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // An operation received a valid organization identifier that either doesn't // belong or exist in the system. type OrganizationNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *OrganizationNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *OrganizationNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *OrganizationNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "OrganizationNotFoundException" } return *e.ErrorCodeOverride } func (e *OrganizationNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The organization must have a valid state to perform certain operations on the // organization or its members. type OrganizationStateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *OrganizationStateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *OrganizationStateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *OrganizationStateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "OrganizationStateException" } return *e.ErrorCodeOverride } func (e *OrganizationStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // This user, group, or resource name is not allowed in WorkMail. type ReservedNameException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ReservedNameException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ReservedNameException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ReservedNameException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ReservedNameException" } return *e.ErrorCodeOverride } func (e *ReservedNameException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource cannot be found. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource can have up to 50 user-applied tags. type TooManyTagsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *TooManyTagsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *TooManyTagsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "TooManyTagsException" } return *e.ErrorCodeOverride } func (e *TooManyTagsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You can't perform a write operation against a read-only directory. type UnsupportedOperationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnsupportedOperationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnsupportedOperationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnsupportedOperationException" } return *e.ErrorCodeOverride } func (e *UnsupportedOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
600
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" ) // A rule that controls access to an WorkMail organization. type AccessControlRule struct { // Access protocol actions to include in the rule. Valid values include ActiveSync // , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail . Actions []string // The date that the rule was created. DateCreated *time.Time // The date that the rule was modified. DateModified *time.Time // The rule description. Description *string // The rule effect. Effect AccessControlRuleEffect // Impersonation role IDs to include in the rule. ImpersonationRoleIds []string // IPv4 CIDR ranges to include in the rule. IpRanges []string // The rule name. Name *string // Access protocol actions to exclude from the rule. Valid values include // ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail . NotActions []string // Impersonation role IDs to exclude from the rule. NotImpersonationRoleIds []string // IPv4 CIDR ranges to exclude from the rule. NotIpRanges []string // User IDs to exclude from the rule. NotUserIds []string // User IDs to include in the rule. UserIds []string noSmithyDocumentSerde } // List all the AvailabilityConfiguration 's for the given WorkMail organization. type AvailabilityConfiguration struct { // The date and time at which the availability configuration was created. DateCreated *time.Time // The date and time at which the availability configuration was last modified. DateModified *time.Time // Displays the domain to which the provider applies. DomainName *string // If ProviderType is EWS , then this field contains // RedactedEwsAvailabilityProvider . Otherwise, it is not required. EwsProvider *RedactedEwsAvailabilityProvider // If ProviderType is LAMBDA then this field contains LambdaAvailabilityProvider . // Otherwise, it is not required. LambdaProvider *LambdaAvailabilityProvider // Displays the provider type that applies to this domain. ProviderType AvailabilityProviderType noSmithyDocumentSerde } // At least one delegate must be associated to the resource to disable automatic // replies from the resource. type BookingOptions struct { // The resource's ability to automatically reply to requests. If disabled, // delegates must be associated to the resource. AutoAcceptRequests bool // The resource's ability to automatically decline any conflicting requests. AutoDeclineConflictingRequests bool // The resource's ability to automatically decline any recurring requests. AutoDeclineRecurringRequests bool noSmithyDocumentSerde } // The name of the attribute, which is one of the values defined in the // UserAttribute enumeration. type Delegate struct { // The identifier for the user or group associated as the resource's delegate. // // This member is required. Id *string // The type of the delegate: user or group. // // This member is required. Type MemberType noSmithyDocumentSerde } // A DNS record uploaded to your DNS provider. type DnsRecord struct { // The DNS hostname.- For example, domain.example.com . Hostname *string // The RFC 1035 record type. Possible values: CNAME , A , MX . Type *string // The value returned by the DNS for a query to that hostname and record type. Value *string noSmithyDocumentSerde } // The domain to associate with an WorkMail organization. When you configure a // domain hosted in Amazon Route 53 (Route 53), all recommended DNS records are // added to the organization when you create it. For more information, see Adding // a domain (https://docs.aws.amazon.com/workmail/latest/adminguide/add_domain.html) // in the WorkMail Administrator Guide. type Domain struct { // The fully qualified domain name. DomainName *string // The hosted zone ID for a domain hosted in Route 53. Required when configuring a // domain hosted in Route 53. HostedZoneId *string noSmithyDocumentSerde } // Describes an EWS based availability provider. This is only used as input to the // service. type EwsAvailabilityProvider struct { // The endpoint of the remote EWS server. // // This member is required. EwsEndpoint *string // The password used to authenticate the remote EWS server. // // This member is required. EwsPassword *string // The username used to authenticate the remote EWS server. // // This member is required. EwsUsername *string noSmithyDocumentSerde } // The configuration applied to an organization's folders by its retention policy. type FolderConfiguration struct { // The action to take on the folder contents at the end of the folder // configuration period. // // This member is required. Action RetentionAction // The folder name. // // This member is required. Name FolderName // The number of days for which the folder-configuration action applies. Period *int32 noSmithyDocumentSerde } // The representation of an WorkMail group. type Group struct { // The date indicating when the group was disabled from WorkMail use. DisabledDate *time.Time // The email of the group. Email *string // The date indicating when the group was enabled for WorkMail use. EnabledDate *time.Time // The identifier of the group. Id *string // The name of the group. Name *string // The state of the group, which can be ENABLED, DISABLED, or DELETED. State EntityState noSmithyDocumentSerde } // The impersonation rule that matched the input. type ImpersonationMatchedRule struct { // The ID of the rule that matched the input ImpersonationRuleId *string // The name of the rule that matched the input. Name *string noSmithyDocumentSerde } // An impersonation role for the given WorkMail organization. type ImpersonationRole struct { // The date when the impersonation role was created. DateCreated *time.Time // The date when the impersonation role was last modified. DateModified *time.Time // The identifier of the impersonation role. ImpersonationRoleId *string // The impersonation role name. Name *string // The impersonation role type. Type ImpersonationRoleType noSmithyDocumentSerde } // The rules for the given impersonation role. type ImpersonationRule struct { // The effect of the rule when it matches the input. Allowed effect values are // ALLOW or DENY . // // This member is required. Effect AccessEffect // The identifier of the rule. // // This member is required. ImpersonationRuleId *string // The rule description. Description *string // The rule name. Name *string // A list of user IDs that don't match the rule. NotTargetUsers []string // A list of user IDs that match the rule. TargetUsers []string noSmithyDocumentSerde } // Describes a Lambda based availability provider. type LambdaAvailabilityProvider struct { // The Amazon Resource Name (ARN) of the Lambda that acts as the availability // provider. // // This member is required. LambdaArn *string noSmithyDocumentSerde } // The details of a mailbox export job, including the user or resource ID // associated with the mailbox and the S3 bucket that the mailbox contents are // exported to. type MailboxExportJob struct { // The mailbox export job description. Description *string // The mailbox export job end timestamp. EndTime *time.Time // The identifier of the user or resource associated with the mailbox. EntityId *string // The estimated progress of the mailbox export job, in percentage points. EstimatedProgress int32 // The identifier of the mailbox export job. JobId *string // The name of the S3 bucket. S3BucketName *string // The path to the S3 bucket and file that the mailbox export job exports to. S3Path *string // The mailbox export job start timestamp. StartTime *time.Time // The state of the mailbox export job. State MailboxExportJobState noSmithyDocumentSerde } // The data for a given domain. type MailDomainSummary struct { // Whether the domain is default or not. DefaultDomain bool // The domain name. DomainName *string noSmithyDocumentSerde } // The representation of a user or group. type Member struct { // The date indicating when the member was disabled from WorkMail use. DisabledDate *time.Time // The date indicating when the member was enabled for WorkMail use. EnabledDate *time.Time // The identifier of the member. Id *string // The name of the member. Name *string // The state of the member, which can be ENABLED, DISABLED, or DELETED. State EntityState // A member can be a user or group. Type MemberType noSmithyDocumentSerde } // The rule that a simulated user matches. type MobileDeviceAccessMatchedRule struct { // Identifier of the rule that a simulated user matches. MobileDeviceAccessRuleId *string // Name of a rule that a simulated user matches. Name *string noSmithyDocumentSerde } // The override object. type MobileDeviceAccessOverride struct { // The date the override was first created. DateCreated *time.Time // The date the override was last modified. DateModified *time.Time // A description of the override. Description *string // The device to which the override applies. DeviceId *string // The effect of the override, ALLOW or DENY . Effect MobileDeviceAccessRuleEffect // The WorkMail user to which the access override applies. UserId *string noSmithyDocumentSerde } // A rule that controls access to mobile devices for an WorkMail group. type MobileDeviceAccessRule struct { // The date and time at which an access rule was created. DateCreated *time.Time // The date and time at which an access rule was modified. DateModified *time.Time // The description of a mobile access rule. Description *string // Device models that a rule will match. DeviceModels []string // Device operating systems that a rule will match. DeviceOperatingSystems []string // Device types that a rule will match. DeviceTypes []string // Device user agents that a rule will match. DeviceUserAgents []string // The effect of the rule when it matches. Allowed values are ALLOW or DENY . Effect MobileDeviceAccessRuleEffect // The ID assigned to a mobile access rule. MobileDeviceAccessRuleId *string // The name of a mobile access rule. Name *string // Device models that a rule will not match. All other device models will match. NotDeviceModels []string // Device operating systems that a rule will not match. All other device types // will match. NotDeviceOperatingSystems []string // Device types that a rule will not match. All other device types will match. NotDeviceTypes []string // Device user agents that a rule will not match. All other device user agents // will match. NotDeviceUserAgents []string noSmithyDocumentSerde } // The representation of an organization. type OrganizationSummary struct { // The alias associated with the organization. Alias *string // The default email domain associated with the organization. DefaultMailDomain *string // The error message associated with the organization. It is only present if // unexpected behavior has occurred with regards to the organization. It provides // insight or solutions regarding unexpected behavior. ErrorMessage *string // The identifier associated with the organization. OrganizationId *string // The state associated with the organization. State *string noSmithyDocumentSerde } // Permission granted to a user, group, or resource to access a certain aspect of // another user, group, or resource mailbox. type Permission struct { // The identifier of the user, group, or resource to which the permissions are // granted. // // This member is required. GranteeId *string // The type of user, group, or resource referred to in GranteeId. // // This member is required. GranteeType MemberType // The permissions granted to the grantee. SEND_AS allows the grantee to send // email as the owner of the mailbox (the grantee is not mentioned on these // emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner // of the mailbox (the grantee is not mentioned as the physical sender of these // emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective // of other folder-level permissions set on the mailbox. // // This member is required. PermissionValues []PermissionType noSmithyDocumentSerde } // Describes an EWS based availability provider when returned from the service. It // does not contain the password of the endpoint. type RedactedEwsAvailabilityProvider struct { // The endpoint of the remote EWS server. EwsEndpoint *string // The username used to authenticate the remote EWS server. EwsUsername *string noSmithyDocumentSerde } // The representation of a resource. type Resource struct { // The date indicating when the resource was disabled from WorkMail use. DisabledDate *time.Time // The email of the resource. Email *string // The date indicating when the resource was enabled for WorkMail use. EnabledDate *time.Time // The identifier of the resource. Id *string // The name of the resource. Name *string // The state of the resource, which can be ENABLED, DISABLED, or DELETED. State EntityState // The type of the resource: equipment or room. Type ResourceType noSmithyDocumentSerde } // Describes a tag applied to a resource. type Tag struct { // The key of the tag. // // This member is required. Key *string // The value of the tag. // // This member is required. Value *string noSmithyDocumentSerde } // The representation of an WorkMail user. type User struct { // The date indicating when the user was disabled from WorkMail use. DisabledDate *time.Time // The display name of the user. DisplayName *string // The email of the user. Email *string // The date indicating when the user was enabled for WorkMail use. EnabledDate *time.Time // The identifier of the user. Id *string // The name of the user. Name *string // The state of the user, which can be ENABLED, DISABLED, or DELETED. State EntityState // The role of the user. UserRole UserRole noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
584
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmailmessageflow 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 = "WorkMailMessageFlow" const ServiceAPIVersion = "2019-05-01" // Client provides the API client to make operations call for Amazon WorkMail // Message Flow. 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, "workmailmessageflow", 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 workmailmessageflow 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 workmailmessageflow 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" "io" ) // Retrieves the raw content of an in-transit email message, in MIME format. func (c *Client) GetRawMessageContent(ctx context.Context, params *GetRawMessageContentInput, optFns ...func(*Options)) (*GetRawMessageContentOutput, error) { if params == nil { params = &GetRawMessageContentInput{} } result, metadata, err := c.invokeOperation(ctx, "GetRawMessageContent", params, optFns, c.addOperationGetRawMessageContentMiddlewares) if err != nil { return nil, err } out := result.(*GetRawMessageContentOutput) out.ResultMetadata = metadata return out, nil } type GetRawMessageContentInput struct { // The identifier of the email message to retrieve. // // This member is required. MessageId *string noSmithyDocumentSerde } type GetRawMessageContentOutput struct { // The raw content of the email message, in MIME format. // // This member is required. MessageContent io.ReadCloser // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetRawMessageContentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRawMessageContent{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRawMessageContent{}, 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 = addOpGetRawMessageContentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRawMessageContent(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_opGetRawMessageContent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmailmessageflow", OperationName: "GetRawMessageContent", } }
124