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 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/aws-sdk-go-v2/service/workmailmessageflow/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the raw content of an in-transit email message, in MIME format. This // example describes how to update in-transit email message. For more information // and examples for using this API, see Updating message content with AWS Lambda (https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html) // . Updates to an in-transit message only appear when you call // PutRawMessageContent from an AWS Lambda function configured with a synchronous // Run Lambda (https://docs.aws.amazon.com/workmail/latest/adminguide/lambda.html#synchronous-rules) // rule. If you call PutRawMessageContent on a delivered or sent message, the // message remains unchanged, even though GetRawMessageContent (https://docs.aws.amazon.com/workmail/latest/APIReference/API_messageflow_GetRawMessageContent.html) // returns an updated message. func (c *Client) PutRawMessageContent(ctx context.Context, params *PutRawMessageContentInput, optFns ...func(*Options)) (*PutRawMessageContentOutput, error) { if params == nil { params = &PutRawMessageContentInput{} } result, metadata, err := c.invokeOperation(ctx, "PutRawMessageContent", params, optFns, c.addOperationPutRawMessageContentMiddlewares) if err != nil { return nil, err } out := result.(*PutRawMessageContentOutput) out.ResultMetadata = metadata return out, nil } type PutRawMessageContentInput struct { // Describes the raw message content of the updated email message. // // This member is required. Content *types.RawMessageContent // The identifier of the email message being updated. // // This member is required. MessageId *string noSmithyDocumentSerde } type PutRawMessageContentOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutRawMessageContentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpPutRawMessageContent{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutRawMessageContent{}, 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 = addOpPutRawMessageContentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRawMessageContent(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_opPutRawMessageContent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workmailmessageflow", OperationName: "PutRawMessageContent", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmailmessageflow import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/workmailmessageflow/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" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsRestjson1_deserializeOpGetRawMessageContent struct { } func (*awsRestjson1_deserializeOpGetRawMessageContent) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetRawMessageContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorGetRawMessageContent(response, &metadata) } output := &GetRawMessageContentOutput{} out.Result = output err = awsRestjson1_deserializeOpDocumentGetRawMessageContentOutput(output, response.Body) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} } return out, metadata, err } func awsRestjson1_deserializeOpErrorGetRawMessageContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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 awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetRawMessageContentOutput(v *GetRawMessageContentOutput, body io.ReadCloser) error { if v == nil { return fmt.Errorf("unsupported deserialization of nil %T", v) } v.MessageContent = body return nil } type awsRestjson1_deserializeOpPutRawMessageContent struct { } func (*awsRestjson1_deserializeOpPutRawMessageContent) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpPutRawMessageContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorPutRawMessageContent(response, &metadata) } output := &PutRawMessageContentOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorPutRawMessageContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidContentLocation", errorCode): return awsRestjson1_deserializeErrorInvalidContentLocation(response, errorBody) case strings.EqualFold("MessageFrozen", errorCode): return awsRestjson1_deserializeErrorMessageFrozen(response, errorBody) case strings.EqualFold("MessageRejected", errorCode): return awsRestjson1_deserializeErrorMessageRejected(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeErrorInvalidContentLocation(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidContentLocation{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidContentLocation(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorMessageFrozen(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.MessageFrozen{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentMessageFrozen(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorMessageRejected(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.MessageRejected{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentMessageRejected(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeDocumentInvalidContentLocation(v **types.InvalidContentLocation, 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.InvalidContentLocation if *v == nil { sv = &types.InvalidContentLocation{} } 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 errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMessageFrozen(v **types.MessageFrozen, 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.MessageFrozen if *v == nil { sv = &types.MessageFrozen{} } 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 errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMessageRejected(v **types.MessageRejected, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MessageRejected if *v == nil { sv = &types.MessageRejected{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
513
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package workmailmessageflow provides the API client, operations, and parameter // types for Amazon WorkMail Message Flow. // // The WorkMail Message Flow API provides access to email messages as they are // being sent and received by a WorkMail organization. package workmailmessageflow
9
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmailmessageflow 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/workmailmessageflow/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 = "workmailmessageflow" } 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 workmailmessageflow // goModuleVersion is the tagged release for this module const goModuleVersion = "1.12.12"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmailmessageflow
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmailmessageflow import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/workmailmessageflow/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" ) type awsRestjson1_serializeOpGetRawMessageContent struct { } func (*awsRestjson1_serializeOpGetRawMessageContent) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetRawMessageContent) 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.(*GetRawMessageContentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/messages/{messageId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsGetRawMessageContentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetRawMessageContentInput(v *GetRawMessageContentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.MessageId == nil || len(*v.MessageId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member messageId must not be empty")} } if v.MessageId != nil { if err := encoder.SetURI("messageId").String(*v.MessageId); err != nil { return err } } return nil } type awsRestjson1_serializeOpPutRawMessageContent struct { } func (*awsRestjson1_serializeOpPutRawMessageContent) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutRawMessageContent) 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.(*PutRawMessageContentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/messages/{messageId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsPutRawMessageContentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutRawMessageContentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsPutRawMessageContentInput(v *PutRawMessageContentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.MessageId == nil || len(*v.MessageId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member messageId must not be empty")} } if v.MessageId != nil { if err := encoder.SetURI("messageId").String(*v.MessageId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutRawMessageContentInput(v *PutRawMessageContentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Content != nil { ok := object.Key("content") if err := awsRestjson1_serializeDocumentRawMessageContent(v.Content, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentRawMessageContent(v *types.RawMessageContent, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.S3Reference != nil { ok := object.Key("s3Reference") if err := awsRestjson1_serializeDocumentS3Reference(v.S3Reference, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentS3Reference(v *types.S3Reference, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Bucket != nil { ok := object.Key("bucket") ok.String(*v.Bucket) } if v.Key != nil { ok := object.Key("key") ok.String(*v.Key) } if v.ObjectVersion != nil { ok := object.Key("objectVersion") ok.String(*v.ObjectVersion) } return nil }
193
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workmailmessageflow import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/workmailmessageflow/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpGetRawMessageContent struct { } func (*validateOpGetRawMessageContent) ID() string { return "OperationInputValidation" } func (m *validateOpGetRawMessageContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRawMessageContentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRawMessageContentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutRawMessageContent struct { } func (*validateOpPutRawMessageContent) ID() string { return "OperationInputValidation" } func (m *validateOpPutRawMessageContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutRawMessageContentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutRawMessageContentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpGetRawMessageContentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRawMessageContent{}, middleware.After) } func addOpPutRawMessageContentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutRawMessageContent{}, middleware.After) } func validateRawMessageContent(v *types.RawMessageContent) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RawMessageContent"} if v.S3Reference == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Reference")) } else if v.S3Reference != nil { if err := validateS3Reference(v.S3Reference); err != nil { invalidParams.AddNested("S3Reference", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateS3Reference(v *types.S3Reference) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "S3Reference"} if v.Bucket == nil { invalidParams.Add(smithy.NewErrParamRequired("Bucket")) } if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRawMessageContentInput(v *GetRawMessageContentInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRawMessageContentInput"} if v.MessageId == nil { invalidParams.Add(smithy.NewErrParamRequired("MessageId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutRawMessageContentInput(v *PutRawMessageContentInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutRawMessageContentInput"} if v.MessageId == nil { invalidParams.Add(smithy.NewErrParamRequired("MessageId")) } if v.Content == nil { invalidParams.Add(smithy.NewErrParamRequired("Content")) } else if v.Content != nil { if err := validateRawMessageContent(v.Content); err != nil { invalidParams.AddNested("Content", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
134
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 WorkMailMessageFlow 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: "workmailmessageflow.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workmailmessageflow-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workmailmessageflow-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmailmessageflow.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "workmailmessageflow.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workmailmessageflow-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workmailmessageflow-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmailmessageflow.{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: "workmailmessageflow-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmailmessageflow.{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: "workmailmessageflow-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmailmessageflow.{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: "workmailmessageflow-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmailmessageflow.{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: "workmailmessageflow-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmailmessageflow.{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: "workmailmessageflow.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workmailmessageflow-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workmailmessageflow-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workmailmessageflow.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
297
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 import ( "fmt" smithy "github.com/aws/smithy-go" ) // WorkMail could not access the updated email content. Possible reasons: // - You made the request in a region other than your S3 bucket region. // - The S3 bucket owner (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-owner-condition.html) // is not the same as the calling AWS account. // - You have an incomplete or missing S3 bucket policy. For more information // about policies, see Updating message content with AWS Lambda (https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html) // in the WorkMail Administrator Guide. type InvalidContentLocation struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidContentLocation) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidContentLocation) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidContentLocation) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidContentLocation" } return *e.ErrorCodeOverride } func (e *InvalidContentLocation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The requested email is not eligible for update. This is usually the case for a // redirected email. type MessageFrozen struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MessageFrozen) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MessageFrozen) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MessageFrozen) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MessageFrozen" } return *e.ErrorCodeOverride } func (e *MessageFrozen) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The requested email could not be updated due to an error in the MIME content. // Check the error message for more information about what caused the error. type MessageRejected struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MessageRejected) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MessageRejected) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MessageRejected) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MessageRejected" } return *e.ErrorCodeOverride } func (e *MessageRejected) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The requested email message is 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 }
121
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" ) // Provides the MIME content of the updated email message as an S3 object. All // MIME content must meet the following criteria: // - Each part of a multipart MIME message must be formatted properly. // - Attachments must be of a content type that Amazon SES supports. For more // information, see Unsupported Attachment Types (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types-appendix.html) // . // - If any of the MIME parts in a message contain content that is outside of // the 7-bit ASCII character range, we recommend encoding that content. // - Per RFC 5321 (https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6) , the // maximum length of each line of text, including the , must not exceed 1,000 // characters. // - The message must contain all the required header fields. Check the returned // error message for more information. // - The value of immutable headers must remain unchanged. Check the returned // error message for more information. // - Certain unique headers can only appear once. Check the returned error // message for more information. type RawMessageContent struct { // The S3 reference of an email message. // // This member is required. S3Reference *S3Reference noSmithyDocumentSerde } // Amazon S3 object representing the updated message content, in MIME format. The // region for the S3 bucket containing the S3 object must match the region used for // WorkMail operations. Also, for WorkMail to process an S3 object, it must have // permission to access that object. For more information, see Updating message // content with AWS Lambda (https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html) // . type S3Reference struct { // The S3 bucket name. // // This member is required. Bucket *string // The S3 key object name. // // This member is required. Key *string // If you enable versioning for the bucket, you can specify the object version. ObjectVersion *string noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
61
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 = "WorkSpaces" const ServiceAPIVersion = "2015-04-08" // Client provides the API client to make operations call for Amazon WorkSpaces. 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, "workspaces", 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) }
434
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 workspaces 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" ) // Associates the specified connection alias with the specified directory to // enable cross-Region redirection. For more information, see Cross-Region // Redirection for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . Before performing this operation, call DescribeConnectionAliases (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeConnectionAliases.html) // to make sure that the current state of the connection alias is CREATED . func (c *Client) AssociateConnectionAlias(ctx context.Context, params *AssociateConnectionAliasInput, optFns ...func(*Options)) (*AssociateConnectionAliasOutput, error) { if params == nil { params = &AssociateConnectionAliasInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateConnectionAlias", params, optFns, c.addOperationAssociateConnectionAliasMiddlewares) if err != nil { return nil, err } out := result.(*AssociateConnectionAliasOutput) out.ResultMetadata = metadata return out, nil } type AssociateConnectionAliasInput struct { // The identifier of the connection alias. // // This member is required. AliasId *string // The identifier of the directory to associate the connection alias with. // // This member is required. ResourceId *string noSmithyDocumentSerde } type AssociateConnectionAliasOutput struct { // The identifier of the connection alias association. You use the connection // identifier in the DNS TXT record when you're configuring your DNS routing // policies. ConnectionIdentifier *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateConnectionAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateConnectionAlias{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateConnectionAlias{}, 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 = addOpAssociateConnectionAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateConnectionAlias(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_opAssociateConnectionAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "AssociateConnectionAlias", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Associates the specified IP access control group with the specified directory. func (c *Client) AssociateIpGroups(ctx context.Context, params *AssociateIpGroupsInput, optFns ...func(*Options)) (*AssociateIpGroupsOutput, error) { if params == nil { params = &AssociateIpGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateIpGroups", params, optFns, c.addOperationAssociateIpGroupsMiddlewares) if err != nil { return nil, err } out := result.(*AssociateIpGroupsOutput) out.ResultMetadata = metadata return out, nil } type AssociateIpGroupsInput struct { // The identifier of the directory. // // This member is required. DirectoryId *string // The identifiers of one or more IP access control groups. // // This member is required. GroupIds []string noSmithyDocumentSerde } type AssociateIpGroupsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateIpGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateIpGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateIpGroups{}, 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 = addOpAssociateIpGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateIpGroups(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_opAssociateIpGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "AssociateIpGroups", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds one or more rules to the specified IP access control group. This action // gives users permission to access their WorkSpaces from the CIDR address ranges // specified in the rules. func (c *Client) AuthorizeIpRules(ctx context.Context, params *AuthorizeIpRulesInput, optFns ...func(*Options)) (*AuthorizeIpRulesOutput, error) { if params == nil { params = &AuthorizeIpRulesInput{} } result, metadata, err := c.invokeOperation(ctx, "AuthorizeIpRules", params, optFns, c.addOperationAuthorizeIpRulesMiddlewares) if err != nil { return nil, err } out := result.(*AuthorizeIpRulesOutput) out.ResultMetadata = metadata return out, nil } type AuthorizeIpRulesInput struct { // The identifier of the group. // // This member is required. GroupId *string // The rules to add to the group. // // This member is required. UserRules []types.IpRuleItem noSmithyDocumentSerde } type AuthorizeIpRulesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAuthorizeIpRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAuthorizeIpRules{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAuthorizeIpRules{}, 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 = addOpAuthorizeIpRulesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAuthorizeIpRules(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_opAuthorizeIpRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "AuthorizeIpRules", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Copies the specified image from the specified Region to the current Region. For // more information about copying images, see Copy a Custom WorkSpaces Image (https://docs.aws.amazon.com/workspaces/latest/adminguide/copy-custom-image.html) // . In the China (Ningxia) Region, you can copy images only within the same // Region. In Amazon Web Services GovCloud (US), to copy images to and from other // Regions, contact Amazon Web Services Support. Before copying a shared image, be // sure to verify that it has been shared from the correct Amazon Web Services // account. To determine if an image has been shared and to see the ID of the // Amazon Web Services account that owns an image, use the DescribeWorkSpaceImages (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html) // and DescribeWorkspaceImagePermissions (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImagePermissions.html) // API operations. func (c *Client) CopyWorkspaceImage(ctx context.Context, params *CopyWorkspaceImageInput, optFns ...func(*Options)) (*CopyWorkspaceImageOutput, error) { if params == nil { params = &CopyWorkspaceImageInput{} } result, metadata, err := c.invokeOperation(ctx, "CopyWorkspaceImage", params, optFns, c.addOperationCopyWorkspaceImageMiddlewares) if err != nil { return nil, err } out := result.(*CopyWorkspaceImageOutput) out.ResultMetadata = metadata return out, nil } type CopyWorkspaceImageInput struct { // The name of the image. // // This member is required. Name *string // The identifier of the source image. // // This member is required. SourceImageId *string // The identifier of the source Region. // // This member is required. SourceRegion *string // A description of the image. Description *string // The tags for the image. Tags []types.Tag noSmithyDocumentSerde } type CopyWorkspaceImageOutput struct { // The identifier of the image. ImageId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCopyWorkspaceImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCopyWorkspaceImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCopyWorkspaceImage{}, 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 = addOpCopyWorkspaceImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopyWorkspaceImage(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_opCopyWorkspaceImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CopyWorkspaceImage", } }
150
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 client-add-in for Amazon Connect within a directory. You can create // only one Amazon Connect client add-in within a directory. This client add-in // allows WorkSpaces users to seamlessly connect to Amazon Connect. func (c *Client) CreateConnectClientAddIn(ctx context.Context, params *CreateConnectClientAddInInput, optFns ...func(*Options)) (*CreateConnectClientAddInOutput, error) { if params == nil { params = &CreateConnectClientAddInInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateConnectClientAddIn", params, optFns, c.addOperationCreateConnectClientAddInMiddlewares) if err != nil { return nil, err } out := result.(*CreateConnectClientAddInOutput) out.ResultMetadata = metadata return out, nil } type CreateConnectClientAddInInput struct { // The name of the client add-in. // // This member is required. Name *string // The directory identifier for which to configure the client add-in. // // This member is required. ResourceId *string // The endpoint URL of the Amazon Connect client add-in. // // This member is required. URL *string noSmithyDocumentSerde } type CreateConnectClientAddInOutput struct { // The client add-in identifier. AddInId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateConnectClientAddInMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateConnectClientAddIn{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateConnectClientAddIn{}, 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 = addOpCreateConnectClientAddInValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnectClientAddIn(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_opCreateConnectClientAddIn(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateConnectClientAddIn", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates the specified connection alias for use with cross-Region redirection. // For more information, see Cross-Region Redirection for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . func (c *Client) CreateConnectionAlias(ctx context.Context, params *CreateConnectionAliasInput, optFns ...func(*Options)) (*CreateConnectionAliasOutput, error) { if params == nil { params = &CreateConnectionAliasInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateConnectionAlias", params, optFns, c.addOperationCreateConnectionAliasMiddlewares) if err != nil { return nil, err } out := result.(*CreateConnectionAliasOutput) out.ResultMetadata = metadata return out, nil } type CreateConnectionAliasInput struct { // A connection string in the form of a fully qualified domain name (FQDN), such // as www.example.com . After you create a connection string, it is always // associated to your Amazon Web Services account. You cannot recreate the same // connection string with a different account, even if you delete all instances of // it from the original account. The connection string is globally reserved for // your account. // // This member is required. ConnectionString *string // The tags to associate with the connection alias. Tags []types.Tag noSmithyDocumentSerde } type CreateConnectionAliasOutput struct { // The identifier of the connection alias. AliasId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateConnectionAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateConnectionAlias{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateConnectionAlias{}, 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 = addOpCreateConnectionAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnectionAlias(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_opCreateConnectionAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateConnectionAlias", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an IP access control group. An IP access control group provides you // with the ability to control the IP addresses from which users are allowed to // access their WorkSpaces. To specify the CIDR address ranges, add rules to your // IP access control group and then associate the group with your directory. You // can add rules when you create the group or at any time using AuthorizeIpRules . // There is a default IP access control group associated with your directory. If // you don't associate an IP access control group with your directory, the default // group is used. The default group includes a default rule that allows users to // access their WorkSpaces from anywhere. You cannot modify the default IP access // control group for your directory. func (c *Client) CreateIpGroup(ctx context.Context, params *CreateIpGroupInput, optFns ...func(*Options)) (*CreateIpGroupOutput, error) { if params == nil { params = &CreateIpGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateIpGroup", params, optFns, c.addOperationCreateIpGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateIpGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateIpGroupInput struct { // The name of the group. // // This member is required. GroupName *string // The description of the group. GroupDesc *string // The tags. Each WorkSpaces resource can have a maximum of 50 tags. Tags []types.Tag // The rules to add to the group. UserRules []types.IpRuleItem noSmithyDocumentSerde } type CreateIpGroupOutput struct { // The identifier of the group. GroupId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateIpGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateIpGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateIpGroup{}, 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 = addOpCreateIpGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIpGroup(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_opCreateIpGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateIpGroup", } }
143
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a standby WorkSpace in a secondary Region. func (c *Client) CreateStandbyWorkspaces(ctx context.Context, params *CreateStandbyWorkspacesInput, optFns ...func(*Options)) (*CreateStandbyWorkspacesOutput, error) { if params == nil { params = &CreateStandbyWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateStandbyWorkspaces", params, optFns, c.addOperationCreateStandbyWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*CreateStandbyWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type CreateStandbyWorkspacesInput struct { // The Region of the primary WorkSpace. // // This member is required. PrimaryRegion *string // Information about the standby WorkSpace to be created. // // This member is required. StandbyWorkspaces []types.StandbyWorkspace noSmithyDocumentSerde } type CreateStandbyWorkspacesOutput struct { // Information about the standby WorkSpace that could not be created. FailedStandbyRequests []types.FailedCreateStandbyWorkspacesRequest // Information about the standby WorkSpace that was created. PendingStandbyRequests []types.PendingCreateStandbyWorkspacesRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateStandbyWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateStandbyWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateStandbyWorkspaces{}, 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 = addOpCreateStandbyWorkspacesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStandbyWorkspaces(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_opCreateStandbyWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateStandbyWorkspaces", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates the specified tags for the specified WorkSpaces resource. func (c *Client) CreateTags(ctx context.Context, params *CreateTagsInput, optFns ...func(*Options)) (*CreateTagsOutput, error) { if params == nil { params = &CreateTagsInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateTags", params, optFns, c.addOperationCreateTagsMiddlewares) if err != nil { return nil, err } out := result.(*CreateTagsOutput) out.ResultMetadata = metadata return out, nil } type CreateTagsInput struct { // The identifier of the WorkSpaces resource. The supported resource types are // WorkSpaces, registered directories, images, custom bundles, IP access control // groups, and connection aliases. // // This member is required. ResourceId *string // The tags. Each WorkSpaces resource can have a maximum of 50 tags. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type CreateTagsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateTags{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateTags{}, 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 = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTags(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_opCreateTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateTags", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new updated WorkSpace image based on the specified source image. The // new updated WorkSpace image has the latest drivers and other updates required by // the Amazon WorkSpaces components. To determine which WorkSpace images need to be // updated with the latest Amazon WorkSpaces requirements, use // DescribeWorkspaceImages (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html) // . // - Only Windows 10, Windows Server 2016, and Windows Server 2019 WorkSpace // images can be programmatically updated at this time. // - Microsoft Windows updates and other application updates are not included in // the update process. // - The source WorkSpace image is not deleted. You can delete the source image // after you've verified your new updated image and created a new bundle. func (c *Client) CreateUpdatedWorkspaceImage(ctx context.Context, params *CreateUpdatedWorkspaceImageInput, optFns ...func(*Options)) (*CreateUpdatedWorkspaceImageOutput, error) { if params == nil { params = &CreateUpdatedWorkspaceImageInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateUpdatedWorkspaceImage", params, optFns, c.addOperationCreateUpdatedWorkspaceImageMiddlewares) if err != nil { return nil, err } out := result.(*CreateUpdatedWorkspaceImageOutput) out.ResultMetadata = metadata return out, nil } type CreateUpdatedWorkspaceImageInput struct { // A description of whether updates for the WorkSpace image are available. // // This member is required. Description *string // The name of the new updated WorkSpace image. // // This member is required. Name *string // The identifier of the source WorkSpace image. // // This member is required. SourceImageId *string // The tags that you want to add to the new updated WorkSpace image. To add tags // at the same time when you're creating the updated image, you must create an IAM // policy that grants your IAM user permissions to use workspaces:CreateTags . Tags []types.Tag noSmithyDocumentSerde } type CreateUpdatedWorkspaceImageOutput struct { // The identifier of the new updated WorkSpace image. ImageId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateUpdatedWorkspaceImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUpdatedWorkspaceImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUpdatedWorkspaceImage{}, 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 = addOpCreateUpdatedWorkspaceImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUpdatedWorkspaceImage(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_opCreateUpdatedWorkspaceImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateUpdatedWorkspaceImage", } }
151
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates the specified WorkSpace bundle. For more information about creating // WorkSpace bundles, see Create a Custom WorkSpaces Image and Bundle (https://docs.aws.amazon.com/workspaces/latest/adminguide/create-custom-bundle.html) // . func (c *Client) CreateWorkspaceBundle(ctx context.Context, params *CreateWorkspaceBundleInput, optFns ...func(*Options)) (*CreateWorkspaceBundleOutput, error) { if params == nil { params = &CreateWorkspaceBundleInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateWorkspaceBundle", params, optFns, c.addOperationCreateWorkspaceBundleMiddlewares) if err != nil { return nil, err } out := result.(*CreateWorkspaceBundleOutput) out.ResultMetadata = metadata return out, nil } type CreateWorkspaceBundleInput struct { // The description of the bundle. // // This member is required. BundleDescription *string // The name of the bundle. // // This member is required. BundleName *string // Describes the compute type of the bundle. // // This member is required. ComputeType *types.ComputeType // The identifier of the image that is used to create the bundle. // // This member is required. ImageId *string // Describes the user volume for a WorkSpace bundle. // // This member is required. UserStorage *types.UserStorage // Describes the root volume for a WorkSpace bundle. RootStorage *types.RootStorage // The tags associated with the bundle. To add tags at the same time when you're // creating the bundle, you must create an IAM policy that grants your IAM user // permissions to use workspaces:CreateTags . Tags []types.Tag noSmithyDocumentSerde } type CreateWorkspaceBundleOutput struct { // Describes a WorkSpace bundle. WorkspaceBundle *types.WorkspaceBundle // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateWorkspaceBundleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateWorkspaceBundle{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateWorkspaceBundle{}, 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 = addOpCreateWorkspaceBundleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWorkspaceBundle(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_opCreateWorkspaceBundle(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateWorkspaceBundle", } }
155
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Creates a new WorkSpace image from an existing WorkSpace. func (c *Client) CreateWorkspaceImage(ctx context.Context, params *CreateWorkspaceImageInput, optFns ...func(*Options)) (*CreateWorkspaceImageOutput, error) { if params == nil { params = &CreateWorkspaceImageInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateWorkspaceImage", params, optFns, c.addOperationCreateWorkspaceImageMiddlewares) if err != nil { return nil, err } out := result.(*CreateWorkspaceImageOutput) out.ResultMetadata = metadata return out, nil } type CreateWorkspaceImageInput struct { // The description of the new WorkSpace image. // // This member is required. Description *string // The name of the new WorkSpace image. // // This member is required. Name *string // The identifier of the source WorkSpace // // This member is required. WorkspaceId *string // The tags that you want to add to the new WorkSpace image. To add tags when // you're creating the image, you must create an IAM policy that grants your IAM // user permission to use workspaces:CreateTags . Tags []types.Tag noSmithyDocumentSerde } type CreateWorkspaceImageOutput struct { // The date when the image was created. Created *time.Time // The description of the image. Description *string // The identifier of the new WorkSpace image. ImageId *string // The name of the image. Name *string // The operating system that the image is running. OperatingSystem *types.OperatingSystem // The identifier of the Amazon Web Services account that owns the image. OwnerAccountId *string // Specifies whether the image is running on dedicated hardware. When Bring Your // Own License (BYOL) is enabled, this value is set to DEDICATED. For more // information, see Bring Your Own Windows Desktop Images. (https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.htm) // . RequiredTenancy types.WorkspaceImageRequiredTenancy // The availability status of the image. State types.WorkspaceImageState // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateWorkspaceImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateWorkspaceImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateWorkspaceImage{}, 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 = addOpCreateWorkspaceImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWorkspaceImage(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_opCreateWorkspaceImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateWorkspaceImage", } }
165
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates one or more WorkSpaces. This operation is asynchronous and returns // before the WorkSpaces are created. The MANUAL running mode value is only // supported by Amazon WorkSpaces Core. Contact your account team to be // allow-listed to use this value. For more information, see Amazon WorkSpaces Core (http://aws.amazon.com/workspaces/core/) // . func (c *Client) CreateWorkspaces(ctx context.Context, params *CreateWorkspacesInput, optFns ...func(*Options)) (*CreateWorkspacesOutput, error) { if params == nil { params = &CreateWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateWorkspaces", params, optFns, c.addOperationCreateWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*CreateWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type CreateWorkspacesInput struct { // The WorkSpaces to create. You can specify up to 25 WorkSpaces. // // This member is required. Workspaces []types.WorkspaceRequest noSmithyDocumentSerde } type CreateWorkspacesOutput struct { // Information about the WorkSpaces that could not be created. FailedRequests []types.FailedCreateWorkspaceRequest // Information about the WorkSpaces that were created. Because this operation is // asynchronous, the identifier returned is not immediately available for use with // other operations. For example, if you call DescribeWorkspaces before the // WorkSpace is created, the information returned can be incomplete. PendingRequests []types.Workspace // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateWorkspaces{}, 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 = addOpCreateWorkspacesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWorkspaces(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_opCreateWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "CreateWorkspaces", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes customized client branding. Client branding allows you to customize // your WorkSpace's client login portal. You can tailor your login portal company // logo, the support email address, support link, link to reset password, and a // custom message for users trying to sign in. After you delete your customized // client branding, your login portal reverts to the default client branding. func (c *Client) DeleteClientBranding(ctx context.Context, params *DeleteClientBrandingInput, optFns ...func(*Options)) (*DeleteClientBrandingOutput, error) { if params == nil { params = &DeleteClientBrandingInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteClientBranding", params, optFns, c.addOperationDeleteClientBrandingMiddlewares) if err != nil { return nil, err } out := result.(*DeleteClientBrandingOutput) out.ResultMetadata = metadata return out, nil } type DeleteClientBrandingInput struct { // The device type for which you want to delete client branding. // // This member is required. Platforms []types.ClientDeviceType // The directory identifier of the WorkSpace for which you want to delete client // branding. // // This member is required. ResourceId *string noSmithyDocumentSerde } type DeleteClientBrandingOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteClientBrandingMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteClientBranding{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteClientBranding{}, 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 = addOpDeleteClientBrandingValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteClientBranding(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_opDeleteClientBranding(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeleteClientBranding", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 client-add-in for Amazon Connect that is configured within a // directory. func (c *Client) DeleteConnectClientAddIn(ctx context.Context, params *DeleteConnectClientAddInInput, optFns ...func(*Options)) (*DeleteConnectClientAddInOutput, error) { if params == nil { params = &DeleteConnectClientAddInInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteConnectClientAddIn", params, optFns, c.addOperationDeleteConnectClientAddInMiddlewares) if err != nil { return nil, err } out := result.(*DeleteConnectClientAddInOutput) out.ResultMetadata = metadata return out, nil } type DeleteConnectClientAddInInput struct { // The identifier of the client add-in to delete. // // This member is required. AddInId *string // The directory identifier for which the client add-in is configured. // // This member is required. ResourceId *string noSmithyDocumentSerde } type DeleteConnectClientAddInOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteConnectClientAddInMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteConnectClientAddIn{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteConnectClientAddIn{}, 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 = addOpDeleteConnectClientAddInValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConnectClientAddIn(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_opDeleteConnectClientAddIn(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeleteConnectClientAddIn", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 connection alias. For more information, see Cross-Region // Redirection for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . If you will no longer be using a fully qualified domain name (FQDN) as the // registration code for your WorkSpaces users, you must take certain precautions // to prevent potential security issues. For more information, see Security // Considerations if You Stop Using Cross-Region Redirection (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html#cross-region-redirection-security-considerations) // . To delete a connection alias that has been shared, the shared account must // first disassociate the connection alias from any directories it has been // associated with. Then you must unshare the connection alias from the account it // has been shared with. You can delete a connection alias only after it is no // longer shared with any accounts or associated with any directories. func (c *Client) DeleteConnectionAlias(ctx context.Context, params *DeleteConnectionAliasInput, optFns ...func(*Options)) (*DeleteConnectionAliasOutput, error) { if params == nil { params = &DeleteConnectionAliasInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteConnectionAlias", params, optFns, c.addOperationDeleteConnectionAliasMiddlewares) if err != nil { return nil, err } out := result.(*DeleteConnectionAliasOutput) out.ResultMetadata = metadata return out, nil } type DeleteConnectionAliasInput struct { // The identifier of the connection alias to delete. // // This member is required. AliasId *string noSmithyDocumentSerde } type DeleteConnectionAliasOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteConnectionAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteConnectionAlias{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteConnectionAlias{}, 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 = addOpDeleteConnectionAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConnectionAlias(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_opDeleteConnectionAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeleteConnectionAlias", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified IP access control group. You cannot delete an IP access // control group that is associated with a directory. func (c *Client) DeleteIpGroup(ctx context.Context, params *DeleteIpGroupInput, optFns ...func(*Options)) (*DeleteIpGroupOutput, error) { if params == nil { params = &DeleteIpGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteIpGroup", params, optFns, c.addOperationDeleteIpGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteIpGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteIpGroupInput struct { // The identifier of the IP access control group. // // This member is required. GroupId *string noSmithyDocumentSerde } type DeleteIpGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteIpGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteIpGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteIpGroup{}, 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 = addOpDeleteIpGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIpGroup(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_opDeleteIpGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeleteIpGroup", } }
121
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 tags from the specified WorkSpaces resource. func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns ...func(*Options)) (*DeleteTagsOutput, error) { if params == nil { params = &DeleteTagsInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteTags", params, optFns, c.addOperationDeleteTagsMiddlewares) if err != nil { return nil, err } out := result.(*DeleteTagsOutput) out.ResultMetadata = metadata return out, nil } type DeleteTagsInput struct { // The identifier of the WorkSpaces resource. The supported resource types are // WorkSpaces, registered directories, images, custom bundles, IP access control // groups, and connection aliases. // // This member is required. ResourceId *string // The tag keys. // // This member is required. TagKeys []string noSmithyDocumentSerde } type DeleteTagsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteTags{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteTags{}, 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 = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTags(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_opDeleteTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeleteTags", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 WorkSpace bundle. For more information about deleting // WorkSpace bundles, see Delete a Custom WorkSpaces Bundle or Image (https://docs.aws.amazon.com/workspaces/latest/adminguide/delete_bundle.html) // . func (c *Client) DeleteWorkspaceBundle(ctx context.Context, params *DeleteWorkspaceBundleInput, optFns ...func(*Options)) (*DeleteWorkspaceBundleOutput, error) { if params == nil { params = &DeleteWorkspaceBundleInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteWorkspaceBundle", params, optFns, c.addOperationDeleteWorkspaceBundleMiddlewares) if err != nil { return nil, err } out := result.(*DeleteWorkspaceBundleOutput) out.ResultMetadata = metadata return out, nil } type DeleteWorkspaceBundleInput struct { // The identifier of the bundle. BundleId *string noSmithyDocumentSerde } type DeleteWorkspaceBundleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteWorkspaceBundleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteWorkspaceBundle{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteWorkspaceBundle{}, 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_opDeleteWorkspaceBundle(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_opDeleteWorkspaceBundle(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeleteWorkspaceBundle", } }
117
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 image from your account. To delete an image, you must // first delete any bundles that are associated with the image and unshare the // image if it is shared with other accounts. func (c *Client) DeleteWorkspaceImage(ctx context.Context, params *DeleteWorkspaceImageInput, optFns ...func(*Options)) (*DeleteWorkspaceImageOutput, error) { if params == nil { params = &DeleteWorkspaceImageInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteWorkspaceImage", params, optFns, c.addOperationDeleteWorkspaceImageMiddlewares) if err != nil { return nil, err } out := result.(*DeleteWorkspaceImageOutput) out.ResultMetadata = metadata return out, nil } type DeleteWorkspaceImageInput struct { // The identifier of the image. // // This member is required. ImageId *string noSmithyDocumentSerde } type DeleteWorkspaceImageOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteWorkspaceImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteWorkspaceImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteWorkspaceImage{}, 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 = addOpDeleteWorkspaceImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWorkspaceImage(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_opDeleteWorkspaceImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeleteWorkspaceImage", } }
122
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Deregisters the specified directory. This operation is asynchronous and returns // before the WorkSpace directory is deregistered. If any WorkSpaces are registered // to this directory, you must remove them before you can deregister the directory. // Simple AD and AD Connector are made available to you free of charge to use with // WorkSpaces. If there are no WorkSpaces being used with your Simple AD or AD // Connector directory for 30 consecutive days, this directory will be // automatically deregistered for use with Amazon WorkSpaces, and you will be // charged for this directory as per the Directory Service pricing terms (http://aws.amazon.com/directoryservice/pricing/) // . To delete empty directories, see Delete the Directory for Your WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/delete-workspaces-directory.html) // . If you delete your Simple AD or AD Connector directory, you can always create // a new one when you want to start using WorkSpaces again. func (c *Client) DeregisterWorkspaceDirectory(ctx context.Context, params *DeregisterWorkspaceDirectoryInput, optFns ...func(*Options)) (*DeregisterWorkspaceDirectoryOutput, error) { if params == nil { params = &DeregisterWorkspaceDirectoryInput{} } result, metadata, err := c.invokeOperation(ctx, "DeregisterWorkspaceDirectory", params, optFns, c.addOperationDeregisterWorkspaceDirectoryMiddlewares) if err != nil { return nil, err } out := result.(*DeregisterWorkspaceDirectoryOutput) out.ResultMetadata = metadata return out, nil } type DeregisterWorkspaceDirectoryInput struct { // The identifier of the directory. If any WorkSpaces are registered to this // directory, you must remove them before you deregister the directory, or you will // receive an OperationNotSupportedException error. // // This member is required. DirectoryId *string noSmithyDocumentSerde } type DeregisterWorkspaceDirectoryOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeregisterWorkspaceDirectoryMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterWorkspaceDirectory{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterWorkspaceDirectory{}, 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 = addOpDeregisterWorkspaceDirectoryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterWorkspaceDirectory(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_opDeregisterWorkspaceDirectory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DeregisterWorkspaceDirectory", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list that describes the configuration of Bring Your Own License // (BYOL) for the specified account. func (c *Client) DescribeAccount(ctx context.Context, params *DescribeAccountInput, optFns ...func(*Options)) (*DescribeAccountOutput, error) { if params == nil { params = &DescribeAccountInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeAccount", params, optFns, c.addOperationDescribeAccountMiddlewares) if err != nil { return nil, err } out := result.(*DescribeAccountOutput) out.ResultMetadata = metadata return out, nil } type DescribeAccountInput struct { noSmithyDocumentSerde } type DescribeAccountOutput struct { // The IP address range, specified as an IPv4 CIDR block, used for the management // network interface. The management network interface is connected to a secure // Amazon WorkSpaces management network. It is used for interactive streaming of // the WorkSpace desktop to Amazon WorkSpaces clients, and to allow Amazon // WorkSpaces to manage the WorkSpace. DedicatedTenancyManagementCidrRange *string // The status of BYOL (whether BYOL is enabled or disabled). DedicatedTenancySupport types.DedicatedTenancySupportResultEnum // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeAccountMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAccount{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAccount{}, 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_opDescribeAccount(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_opDescribeAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeAccount", } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list that describes modifications to the configuration of Bring // Your Own License (BYOL) for the specified account. func (c *Client) DescribeAccountModifications(ctx context.Context, params *DescribeAccountModificationsInput, optFns ...func(*Options)) (*DescribeAccountModificationsOutput, error) { if params == nil { params = &DescribeAccountModificationsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeAccountModifications", params, optFns, c.addOperationDescribeAccountModificationsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeAccountModificationsOutput) out.ResultMetadata = metadata return out, nil } type DescribeAccountModificationsInput struct { // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type DescribeAccountModificationsOutput struct { // The list of modifications to the configuration of BYOL. AccountModifications []types.AccountModification // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeAccountModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAccountModifications{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAccountModifications{}, 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_opDescribeAccountModifications(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_opDescribeAccountModifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeAccountModifications", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the specified client branding. Client branding allows you to // customize the log in page of various device types for your users. You can add // your company logo, the support email address, support link, link to reset // password, and a custom message for users trying to sign in. Only device types // that have branding information configured will be shown in the response. func (c *Client) DescribeClientBranding(ctx context.Context, params *DescribeClientBrandingInput, optFns ...func(*Options)) (*DescribeClientBrandingOutput, error) { if params == nil { params = &DescribeClientBrandingInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeClientBranding", params, optFns, c.addOperationDescribeClientBrandingMiddlewares) if err != nil { return nil, err } out := result.(*DescribeClientBrandingOutput) out.ResultMetadata = metadata return out, nil } type DescribeClientBrandingInput struct { // The directory identifier of the WorkSpace for which you want to view client // branding information. // // This member is required. ResourceId *string noSmithyDocumentSerde } type DescribeClientBrandingOutput struct { // The branding information for Android devices. DeviceTypeAndroid *types.DefaultClientBrandingAttributes // The branding information for iOS devices. DeviceTypeIos *types.IosClientBrandingAttributes // The branding information for Linux devices. DeviceTypeLinux *types.DefaultClientBrandingAttributes // The branding information for macOS devices. DeviceTypeOsx *types.DefaultClientBrandingAttributes // The branding information for Web access. DeviceTypeWeb *types.DefaultClientBrandingAttributes // The branding information for Windows devices. DeviceTypeWindows *types.DefaultClientBrandingAttributes // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeClientBrandingMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeClientBranding{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeClientBranding{}, 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 = addOpDescribeClientBrandingValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientBranding(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_opDescribeClientBranding(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeClientBranding", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list that describes one or more specified Amazon WorkSpaces clients. func (c *Client) DescribeClientProperties(ctx context.Context, params *DescribeClientPropertiesInput, optFns ...func(*Options)) (*DescribeClientPropertiesOutput, error) { if params == nil { params = &DescribeClientPropertiesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeClientProperties", params, optFns, c.addOperationDescribeClientPropertiesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeClientPropertiesOutput) out.ResultMetadata = metadata return out, nil } type DescribeClientPropertiesInput struct { // The resource identifier, in the form of directory IDs. // // This member is required. ResourceIds []string noSmithyDocumentSerde } type DescribeClientPropertiesOutput struct { // Information about the specified Amazon WorkSpaces clients. ClientPropertiesList []types.ClientPropertiesResult // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeClientPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeClientProperties{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeClientProperties{}, 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 = addOpDescribeClientPropertiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientProperties(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_opDescribeClientProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeClientProperties", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list of Amazon Connect client add-ins that have been created. func (c *Client) DescribeConnectClientAddIns(ctx context.Context, params *DescribeConnectClientAddInsInput, optFns ...func(*Options)) (*DescribeConnectClientAddInsOutput, error) { if params == nil { params = &DescribeConnectClientAddInsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeConnectClientAddIns", params, optFns, c.addOperationDescribeConnectClientAddInsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeConnectClientAddInsOutput) out.ResultMetadata = metadata return out, nil } type DescribeConnectClientAddInsInput struct { // The directory identifier for which the client add-in is configured. // // This member is required. ResourceId *string // The maximum number of items to return. MaxResults *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type DescribeConnectClientAddInsOutput struct { // Information about client add-ins. AddIns []types.ConnectClientAddIn // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeConnectClientAddInsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeConnectClientAddIns{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeConnectClientAddIns{}, 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 = addOpDescribeConnectClientAddInsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConnectClientAddIns(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_opDescribeConnectClientAddIns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeConnectClientAddIns", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list that describes the connection aliases used for cross-Region // redirection. For more information, see Cross-Region Redirection for Amazon // WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . func (c *Client) DescribeConnectionAliases(ctx context.Context, params *DescribeConnectionAliasesInput, optFns ...func(*Options)) (*DescribeConnectionAliasesOutput, error) { if params == nil { params = &DescribeConnectionAliasesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeConnectionAliases", params, optFns, c.addOperationDescribeConnectionAliasesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeConnectionAliasesOutput) out.ResultMetadata = metadata return out, nil } type DescribeConnectionAliasesInput struct { // The identifiers of the connection aliases to describe. AliasIds []string // The maximum number of connection aliases to return. Limit *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string // The identifier of the directory associated with the connection alias. ResourceId *string noSmithyDocumentSerde } type DescribeConnectionAliasesOutput struct { // Information about the specified connection aliases. ConnectionAliases []types.ConnectionAlias // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeConnectionAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeConnectionAliases{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeConnectionAliases{}, 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_opDescribeConnectionAliases(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_opDescribeConnectionAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeConnectionAliases", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the permissions that the owner of a connection alias has granted to // another Amazon Web Services account for the specified connection alias. For more // information, see Cross-Region Redirection for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . func (c *Client) DescribeConnectionAliasPermissions(ctx context.Context, params *DescribeConnectionAliasPermissionsInput, optFns ...func(*Options)) (*DescribeConnectionAliasPermissionsOutput, error) { if params == nil { params = &DescribeConnectionAliasPermissionsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeConnectionAliasPermissions", params, optFns, c.addOperationDescribeConnectionAliasPermissionsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeConnectionAliasPermissionsOutput) out.ResultMetadata = metadata return out, nil } type DescribeConnectionAliasPermissionsInput struct { // The identifier of the connection alias. // // This member is required. AliasId *string // The maximum number of results to return. MaxResults *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type DescribeConnectionAliasPermissionsOutput struct { // The identifier of the connection alias. AliasId *string // The permissions associated with a connection alias. ConnectionAliasPermissions []types.ConnectionAliasPermission // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeConnectionAliasPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeConnectionAliasPermissions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeConnectionAliasPermissions{}, 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 = addOpDescribeConnectionAliasPermissionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConnectionAliasPermissions(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_opDescribeConnectionAliasPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeConnectionAliasPermissions", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes one or more of your IP access control groups. func (c *Client) DescribeIpGroups(ctx context.Context, params *DescribeIpGroupsInput, optFns ...func(*Options)) (*DescribeIpGroupsOutput, error) { if params == nil { params = &DescribeIpGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeIpGroups", params, optFns, c.addOperationDescribeIpGroupsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeIpGroupsOutput) out.ResultMetadata = metadata return out, nil } type DescribeIpGroupsInput struct { // The identifiers of one or more IP access control groups. GroupIds []string // The maximum number of items to return. MaxResults *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type DescribeIpGroupsOutput 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 // Information about the IP access control groups. Result []types.WorkspacesIpGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeIpGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeIpGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeIpGroups{}, 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_opDescribeIpGroups(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_opDescribeIpGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeIpGroups", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the specified tags for the specified WorkSpaces resource. func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error) { if params == nil { params = &DescribeTagsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeTags", params, optFns, c.addOperationDescribeTagsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeTagsOutput) out.ResultMetadata = metadata return out, nil } type DescribeTagsInput struct { // The identifier of the WorkSpaces resource. The supported resource types are // WorkSpaces, registered directories, images, custom bundles, IP access control // groups, and connection aliases. // // This member is required. ResourceId *string noSmithyDocumentSerde } type DescribeTagsOutput struct { // The tags. TagList []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeTags{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeTags{}, 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 = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTags(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_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeTags", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list that describes the available WorkSpace bundles. You can filter // the results using either bundle ID or owner, but not both. func (c *Client) DescribeWorkspaceBundles(ctx context.Context, params *DescribeWorkspaceBundlesInput, optFns ...func(*Options)) (*DescribeWorkspaceBundlesOutput, error) { if params == nil { params = &DescribeWorkspaceBundlesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkspaceBundles", params, optFns, c.addOperationDescribeWorkspaceBundlesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkspaceBundlesOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkspaceBundlesInput struct { // The identifiers of the bundles. You cannot combine this parameter with any // other filter. BundleIds []string // The token for the next set of results. (You received this token from a previous // call.) NextToken *string // The owner of the bundles. You cannot combine this parameter with any other // filter. To describe the bundles provided by Amazon Web Services, specify AMAZON // . To describe the bundles that belong to your account, don't specify a value. Owner *string noSmithyDocumentSerde } type DescribeWorkspaceBundlesOutput struct { // Information about the bundles. Bundles []types.WorkspaceBundle // The token to use to retrieve the next page of results. This value is null when // there are no more results to return. This token is valid for one day and must be // used within that time frame. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkspaceBundlesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkspaceBundles{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkspaceBundles{}, 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_opDescribeWorkspaceBundles(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 } // DescribeWorkspaceBundlesAPIClient is a client that implements the // DescribeWorkspaceBundles operation. type DescribeWorkspaceBundlesAPIClient interface { DescribeWorkspaceBundles(context.Context, *DescribeWorkspaceBundlesInput, ...func(*Options)) (*DescribeWorkspaceBundlesOutput, error) } var _ DescribeWorkspaceBundlesAPIClient = (*Client)(nil) // DescribeWorkspaceBundlesPaginatorOptions is the paginator options for // DescribeWorkspaceBundles type DescribeWorkspaceBundlesPaginatorOptions struct { // 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 } // DescribeWorkspaceBundlesPaginator is a paginator for DescribeWorkspaceBundles type DescribeWorkspaceBundlesPaginator struct { options DescribeWorkspaceBundlesPaginatorOptions client DescribeWorkspaceBundlesAPIClient params *DescribeWorkspaceBundlesInput nextToken *string firstPage bool } // NewDescribeWorkspaceBundlesPaginator returns a new // DescribeWorkspaceBundlesPaginator func NewDescribeWorkspaceBundlesPaginator(client DescribeWorkspaceBundlesAPIClient, params *DescribeWorkspaceBundlesInput, optFns ...func(*DescribeWorkspaceBundlesPaginatorOptions)) *DescribeWorkspaceBundlesPaginator { if params == nil { params = &DescribeWorkspaceBundlesInput{} } options := DescribeWorkspaceBundlesPaginatorOptions{} for _, fn := range optFns { fn(&options) } return &DescribeWorkspaceBundlesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeWorkspaceBundlesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeWorkspaceBundles page. func (p *DescribeWorkspaceBundlesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeWorkspaceBundlesOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken result, err := p.client.DescribeWorkspaceBundles(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_opDescribeWorkspaceBundles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeWorkspaceBundles", } }
217
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the available directories that are registered with Amazon WorkSpaces. func (c *Client) DescribeWorkspaceDirectories(ctx context.Context, params *DescribeWorkspaceDirectoriesInput, optFns ...func(*Options)) (*DescribeWorkspaceDirectoriesOutput, error) { if params == nil { params = &DescribeWorkspaceDirectoriesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkspaceDirectories", params, optFns, c.addOperationDescribeWorkspaceDirectoriesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkspaceDirectoriesOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkspaceDirectoriesInput struct { // The identifiers of the directories. If the value is null, all directories are // retrieved. DirectoryIds []string // The maximum number of directories to return. Limit *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type DescribeWorkspaceDirectoriesOutput struct { // Information about the directories. Directories []types.WorkspaceDirectory // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkspaceDirectoriesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkspaceDirectories{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkspaceDirectories{}, 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_opDescribeWorkspaceDirectories(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 } // DescribeWorkspaceDirectoriesAPIClient is a client that implements the // DescribeWorkspaceDirectories operation. type DescribeWorkspaceDirectoriesAPIClient interface { DescribeWorkspaceDirectories(context.Context, *DescribeWorkspaceDirectoriesInput, ...func(*Options)) (*DescribeWorkspaceDirectoriesOutput, error) } var _ DescribeWorkspaceDirectoriesAPIClient = (*Client)(nil) // DescribeWorkspaceDirectoriesPaginatorOptions is the paginator options for // DescribeWorkspaceDirectories type DescribeWorkspaceDirectoriesPaginatorOptions struct { // 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 } // DescribeWorkspaceDirectoriesPaginator is a paginator for // DescribeWorkspaceDirectories type DescribeWorkspaceDirectoriesPaginator struct { options DescribeWorkspaceDirectoriesPaginatorOptions client DescribeWorkspaceDirectoriesAPIClient params *DescribeWorkspaceDirectoriesInput nextToken *string firstPage bool } // NewDescribeWorkspaceDirectoriesPaginator returns a new // DescribeWorkspaceDirectoriesPaginator func NewDescribeWorkspaceDirectoriesPaginator(client DescribeWorkspaceDirectoriesAPIClient, params *DescribeWorkspaceDirectoriesInput, optFns ...func(*DescribeWorkspaceDirectoriesPaginatorOptions)) *DescribeWorkspaceDirectoriesPaginator { if params == nil { params = &DescribeWorkspaceDirectoriesInput{} } options := DescribeWorkspaceDirectoriesPaginatorOptions{} for _, fn := range optFns { fn(&options) } return &DescribeWorkspaceDirectoriesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeWorkspaceDirectoriesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeWorkspaceDirectories page. func (p *DescribeWorkspaceDirectoriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeWorkspaceDirectoriesOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken result, err := p.client.DescribeWorkspaceDirectories(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_opDescribeWorkspaceDirectories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeWorkspaceDirectories", } }
214
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the permissions that the owner of an image has granted to other // Amazon Web Services accounts for an image. func (c *Client) DescribeWorkspaceImagePermissions(ctx context.Context, params *DescribeWorkspaceImagePermissionsInput, optFns ...func(*Options)) (*DescribeWorkspaceImagePermissionsOutput, error) { if params == nil { params = &DescribeWorkspaceImagePermissionsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkspaceImagePermissions", params, optFns, c.addOperationDescribeWorkspaceImagePermissionsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkspaceImagePermissionsOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkspaceImagePermissionsInput struct { // The identifier of the image. // // This member is required. ImageId *string // The maximum number of items to return. MaxResults *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type DescribeWorkspaceImagePermissionsOutput struct { // The identifier of the image. ImageId *string // The identifiers of the Amazon Web Services accounts that the image has been // shared with. ImagePermissions []types.ImagePermission // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkspaceImagePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkspaceImagePermissions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkspaceImagePermissions{}, 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 = addOpDescribeWorkspaceImagePermissionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspaceImagePermissions(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_opDescribeWorkspaceImagePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeWorkspaceImagePermissions", } }
141
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list that describes one or more specified images, if the image // identifiers are provided. Otherwise, all images in the account are described. func (c *Client) DescribeWorkspaceImages(ctx context.Context, params *DescribeWorkspaceImagesInput, optFns ...func(*Options)) (*DescribeWorkspaceImagesOutput, error) { if params == nil { params = &DescribeWorkspaceImagesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkspaceImages", params, optFns, c.addOperationDescribeWorkspaceImagesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkspaceImagesOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkspaceImagesInput struct { // The identifier of the image. ImageIds []string // The type (owned or shared) of the image. ImageType types.ImageType // The maximum number of items to return. MaxResults *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type DescribeWorkspaceImagesOutput struct { // Information about the images. Images []types.WorkspaceImage // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkspaceImagesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkspaceImages{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkspaceImages{}, 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_opDescribeWorkspaceImages(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_opDescribeWorkspaceImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeWorkspaceImages", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the specified WorkSpaces. You can filter the results by using the // bundle identifier, directory identifier, or owner, but you can specify only one // filter at a time. func (c *Client) DescribeWorkspaces(ctx context.Context, params *DescribeWorkspacesInput, optFns ...func(*Options)) (*DescribeWorkspacesOutput, error) { if params == nil { params = &DescribeWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkspaces", params, optFns, c.addOperationDescribeWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkspacesInput struct { // The identifier of the bundle. All WorkSpaces that are created from this bundle // are retrieved. You cannot combine this parameter with any other filter. BundleId *string // The identifier of the directory. In addition, you can optionally specify a // specific directory user (see UserName ). You cannot combine this parameter with // any other filter. DirectoryId *string // The maximum number of items to return. Limit *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string // The name of the directory user. You must specify this parameter with DirectoryId // . UserName *string // The identifiers of the WorkSpaces. You cannot combine this parameter with any // other filter. Because the CreateWorkspaces operation is asynchronous, the // identifier it returns is not immediately available. If you immediately call // DescribeWorkspaces with this identifier, no information is returned. WorkspaceIds []string noSmithyDocumentSerde } type DescribeWorkspacesOutput 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 // Information about the WorkSpaces. Because CreateWorkspaces is an asynchronous // operation, some of the returned information could be incomplete. Workspaces []types.Workspace // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkspaces{}, 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_opDescribeWorkspaces(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 } // DescribeWorkspacesAPIClient is a client that implements the DescribeWorkspaces // operation. type DescribeWorkspacesAPIClient interface { DescribeWorkspaces(context.Context, *DescribeWorkspacesInput, ...func(*Options)) (*DescribeWorkspacesOutput, error) } var _ DescribeWorkspacesAPIClient = (*Client)(nil) // DescribeWorkspacesPaginatorOptions is the paginator options for // DescribeWorkspaces type DescribeWorkspacesPaginatorOptions struct { // The maximum number of items to return. 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 } // DescribeWorkspacesPaginator is a paginator for DescribeWorkspaces type DescribeWorkspacesPaginator struct { options DescribeWorkspacesPaginatorOptions client DescribeWorkspacesAPIClient params *DescribeWorkspacesInput nextToken *string firstPage bool } // NewDescribeWorkspacesPaginator returns a new DescribeWorkspacesPaginator func NewDescribeWorkspacesPaginator(client DescribeWorkspacesAPIClient, params *DescribeWorkspacesInput, optFns ...func(*DescribeWorkspacesPaginatorOptions)) *DescribeWorkspacesPaginator { if params == nil { params = &DescribeWorkspacesInput{} } options := DescribeWorkspacesPaginatorOptions{} if params.Limit != nil { options.Limit = *params.Limit } for _, fn := range optFns { fn(&options) } return &DescribeWorkspacesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeWorkspacesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeWorkspaces page. func (p *DescribeWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeWorkspacesOutput, 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.Limit = limit result, err := p.client.DescribeWorkspaces(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_opDescribeWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeWorkspaces", } }
242
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the connection status of the specified WorkSpaces. func (c *Client) DescribeWorkspacesConnectionStatus(ctx context.Context, params *DescribeWorkspacesConnectionStatusInput, optFns ...func(*Options)) (*DescribeWorkspacesConnectionStatusOutput, error) { if params == nil { params = &DescribeWorkspacesConnectionStatusInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkspacesConnectionStatus", params, optFns, c.addOperationDescribeWorkspacesConnectionStatusMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkspacesConnectionStatusOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkspacesConnectionStatusInput struct { // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string // The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces. WorkspaceIds []string noSmithyDocumentSerde } type DescribeWorkspacesConnectionStatusOutput 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 // Information about the connection status of the WorkSpace. WorkspacesConnectionStatus []types.WorkspaceConnectionStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkspacesConnectionStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkspacesConnectionStatus{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkspacesConnectionStatus{}, 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_opDescribeWorkspacesConnectionStatus(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_opDescribeWorkspacesConnectionStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeWorkspacesConnectionStatus", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the snapshots for the specified WorkSpace. func (c *Client) DescribeWorkspaceSnapshots(ctx context.Context, params *DescribeWorkspaceSnapshotsInput, optFns ...func(*Options)) (*DescribeWorkspaceSnapshotsOutput, error) { if params == nil { params = &DescribeWorkspaceSnapshotsInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkspaceSnapshots", params, optFns, c.addOperationDescribeWorkspaceSnapshotsMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkspaceSnapshotsOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkspaceSnapshotsInput struct { // The identifier of the WorkSpace. // // This member is required. WorkspaceId *string noSmithyDocumentSerde } type DescribeWorkspaceSnapshotsOutput struct { // Information about the snapshots that can be used to rebuild a WorkSpace. These // snapshots include the user volume. RebuildSnapshots []types.Snapshot // Information about the snapshots that can be used to restore a WorkSpace. These // snapshots include both the root volume and the user volume. RestoreSnapshots []types.Snapshot // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkspaceSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkspaceSnapshots{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkspaceSnapshots{}, 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 = addOpDescribeWorkspaceSnapshotsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspaceSnapshots(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_opDescribeWorkspaceSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DescribeWorkspaceSnapshots", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Disassociates a connection alias from a directory. Disassociating a connection // alias disables cross-Region redirection between two directories in different // Regions. For more information, see Cross-Region Redirection for Amazon // WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . Before performing this operation, call DescribeConnectionAliases (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeConnectionAliases.html) // to make sure that the current state of the connection alias is CREATED . func (c *Client) DisassociateConnectionAlias(ctx context.Context, params *DisassociateConnectionAliasInput, optFns ...func(*Options)) (*DisassociateConnectionAliasOutput, error) { if params == nil { params = &DisassociateConnectionAliasInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociateConnectionAlias", params, optFns, c.addOperationDisassociateConnectionAliasMiddlewares) if err != nil { return nil, err } out := result.(*DisassociateConnectionAliasOutput) out.ResultMetadata = metadata return out, nil } type DisassociateConnectionAliasInput struct { // The identifier of the connection alias to disassociate. // // This member is required. AliasId *string noSmithyDocumentSerde } type DisassociateConnectionAliasOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociateConnectionAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateConnectionAlias{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateConnectionAlias{}, 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 = addOpDisassociateConnectionAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateConnectionAlias(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_opDisassociateConnectionAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DisassociateConnectionAlias", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Disassociates the specified IP access control group from the specified // directory. func (c *Client) DisassociateIpGroups(ctx context.Context, params *DisassociateIpGroupsInput, optFns ...func(*Options)) (*DisassociateIpGroupsOutput, error) { if params == nil { params = &DisassociateIpGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociateIpGroups", params, optFns, c.addOperationDisassociateIpGroupsMiddlewares) if err != nil { return nil, err } out := result.(*DisassociateIpGroupsOutput) out.ResultMetadata = metadata return out, nil } type DisassociateIpGroupsInput struct { // The identifier of the directory. // // This member is required. DirectoryId *string // The identifiers of one or more IP access control groups. // // This member is required. GroupIds []string noSmithyDocumentSerde } type DisassociateIpGroupsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociateIpGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateIpGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateIpGroups{}, 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 = addOpDisassociateIpGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateIpGroups(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_opDisassociateIpGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "DisassociateIpGroups", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Imports client branding. Client branding allows you to customize your // WorkSpace's client login portal. You can tailor your login portal company logo, // the support email address, support link, link to reset password, and a custom // message for users trying to sign in. After you import client branding, the // default branding experience for the specified platform type is replaced with the // imported experience // - You must specify at least one platform type when importing client branding. // - You can import up to 6 MB of data with each request. If your request // exceeds this limit, you can import client branding for different platform types // using separate requests. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify only one parameter for each platform type, // but not both. // - Imported data can take up to a minute to appear in the WorkSpaces client. func (c *Client) ImportClientBranding(ctx context.Context, params *ImportClientBrandingInput, optFns ...func(*Options)) (*ImportClientBrandingOutput, error) { if params == nil { params = &ImportClientBrandingInput{} } result, metadata, err := c.invokeOperation(ctx, "ImportClientBranding", params, optFns, c.addOperationImportClientBrandingMiddlewares) if err != nil { return nil, err } out := result.(*ImportClientBrandingOutput) out.ResultMetadata = metadata return out, nil } type ImportClientBrandingInput struct { // The directory identifier of the WorkSpace for which you want to import client // branding. // // This member is required. ResourceId *string // The branding information to import for Android devices. DeviceTypeAndroid *types.DefaultImportClientBrandingAttributes // The branding information to import for iOS devices. DeviceTypeIos *types.IosImportClientBrandingAttributes // The branding information to import for Linux devices. DeviceTypeLinux *types.DefaultImportClientBrandingAttributes // The branding information to import for macOS devices. DeviceTypeOsx *types.DefaultImportClientBrandingAttributes // The branding information to import for web access. DeviceTypeWeb *types.DefaultImportClientBrandingAttributes // The branding information to import for Windows devices. DeviceTypeWindows *types.DefaultImportClientBrandingAttributes noSmithyDocumentSerde } type ImportClientBrandingOutput struct { // The branding information configured for Android devices. DeviceTypeAndroid *types.DefaultClientBrandingAttributes // The branding information configured for iOS devices. DeviceTypeIos *types.IosClientBrandingAttributes // The branding information configured for Linux devices. DeviceTypeLinux *types.DefaultClientBrandingAttributes // The branding information configured for macOS devices. DeviceTypeOsx *types.DefaultClientBrandingAttributes // The branding information configured for web access. DeviceTypeWeb *types.DefaultClientBrandingAttributes // The branding information configured for Windows devices. DeviceTypeWindows *types.DefaultClientBrandingAttributes // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationImportClientBrandingMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpImportClientBranding{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpImportClientBranding{}, 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 = addOpImportClientBrandingValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportClientBranding(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_opImportClientBranding(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ImportClientBranding", } }
172
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Imports the specified Windows 10 or 11 Bring Your Own License (BYOL) image into // Amazon WorkSpaces. The image must be an already licensed Amazon EC2 image that // is in your Amazon Web Services account, and you must own the image. For more // information about creating BYOL images, see Bring Your Own Windows Desktop // Licenses (https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html) // . func (c *Client) ImportWorkspaceImage(ctx context.Context, params *ImportWorkspaceImageInput, optFns ...func(*Options)) (*ImportWorkspaceImageOutput, error) { if params == nil { params = &ImportWorkspaceImageInput{} } result, metadata, err := c.invokeOperation(ctx, "ImportWorkspaceImage", params, optFns, c.addOperationImportWorkspaceImageMiddlewares) if err != nil { return nil, err } out := result.(*ImportWorkspaceImageOutput) out.ResultMetadata = metadata return out, nil } type ImportWorkspaceImageInput struct { // The identifier of the EC2 image. // // This member is required. Ec2ImageId *string // The description of the WorkSpace image. // // This member is required. ImageDescription *string // The name of the WorkSpace image. // // This member is required. ImageName *string // The ingestion process to be used when importing the image, depending on which // protocol you want to use for your BYOL Workspace image, either PCoIP, WorkSpaces // Streaming Protocol (WSP), or bring your own protocol (BYOP). To use WSP, specify // a value that ends in _WSP . To use PCoIP, specify a value that does not end in // _WSP . To use BYOP, specify a value that ends in _BYOP . For non-GPU-enabled // bundles (bundles other than Graphics or GraphicsPro), specify BYOL_REGULAR , // BYOL_REGULAR_WSP , or BYOL_REGULAR_BYOP , depending on the protocol. The // BYOL_REGULAR_BYOP and BYOL_GRAPHICS_G4DN_BYOP values are only supported by // Amazon WorkSpaces Core. Contact your account team to be allow-listed to use // these values. For more information, see Amazon WorkSpaces Core (http://aws.amazon.com/workspaces/core/) // . // // This member is required. IngestionProcess types.WorkspaceImageIngestionProcess // If specified, the version of Microsoft Office to subscribe to. Valid only for // Windows 10 and 11 BYOL images. For more information about subscribing to Office // for BYOL images, see Bring Your Own Windows Desktop Licenses (https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html) // . // - Although this parameter is an array, only one item is allowed at this time. // - Windows 11 only supports Microsoft_Office_2019 . Applications []types.Application // The tags. Each WorkSpaces resource can have a maximum of 50 tags. Tags []types.Tag noSmithyDocumentSerde } type ImportWorkspaceImageOutput struct { // The identifier of the WorkSpace image. ImageId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationImportWorkspaceImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpImportWorkspaceImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpImportWorkspaceImage{}, 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 = addOpImportWorkspaceImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportWorkspaceImage(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_opImportWorkspaceImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ImportWorkspaceImage", } }
166
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you // can use for the network management interface when you enable Bring Your Own // License (BYOL). This operation can be run only by Amazon Web Services accounts // that are enabled for BYOL. If your account isn't enabled for BYOL, you'll // receive an AccessDeniedException error. The management network interface is // connected to a secure Amazon WorkSpaces management network. It is used for // interactive streaming of the WorkSpace desktop to Amazon WorkSpaces clients, and // to allow Amazon WorkSpaces to manage the WorkSpace. func (c *Client) ListAvailableManagementCidrRanges(ctx context.Context, params *ListAvailableManagementCidrRangesInput, optFns ...func(*Options)) (*ListAvailableManagementCidrRangesOutput, error) { if params == nil { params = &ListAvailableManagementCidrRangesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListAvailableManagementCidrRanges", params, optFns, c.addOperationListAvailableManagementCidrRangesMiddlewares) if err != nil { return nil, err } out := result.(*ListAvailableManagementCidrRangesOutput) out.ResultMetadata = metadata return out, nil } type ListAvailableManagementCidrRangesInput struct { // The IP address range to search. Specify an IP address range that is compatible // with your network and in CIDR notation (that is, specify the range as an IPv4 // CIDR block). // // This member is required. ManagementCidrRangeConstraint *string // The maximum number of items to return. MaxResults *int32 // If you received a NextToken from a previous call that was paginated, provide // this token to receive the next set of results. NextToken *string noSmithyDocumentSerde } type ListAvailableManagementCidrRangesOutput struct { // The list of available IP address ranges, specified as IPv4 CIDR blocks. ManagementCidrRanges []string // 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 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListAvailableManagementCidrRangesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAvailableManagementCidrRanges{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAvailableManagementCidrRanges{}, 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 = addOpListAvailableManagementCidrRangesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAvailableManagementCidrRanges(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_opListAvailableManagementCidrRanges(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ListAvailableManagementCidrRanges", } }
144
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Migrates a WorkSpace from one operating system or bundle type to another, while // retaining the data on the user volume. The migration process recreates the // WorkSpace by using a new root volume from the target bundle image and the user // volume from the last available snapshot of the original WorkSpace. During // migration, the original D:\Users\%USERNAME% user profile folder is renamed to // D:\Users\%USERNAME%MMddyyTHHmmss%.NotMigrated . A new D:\Users\%USERNAME%\ // folder is generated by the new OS. Certain files in the old user profile are // moved to the new user profile. For available migration scenarios, details about // what happens during migration, and best practices, see Migrate a WorkSpace (https://docs.aws.amazon.com/workspaces/latest/adminguide/migrate-workspaces.html) // . func (c *Client) MigrateWorkspace(ctx context.Context, params *MigrateWorkspaceInput, optFns ...func(*Options)) (*MigrateWorkspaceOutput, error) { if params == nil { params = &MigrateWorkspaceInput{} } result, metadata, err := c.invokeOperation(ctx, "MigrateWorkspace", params, optFns, c.addOperationMigrateWorkspaceMiddlewares) if err != nil { return nil, err } out := result.(*MigrateWorkspaceOutput) out.ResultMetadata = metadata return out, nil } type MigrateWorkspaceInput struct { // The identifier of the target bundle type to migrate the WorkSpace to. // // This member is required. BundleId *string // The identifier of the WorkSpace to migrate from. // // This member is required. SourceWorkspaceId *string noSmithyDocumentSerde } type MigrateWorkspaceOutput struct { // The original identifier of the WorkSpace that is being migrated. SourceWorkspaceId *string // The new identifier of the WorkSpace that is being migrated. If the migration // does not succeed, the target WorkSpace ID will not be used, and the WorkSpace // will still have the original WorkSpace ID. TargetWorkspaceId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationMigrateWorkspaceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpMigrateWorkspace{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpMigrateWorkspace{}, 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 = addOpMigrateWorkspaceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMigrateWorkspace(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_opMigrateWorkspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "MigrateWorkspace", } }
143
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the configuration of Bring Your Own License (BYOL) for the specified // account. func (c *Client) ModifyAccount(ctx context.Context, params *ModifyAccountInput, optFns ...func(*Options)) (*ModifyAccountOutput, error) { if params == nil { params = &ModifyAccountInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyAccount", params, optFns, c.addOperationModifyAccountMiddlewares) if err != nil { return nil, err } out := result.(*ModifyAccountOutput) out.ResultMetadata = metadata return out, nil } type ModifyAccountInput struct { // The IP address range, specified as an IPv4 CIDR block, for the management // network interface. Specify an IP address range that is compatible with your // network and in CIDR notation (that is, specify the range as an IPv4 CIDR block). // The CIDR block size must be /16 (for example, 203.0.113.25/16). It must also be // specified as available by the ListAvailableManagementCidrRanges operation. DedicatedTenancyManagementCidrRange *string // The status of BYOL. DedicatedTenancySupport types.DedicatedTenancySupportEnum noSmithyDocumentSerde } type ModifyAccountOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyAccountMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyAccount{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyAccount{}, 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_opModifyAccount(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_opModifyAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifyAccount", } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the properties of the certificate-based authentication you want to use // with your WorkSpaces. func (c *Client) ModifyCertificateBasedAuthProperties(ctx context.Context, params *ModifyCertificateBasedAuthPropertiesInput, optFns ...func(*Options)) (*ModifyCertificateBasedAuthPropertiesOutput, error) { if params == nil { params = &ModifyCertificateBasedAuthPropertiesInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyCertificateBasedAuthProperties", params, optFns, c.addOperationModifyCertificateBasedAuthPropertiesMiddlewares) if err != nil { return nil, err } out := result.(*ModifyCertificateBasedAuthPropertiesOutput) out.ResultMetadata = metadata return out, nil } type ModifyCertificateBasedAuthPropertiesInput struct { // The resource identifiers, in the form of directory IDs. // // This member is required. ResourceId *string // The properties of the certificate-based authentication. CertificateBasedAuthProperties *types.CertificateBasedAuthProperties // The properties of the certificate-based authentication you want to delete. PropertiesToDelete []types.DeletableCertificateBasedAuthProperty noSmithyDocumentSerde } type ModifyCertificateBasedAuthPropertiesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyCertificateBasedAuthPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyCertificateBasedAuthProperties{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyCertificateBasedAuthProperties{}, 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 = addOpModifyCertificateBasedAuthPropertiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCertificateBasedAuthProperties(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_opModifyCertificateBasedAuthProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifyCertificateBasedAuthProperties", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the properties of the specified Amazon WorkSpaces clients. func (c *Client) ModifyClientProperties(ctx context.Context, params *ModifyClientPropertiesInput, optFns ...func(*Options)) (*ModifyClientPropertiesOutput, error) { if params == nil { params = &ModifyClientPropertiesInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyClientProperties", params, optFns, c.addOperationModifyClientPropertiesMiddlewares) if err != nil { return nil, err } out := result.(*ModifyClientPropertiesOutput) out.ResultMetadata = metadata return out, nil } type ModifyClientPropertiesInput struct { // Information about the Amazon WorkSpaces client. // // This member is required. ClientProperties *types.ClientProperties // The resource identifiers, in the form of directory IDs. // // This member is required. ResourceId *string noSmithyDocumentSerde } type ModifyClientPropertiesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyClientPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyClientProperties{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyClientProperties{}, 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 = addOpModifyClientPropertiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClientProperties(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_opModifyClientProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifyClientProperties", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies multiple properties related to SAML 2.0 authentication, including the // enablement status, user access URL, and relay state parameter name that are used // for configuring federation with an SAML 2.0 identity provider. func (c *Client) ModifySamlProperties(ctx context.Context, params *ModifySamlPropertiesInput, optFns ...func(*Options)) (*ModifySamlPropertiesOutput, error) { if params == nil { params = &ModifySamlPropertiesInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifySamlProperties", params, optFns, c.addOperationModifySamlPropertiesMiddlewares) if err != nil { return nil, err } out := result.(*ModifySamlPropertiesOutput) out.ResultMetadata = metadata return out, nil } type ModifySamlPropertiesInput struct { // The directory identifier for which you want to configure SAML properties. // // This member is required. ResourceId *string // The SAML properties to delete as part of your request. Specify one of the // following options: // - SAML_PROPERTIES_USER_ACCESS_URL to delete the user access URL. // - SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME to delete the relay state // parameter name. PropertiesToDelete []types.DeletableSamlProperty // The properties for configuring SAML 2.0 authentication. SamlProperties *types.SamlProperties noSmithyDocumentSerde } type ModifySamlPropertiesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifySamlPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifySamlProperties{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifySamlProperties{}, 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 = addOpModifySamlPropertiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySamlProperties(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_opModifySamlProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifySamlProperties", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the self-service WorkSpace management capabilities for your users. For // more information, see Enable Self-Service WorkSpace Management Capabilities for // Your Users (https://docs.aws.amazon.com/workspaces/latest/adminguide/enable-user-self-service-workspace-management.html) // . func (c *Client) ModifySelfservicePermissions(ctx context.Context, params *ModifySelfservicePermissionsInput, optFns ...func(*Options)) (*ModifySelfservicePermissionsOutput, error) { if params == nil { params = &ModifySelfservicePermissionsInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifySelfservicePermissions", params, optFns, c.addOperationModifySelfservicePermissionsMiddlewares) if err != nil { return nil, err } out := result.(*ModifySelfservicePermissionsOutput) out.ResultMetadata = metadata return out, nil } type ModifySelfservicePermissionsInput struct { // The identifier of the directory. // // This member is required. ResourceId *string // The permissions to enable or disable self-service capabilities. // // This member is required. SelfservicePermissions *types.SelfservicePermissions noSmithyDocumentSerde } type ModifySelfservicePermissionsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifySelfservicePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifySelfservicePermissions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifySelfservicePermissions{}, 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 = addOpModifySelfservicePermissionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySelfservicePermissions(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_opModifySelfservicePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifySelfservicePermissions", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Specifies which devices and operating systems users can use to access their // WorkSpaces. For more information, see Control Device Access (https://docs.aws.amazon.com/workspaces/latest/adminguide/update-directory-details.html#control-device-access) // . func (c *Client) ModifyWorkspaceAccessProperties(ctx context.Context, params *ModifyWorkspaceAccessPropertiesInput, optFns ...func(*Options)) (*ModifyWorkspaceAccessPropertiesOutput, error) { if params == nil { params = &ModifyWorkspaceAccessPropertiesInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyWorkspaceAccessProperties", params, optFns, c.addOperationModifyWorkspaceAccessPropertiesMiddlewares) if err != nil { return nil, err } out := result.(*ModifyWorkspaceAccessPropertiesOutput) out.ResultMetadata = metadata return out, nil } type ModifyWorkspaceAccessPropertiesInput struct { // The identifier of the directory. // // This member is required. ResourceId *string // The device types and operating systems to enable or disable for access. // // This member is required. WorkspaceAccessProperties *types.WorkspaceAccessProperties noSmithyDocumentSerde } type ModifyWorkspaceAccessPropertiesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyWorkspaceAccessPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyWorkspaceAccessProperties{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyWorkspaceAccessProperties{}, 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 = addOpModifyWorkspaceAccessPropertiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyWorkspaceAccessProperties(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_opModifyWorkspaceAccessProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifyWorkspaceAccessProperties", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modify the default properties used to create WorkSpaces. func (c *Client) ModifyWorkspaceCreationProperties(ctx context.Context, params *ModifyWorkspaceCreationPropertiesInput, optFns ...func(*Options)) (*ModifyWorkspaceCreationPropertiesOutput, error) { if params == nil { params = &ModifyWorkspaceCreationPropertiesInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyWorkspaceCreationProperties", params, optFns, c.addOperationModifyWorkspaceCreationPropertiesMiddlewares) if err != nil { return nil, err } out := result.(*ModifyWorkspaceCreationPropertiesOutput) out.ResultMetadata = metadata return out, nil } type ModifyWorkspaceCreationPropertiesInput struct { // The identifier of the directory. // // This member is required. ResourceId *string // The default properties for creating WorkSpaces. // // This member is required. WorkspaceCreationProperties *types.WorkspaceCreationProperties noSmithyDocumentSerde } type ModifyWorkspaceCreationPropertiesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyWorkspaceCreationPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyWorkspaceCreationProperties{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyWorkspaceCreationProperties{}, 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 = addOpModifyWorkspaceCreationPropertiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyWorkspaceCreationProperties(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_opModifyWorkspaceCreationProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifyWorkspaceCreationProperties", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the specified WorkSpace properties. For important information about // how to modify the size of the root and user volumes, see Modify a WorkSpace (https://docs.aws.amazon.com/workspaces/latest/adminguide/modify-workspaces.html) // . The MANUAL running mode value is only supported by Amazon WorkSpaces Core. // Contact your account team to be allow-listed to use this value. For more // information, see Amazon WorkSpaces Core (http://aws.amazon.com/workspaces/core/) // . func (c *Client) ModifyWorkspaceProperties(ctx context.Context, params *ModifyWorkspacePropertiesInput, optFns ...func(*Options)) (*ModifyWorkspacePropertiesOutput, error) { if params == nil { params = &ModifyWorkspacePropertiesInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyWorkspaceProperties", params, optFns, c.addOperationModifyWorkspacePropertiesMiddlewares) if err != nil { return nil, err } out := result.(*ModifyWorkspacePropertiesOutput) out.ResultMetadata = metadata return out, nil } type ModifyWorkspacePropertiesInput struct { // The identifier of the WorkSpace. // // This member is required. WorkspaceId *string // The properties of the WorkSpace. // // This member is required. WorkspaceProperties *types.WorkspaceProperties noSmithyDocumentSerde } type ModifyWorkspacePropertiesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyWorkspacePropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyWorkspaceProperties{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyWorkspaceProperties{}, 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 = addOpModifyWorkspacePropertiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyWorkspaceProperties(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_opModifyWorkspaceProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifyWorkspaceProperties", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sets the state of the specified WorkSpace. To maintain a WorkSpace without // being interrupted, set the WorkSpace state to ADMIN_MAINTENANCE . WorkSpaces in // this state do not respond to requests to reboot, stop, start, rebuild, or // restore. An AutoStop WorkSpace in this state is not stopped. Users cannot log // into a WorkSpace in the ADMIN_MAINTENANCE state. func (c *Client) ModifyWorkspaceState(ctx context.Context, params *ModifyWorkspaceStateInput, optFns ...func(*Options)) (*ModifyWorkspaceStateOutput, error) { if params == nil { params = &ModifyWorkspaceStateInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyWorkspaceState", params, optFns, c.addOperationModifyWorkspaceStateMiddlewares) if err != nil { return nil, err } out := result.(*ModifyWorkspaceStateOutput) out.ResultMetadata = metadata return out, nil } type ModifyWorkspaceStateInput struct { // The identifier of the WorkSpace. // // This member is required. WorkspaceId *string // The WorkSpace state. // // This member is required. WorkspaceState types.TargetWorkspaceState noSmithyDocumentSerde } type ModifyWorkspaceStateOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyWorkspaceStateMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyWorkspaceState{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyWorkspaceState{}, 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 = addOpModifyWorkspaceStateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyWorkspaceState(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_opModifyWorkspaceState(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "ModifyWorkspaceState", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Reboots the specified WorkSpaces. You cannot reboot a WorkSpace unless its // state is AVAILABLE or UNHEALTHY . This operation is asynchronous and returns // before the WorkSpaces have rebooted. func (c *Client) RebootWorkspaces(ctx context.Context, params *RebootWorkspacesInput, optFns ...func(*Options)) (*RebootWorkspacesOutput, error) { if params == nil { params = &RebootWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "RebootWorkspaces", params, optFns, c.addOperationRebootWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*RebootWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type RebootWorkspacesInput struct { // The WorkSpaces to reboot. You can specify up to 25 WorkSpaces. // // This member is required. RebootWorkspaceRequests []types.RebootRequest noSmithyDocumentSerde } type RebootWorkspacesOutput struct { // Information about the WorkSpaces that could not be rebooted. FailedRequests []types.FailedWorkspaceChangeRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRebootWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRebootWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRebootWorkspaces{}, 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 = addOpRebootWorkspacesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootWorkspaces(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_opRebootWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "RebootWorkspaces", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Rebuilds the specified WorkSpace. You cannot rebuild a WorkSpace unless its // state is AVAILABLE , ERROR , UNHEALTHY , STOPPED , or REBOOTING . Rebuilding a // WorkSpace is a potentially destructive action that can result in the loss of // data. For more information, see Rebuild a WorkSpace (https://docs.aws.amazon.com/workspaces/latest/adminguide/reset-workspace.html) // . This operation is asynchronous and returns before the WorkSpaces have been // completely rebuilt. func (c *Client) RebuildWorkspaces(ctx context.Context, params *RebuildWorkspacesInput, optFns ...func(*Options)) (*RebuildWorkspacesOutput, error) { if params == nil { params = &RebuildWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "RebuildWorkspaces", params, optFns, c.addOperationRebuildWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*RebuildWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type RebuildWorkspacesInput struct { // The WorkSpace to rebuild. You can specify a single WorkSpace. // // This member is required. RebuildWorkspaceRequests []types.RebuildRequest noSmithyDocumentSerde } type RebuildWorkspacesOutput struct { // Information about the WorkSpace that could not be rebuilt. FailedRequests []types.FailedWorkspaceChangeRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRebuildWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRebuildWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRebuildWorkspaces{}, 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 = addOpRebuildWorkspacesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebuildWorkspaces(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_opRebuildWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "RebuildWorkspaces", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Registers the specified directory. This operation is asynchronous and returns // before the WorkSpace directory is registered. If this is the first time you are // registering a directory, you will need to create the workspaces_DefaultRole role // before you can register a directory. For more information, see Creating the // workspaces_DefaultRole Role (https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html#create-default-role) // . func (c *Client) RegisterWorkspaceDirectory(ctx context.Context, params *RegisterWorkspaceDirectoryInput, optFns ...func(*Options)) (*RegisterWorkspaceDirectoryOutput, error) { if params == nil { params = &RegisterWorkspaceDirectoryInput{} } result, metadata, err := c.invokeOperation(ctx, "RegisterWorkspaceDirectory", params, optFns, c.addOperationRegisterWorkspaceDirectoryMiddlewares) if err != nil { return nil, err } out := result.(*RegisterWorkspaceDirectoryOutput) out.ResultMetadata = metadata return out, nil } type RegisterWorkspaceDirectoryInput struct { // The identifier of the directory. You cannot register a directory if it does not // have a status of Active. If the directory does not have a status of Active, you // will receive an InvalidResourceStateException error. If you have already // registered the maximum number of directories that you can register with Amazon // WorkSpaces, you will receive a ResourceLimitExceededException error. Deregister // directories that you are not using for WorkSpaces, and try again. // // This member is required. DirectoryId *string // Indicates whether Amazon WorkDocs is enabled or disabled. If you have enabled // this parameter and WorkDocs is not available in the Region, you will receive an // OperationNotSupportedException error. Set EnableWorkDocs to disabled, and try // again. // // This member is required. EnableWorkDocs *bool // Indicates whether self-service capabilities are enabled or disabled. EnableSelfService *bool // The identifiers of the subnets for your virtual private cloud (VPC). Make sure // that the subnets are in supported Availability Zones. The subnets must also be // in separate Availability Zones. If these conditions are not met, you will // receive an OperationNotSupportedException error. SubnetIds []string // The tags associated with the directory. Tags []types.Tag // Indicates whether your WorkSpace directory is dedicated or shared. To use Bring // Your Own License (BYOL) images, this value must be set to DEDICATED and your // Amazon Web Services account must be enabled for BYOL. If your account has not // been enabled for BYOL, you will receive an InvalidParameterValuesException // error. For more information about BYOL images, see Bring Your Own Windows // Desktop Images (https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html) // . Tenancy types.Tenancy noSmithyDocumentSerde } type RegisterWorkspaceDirectoryOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRegisterWorkspaceDirectoryMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterWorkspaceDirectory{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterWorkspaceDirectory{}, 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 = addOpRegisterWorkspaceDirectoryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterWorkspaceDirectory(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_opRegisterWorkspaceDirectory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "RegisterWorkspaceDirectory", } }
160
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Restores the specified WorkSpace to its last known healthy state. You cannot // restore a WorkSpace unless its state is AVAILABLE , ERROR , UNHEALTHY , or // STOPPED . Restoring a WorkSpace is a potentially destructive action that can // result in the loss of data. For more information, see Restore a WorkSpace (https://docs.aws.amazon.com/workspaces/latest/adminguide/restore-workspace.html) // . This operation is asynchronous and returns before the WorkSpace is completely // restored. func (c *Client) RestoreWorkspace(ctx context.Context, params *RestoreWorkspaceInput, optFns ...func(*Options)) (*RestoreWorkspaceOutput, error) { if params == nil { params = &RestoreWorkspaceInput{} } result, metadata, err := c.invokeOperation(ctx, "RestoreWorkspace", params, optFns, c.addOperationRestoreWorkspaceMiddlewares) if err != nil { return nil, err } out := result.(*RestoreWorkspaceOutput) out.ResultMetadata = metadata return out, nil } type RestoreWorkspaceInput struct { // The identifier of the WorkSpace. // // This member is required. WorkspaceId *string noSmithyDocumentSerde } type RestoreWorkspaceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRestoreWorkspaceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRestoreWorkspace{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRestoreWorkspace{}, 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 = addOpRestoreWorkspaceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreWorkspace(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_opRestoreWorkspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "RestoreWorkspace", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 one or more rules from the specified IP access control group. func (c *Client) RevokeIpRules(ctx context.Context, params *RevokeIpRulesInput, optFns ...func(*Options)) (*RevokeIpRulesOutput, error) { if params == nil { params = &RevokeIpRulesInput{} } result, metadata, err := c.invokeOperation(ctx, "RevokeIpRules", params, optFns, c.addOperationRevokeIpRulesMiddlewares) if err != nil { return nil, err } out := result.(*RevokeIpRulesOutput) out.ResultMetadata = metadata return out, nil } type RevokeIpRulesInput struct { // The identifier of the group. // // This member is required. GroupId *string // The rules to remove from the group. // // This member is required. UserRules []string noSmithyDocumentSerde } type RevokeIpRulesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRevokeIpRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRevokeIpRules{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRevokeIpRules{}, 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 = addOpRevokeIpRulesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeIpRules(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_opRevokeIpRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "RevokeIpRules", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Starts the specified WorkSpaces. You cannot start a WorkSpace unless it has a // running mode of AutoStop and a state of STOPPED . func (c *Client) StartWorkspaces(ctx context.Context, params *StartWorkspacesInput, optFns ...func(*Options)) (*StartWorkspacesOutput, error) { if params == nil { params = &StartWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "StartWorkspaces", params, optFns, c.addOperationStartWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*StartWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type StartWorkspacesInput struct { // The WorkSpaces to start. You can specify up to 25 WorkSpaces. // // This member is required. StartWorkspaceRequests []types.StartRequest noSmithyDocumentSerde } type StartWorkspacesOutput struct { // Information about the WorkSpaces that could not be started. FailedRequests []types.FailedWorkspaceChangeRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStartWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartWorkspaces{}, 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 = addOpStartWorkspacesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartWorkspaces(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_opStartWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "StartWorkspaces", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Stops the specified WorkSpaces. You cannot stop a WorkSpace unless it has a // running mode of AutoStop and a state of AVAILABLE , IMPAIRED , UNHEALTHY , or // ERROR . func (c *Client) StopWorkspaces(ctx context.Context, params *StopWorkspacesInput, optFns ...func(*Options)) (*StopWorkspacesOutput, error) { if params == nil { params = &StopWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "StopWorkspaces", params, optFns, c.addOperationStopWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*StopWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type StopWorkspacesInput struct { // The WorkSpaces to stop. You can specify up to 25 WorkSpaces. // // This member is required. StopWorkspaceRequests []types.StopRequest noSmithyDocumentSerde } type StopWorkspacesOutput struct { // Information about the WorkSpaces that could not be stopped. FailedRequests []types.FailedWorkspaceChangeRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStopWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopWorkspaces{}, 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 = addOpStopWorkspacesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopWorkspaces(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_opStopWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "StopWorkspaces", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Terminates the specified WorkSpaces. Terminating a WorkSpace is a permanent // action and cannot be undone. The user's data is destroyed. If you need to // archive any user data, contact Amazon Web Services Support before terminating // the WorkSpace. You can terminate a WorkSpace that is in any state except // SUSPENDED . This operation is asynchronous and returns before the WorkSpaces // have been completely terminated. After a WorkSpace is terminated, the TERMINATED // state is returned only briefly before the WorkSpace directory metadata is // cleaned up, so this state is rarely returned. To confirm that a WorkSpace is // terminated, check for the WorkSpace ID by using DescribeWorkSpaces (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html) // . If the WorkSpace ID isn't returned, then the WorkSpace has been successfully // terminated. Simple AD and AD Connector are made available to you free of charge // to use with WorkSpaces. If there are no WorkSpaces being used with your Simple // AD or AD Connector directory for 30 consecutive days, this directory will be // automatically deregistered for use with Amazon WorkSpaces, and you will be // charged for this directory as per the Directory Service pricing terms (http://aws.amazon.com/directoryservice/pricing/) // . To delete empty directories, see Delete the Directory for Your WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/delete-workspaces-directory.html) // . If you delete your Simple AD or AD Connector directory, you can always create // a new one when you want to start using WorkSpaces again. func (c *Client) TerminateWorkspaces(ctx context.Context, params *TerminateWorkspacesInput, optFns ...func(*Options)) (*TerminateWorkspacesOutput, error) { if params == nil { params = &TerminateWorkspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "TerminateWorkspaces", params, optFns, c.addOperationTerminateWorkspacesMiddlewares) if err != nil { return nil, err } out := result.(*TerminateWorkspacesOutput) out.ResultMetadata = metadata return out, nil } type TerminateWorkspacesInput struct { // The WorkSpaces to terminate. You can specify up to 25 WorkSpaces. // // This member is required. TerminateWorkspaceRequests []types.TerminateRequest noSmithyDocumentSerde } type TerminateWorkspacesOutput struct { // Information about the WorkSpaces that could not be terminated. FailedRequests []types.FailedWorkspaceChangeRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTerminateWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpTerminateWorkspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTerminateWorkspaces{}, 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 = addOpTerminateWorkspacesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateWorkspaces(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_opTerminateWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "TerminateWorkspaces", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 Amazon Connect client add-in. Use this action to update the name and // endpoint URL of a Amazon Connect client add-in. func (c *Client) UpdateConnectClientAddIn(ctx context.Context, params *UpdateConnectClientAddInInput, optFns ...func(*Options)) (*UpdateConnectClientAddInOutput, error) { if params == nil { params = &UpdateConnectClientAddInInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateConnectClientAddIn", params, optFns, c.addOperationUpdateConnectClientAddInMiddlewares) if err != nil { return nil, err } out := result.(*UpdateConnectClientAddInOutput) out.ResultMetadata = metadata return out, nil } type UpdateConnectClientAddInInput struct { // The identifier of the client add-in to update. // // This member is required. AddInId *string // The directory identifier for which the client add-in is configured. // // This member is required. ResourceId *string // The name of the client add-in. Name *string // The endpoint URL of the Amazon Connect client add-in. URL *string noSmithyDocumentSerde } type UpdateConnectClientAddInOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateConnectClientAddInMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateConnectClientAddIn{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateConnectClientAddIn{}, 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 = addOpUpdateConnectClientAddInValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateConnectClientAddIn(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_opUpdateConnectClientAddIn(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "UpdateConnectClientAddIn", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Shares or unshares a connection alias with one account by specifying whether // that account has permission to associate the connection alias with a directory. // If the association permission is granted, the connection alias is shared with // that account. If the association permission is revoked, the connection alias is // unshared with the account. For more information, see Cross-Region Redirection // for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . // - Before performing this operation, call DescribeConnectionAliases (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeConnectionAliases.html) // to make sure that the current state of the connection alias is CREATED . // - To delete a connection alias that has been shared, the shared account must // first disassociate the connection alias from any directories it has been // associated with. Then you must unshare the connection alias from the account it // has been shared with. You can delete a connection alias only after it is no // longer shared with any accounts or associated with any directories. func (c *Client) UpdateConnectionAliasPermission(ctx context.Context, params *UpdateConnectionAliasPermissionInput, optFns ...func(*Options)) (*UpdateConnectionAliasPermissionOutput, error) { if params == nil { params = &UpdateConnectionAliasPermissionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateConnectionAliasPermission", params, optFns, c.addOperationUpdateConnectionAliasPermissionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateConnectionAliasPermissionOutput) out.ResultMetadata = metadata return out, nil } type UpdateConnectionAliasPermissionInput struct { // The identifier of the connection alias that you want to update permissions for. // // This member is required. AliasId *string // Indicates whether to share or unshare the connection alias with the specified // Amazon Web Services account. // // This member is required. ConnectionAliasPermission *types.ConnectionAliasPermission noSmithyDocumentSerde } type UpdateConnectionAliasPermissionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateConnectionAliasPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateConnectionAliasPermission{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateConnectionAliasPermission{}, 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 = addOpUpdateConnectionAliasPermissionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateConnectionAliasPermission(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_opUpdateConnectionAliasPermission(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "UpdateConnectionAliasPermission", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Replaces the current rules of the specified IP access control group with the // specified rules. func (c *Client) UpdateRulesOfIpGroup(ctx context.Context, params *UpdateRulesOfIpGroupInput, optFns ...func(*Options)) (*UpdateRulesOfIpGroupOutput, error) { if params == nil { params = &UpdateRulesOfIpGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRulesOfIpGroup", params, optFns, c.addOperationUpdateRulesOfIpGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRulesOfIpGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateRulesOfIpGroupInput struct { // The identifier of the group. // // This member is required. GroupId *string // One or more rules. // // This member is required. UserRules []types.IpRuleItem noSmithyDocumentSerde } type UpdateRulesOfIpGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRulesOfIpGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRulesOfIpGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRulesOfIpGroup{}, 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 = addOpUpdateRulesOfIpGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRulesOfIpGroup(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_opUpdateRulesOfIpGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "UpdateRulesOfIpGroup", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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 WorkSpace bundle with a new image. For more information about // updating WorkSpace bundles, see Update a Custom WorkSpaces Bundle (https://docs.aws.amazon.com/workspaces/latest/adminguide/update-custom-bundle.html) // . Existing WorkSpaces aren't automatically updated when you update the bundle // that they're based on. To update existing WorkSpaces that are based on a bundle // that you've updated, you must either rebuild the WorkSpaces or delete and // recreate them. func (c *Client) UpdateWorkspaceBundle(ctx context.Context, params *UpdateWorkspaceBundleInput, optFns ...func(*Options)) (*UpdateWorkspaceBundleOutput, error) { if params == nil { params = &UpdateWorkspaceBundleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateWorkspaceBundle", params, optFns, c.addOperationUpdateWorkspaceBundleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateWorkspaceBundleOutput) out.ResultMetadata = metadata return out, nil } type UpdateWorkspaceBundleInput struct { // The identifier of the bundle. BundleId *string // The identifier of the image. ImageId *string noSmithyDocumentSerde } type UpdateWorkspaceBundleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateWorkspaceBundleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateWorkspaceBundle{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateWorkspaceBundle{}, 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_opUpdateWorkspaceBundle(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_opUpdateWorkspaceBundle(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "UpdateWorkspaceBundle", } }
123
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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" ) // Shares or unshares an image with one account in the same Amazon Web Services // Region by specifying whether that account has permission to copy the image. If // the copy image permission is granted, the image is shared with that account. If // the copy image permission is revoked, the image is unshared with the account. // After an image has been shared, the recipient account can copy the image to // other Regions as needed. In the China (Ningxia) Region, you can copy images only // within the same Region. In Amazon Web Services GovCloud (US), to copy images to // and from other Regions, contact Amazon Web Services Support. For more // information about sharing images, see Share or Unshare a Custom WorkSpaces Image (https://docs.aws.amazon.com/workspaces/latest/adminguide/share-custom-image.html) // . // - To delete an image that has been shared, you must unshare the image before // you delete it. // - Sharing Bring Your Own License (BYOL) images across Amazon Web Services // accounts isn't supported at this time in Amazon Web Services GovCloud (US). To // share BYOL images across accounts in Amazon Web Services GovCloud (US), contact // Amazon Web Services Support. func (c *Client) UpdateWorkspaceImagePermission(ctx context.Context, params *UpdateWorkspaceImagePermissionInput, optFns ...func(*Options)) (*UpdateWorkspaceImagePermissionOutput, error) { if params == nil { params = &UpdateWorkspaceImagePermissionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateWorkspaceImagePermission", params, optFns, c.addOperationUpdateWorkspaceImagePermissionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateWorkspaceImagePermissionOutput) out.ResultMetadata = metadata return out, nil } type UpdateWorkspaceImagePermissionInput struct { // The permission to copy the image. This permission can be revoked only after an // image has been shared. // // This member is required. AllowCopyImage *bool // The identifier of the image. // // This member is required. ImageId *string // The identifier of the Amazon Web Services account to share or unshare the image // with. Before sharing the image, confirm that you are sharing to the correct // Amazon Web Services account ID. // // This member is required. SharedAccountId *string noSmithyDocumentSerde } type UpdateWorkspaceImagePermissionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateWorkspaceImagePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateWorkspaceImagePermission{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateWorkspaceImagePermission{}, 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 = addOpUpdateWorkspaceImagePermissionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateWorkspaceImagePermission(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_opUpdateWorkspaceImagePermission(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces", OperationName: "UpdateWorkspaceImagePermission", } }
148
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/workspaces/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" "strings" ) type awsAwsjson11_deserializeOpAssociateConnectionAlias struct { } func (*awsAwsjson11_deserializeOpAssociateConnectionAlias) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAssociateConnectionAlias) HandleDeserialize(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_deserializeOpErrorAssociateConnectionAlias(response, &metadata) } output := &AssociateConnectionAliasOutput{} 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_deserializeOpDocumentAssociateConnectionAliasOutput(&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_deserializeOpErrorAssociateConnectionAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAssociatedException", errorCode): return awsAwsjson11_deserializeErrorResourceAssociatedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAssociateIpGroups struct { } func (*awsAwsjson11_deserializeOpAssociateIpGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAssociateIpGroups) HandleDeserialize(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_deserializeOpErrorAssociateIpGroups(response, &metadata) } output := &AssociateIpGroupsOutput{} 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_deserializeOpDocumentAssociateIpGroupsOutput(&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_deserializeOpErrorAssociateIpGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAuthorizeIpRules struct { } func (*awsAwsjson11_deserializeOpAuthorizeIpRules) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAuthorizeIpRules) HandleDeserialize(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_deserializeOpErrorAuthorizeIpRules(response, &metadata) } output := &AuthorizeIpRulesOutput{} 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_deserializeOpDocumentAuthorizeIpRulesOutput(&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_deserializeOpErrorAuthorizeIpRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCopyWorkspaceImage struct { } func (*awsAwsjson11_deserializeOpCopyWorkspaceImage) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCopyWorkspaceImage) HandleDeserialize(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_deserializeOpErrorCopyWorkspaceImage(response, &metadata) } output := &CopyWorkspaceImageOutput{} 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_deserializeOpDocumentCopyWorkspaceImageOutput(&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_deserializeOpErrorCopyWorkspaceImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateConnectClientAddIn struct { } func (*awsAwsjson11_deserializeOpCreateConnectClientAddIn) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateConnectClientAddIn) HandleDeserialize(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_deserializeOpErrorCreateConnectClientAddIn(response, &metadata) } output := &CreateConnectClientAddInOutput{} 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_deserializeOpDocumentCreateConnectClientAddInOutput(&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_deserializeOpErrorCreateConnectClientAddIn(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceCreationFailedException", errorCode): return awsAwsjson11_deserializeErrorResourceCreationFailedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateConnectionAlias struct { } func (*awsAwsjson11_deserializeOpCreateConnectionAlias) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateConnectionAlias) HandleDeserialize(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_deserializeOpErrorCreateConnectionAlias(response, &metadata) } output := &CreateConnectionAliasOutput{} 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_deserializeOpDocumentCreateConnectionAliasOutput(&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_deserializeOpErrorCreateConnectionAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateIpGroup struct { } func (*awsAwsjson11_deserializeOpCreateIpGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateIpGroup) HandleDeserialize(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_deserializeOpErrorCreateIpGroup(response, &metadata) } output := &CreateIpGroupOutput{} 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_deserializeOpDocumentCreateIpGroupOutput(&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_deserializeOpErrorCreateIpGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceCreationFailedException", errorCode): return awsAwsjson11_deserializeErrorResourceCreationFailedException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateStandbyWorkspaces struct { } func (*awsAwsjson11_deserializeOpCreateStandbyWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateStandbyWorkspaces) HandleDeserialize(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_deserializeOpErrorCreateStandbyWorkspaces(response, &metadata) } output := &CreateStandbyWorkspacesOutput{} 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_deserializeOpDocumentCreateStandbyWorkspacesOutput(&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_deserializeOpErrorCreateStandbyWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateTags struct { } func (*awsAwsjson11_deserializeOpCreateTags) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateTags) HandleDeserialize(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_deserializeOpErrorCreateTags(response, &metadata) } output := &CreateTagsOutput{} 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_deserializeOpDocumentCreateTagsOutput(&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_deserializeOpErrorCreateTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateUpdatedWorkspaceImage struct { } func (*awsAwsjson11_deserializeOpCreateUpdatedWorkspaceImage) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateUpdatedWorkspaceImage) HandleDeserialize(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_deserializeOpErrorCreateUpdatedWorkspaceImage(response, &metadata) } output := &CreateUpdatedWorkspaceImageOutput{} 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_deserializeOpDocumentCreateUpdatedWorkspaceImageOutput(&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_deserializeOpErrorCreateUpdatedWorkspaceImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateWorkspaceBundle struct { } func (*awsAwsjson11_deserializeOpCreateWorkspaceBundle) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateWorkspaceBundle) HandleDeserialize(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_deserializeOpErrorCreateWorkspaceBundle(response, &metadata) } output := &CreateWorkspaceBundleOutput{} 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_deserializeOpDocumentCreateWorkspaceBundleOutput(&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_deserializeOpErrorCreateWorkspaceBundle(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateWorkspaceImage struct { } func (*awsAwsjson11_deserializeOpCreateWorkspaceImage) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateWorkspaceImage) HandleDeserialize(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_deserializeOpErrorCreateWorkspaceImage(response, &metadata) } output := &CreateWorkspaceImageOutput{} 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_deserializeOpDocumentCreateWorkspaceImageOutput(&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_deserializeOpErrorCreateWorkspaceImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateWorkspaces struct { } func (*awsAwsjson11_deserializeOpCreateWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateWorkspaces) HandleDeserialize(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_deserializeOpErrorCreateWorkspaces(response, &metadata) } output := &CreateWorkspacesOutput{} 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_deserializeOpDocumentCreateWorkspacesOutput(&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_deserializeOpErrorCreateWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteClientBranding struct { } func (*awsAwsjson11_deserializeOpDeleteClientBranding) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteClientBranding) HandleDeserialize(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_deserializeOpErrorDeleteClientBranding(response, &metadata) } output := &DeleteClientBrandingOutput{} 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_deserializeOpDocumentDeleteClientBrandingOutput(&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_deserializeOpErrorDeleteClientBranding(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteConnectClientAddIn struct { } func (*awsAwsjson11_deserializeOpDeleteConnectClientAddIn) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteConnectClientAddIn) HandleDeserialize(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_deserializeOpErrorDeleteConnectClientAddIn(response, &metadata) } output := &DeleteConnectClientAddInOutput{} 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_deserializeOpDocumentDeleteConnectClientAddInOutput(&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_deserializeOpErrorDeleteConnectClientAddIn(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteConnectionAlias struct { } func (*awsAwsjson11_deserializeOpDeleteConnectionAlias) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteConnectionAlias) HandleDeserialize(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_deserializeOpErrorDeleteConnectionAlias(response, &metadata) } output := &DeleteConnectionAliasOutput{} 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_deserializeOpDocumentDeleteConnectionAliasOutput(&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_deserializeOpErrorDeleteConnectionAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAssociatedException", errorCode): return awsAwsjson11_deserializeErrorResourceAssociatedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteIpGroup struct { } func (*awsAwsjson11_deserializeOpDeleteIpGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteIpGroup) HandleDeserialize(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_deserializeOpErrorDeleteIpGroup(response, &metadata) } output := &DeleteIpGroupOutput{} 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_deserializeOpDocumentDeleteIpGroupOutput(&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_deserializeOpErrorDeleteIpGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceAssociatedException", errorCode): return awsAwsjson11_deserializeErrorResourceAssociatedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteTags struct { } func (*awsAwsjson11_deserializeOpDeleteTags) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteTags) HandleDeserialize(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_deserializeOpErrorDeleteTags(response, &metadata) } output := &DeleteTagsOutput{} 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_deserializeOpDocumentDeleteTagsOutput(&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_deserializeOpErrorDeleteTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteWorkspaceBundle struct { } func (*awsAwsjson11_deserializeOpDeleteWorkspaceBundle) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteWorkspaceBundle) HandleDeserialize(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_deserializeOpErrorDeleteWorkspaceBundle(response, &metadata) } output := &DeleteWorkspaceBundleOutput{} 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_deserializeOpDocumentDeleteWorkspaceBundleOutput(&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_deserializeOpErrorDeleteWorkspaceBundle(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceAssociatedException", errorCode): return awsAwsjson11_deserializeErrorResourceAssociatedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteWorkspaceImage struct { } func (*awsAwsjson11_deserializeOpDeleteWorkspaceImage) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteWorkspaceImage) HandleDeserialize(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_deserializeOpErrorDeleteWorkspaceImage(response, &metadata) } output := &DeleteWorkspaceImageOutput{} 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_deserializeOpDocumentDeleteWorkspaceImageOutput(&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_deserializeOpErrorDeleteWorkspaceImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("ResourceAssociatedException", errorCode): return awsAwsjson11_deserializeErrorResourceAssociatedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeregisterWorkspaceDirectory struct { } func (*awsAwsjson11_deserializeOpDeregisterWorkspaceDirectory) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeregisterWorkspaceDirectory) HandleDeserialize(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_deserializeOpErrorDeregisterWorkspaceDirectory(response, &metadata) } output := &DeregisterWorkspaceDirectoryOutput{} 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_deserializeOpDocumentDeregisterWorkspaceDirectoryOutput(&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_deserializeOpErrorDeregisterWorkspaceDirectory(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeAccount struct { } func (*awsAwsjson11_deserializeOpDescribeAccount) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeAccount) HandleDeserialize(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_deserializeOpErrorDescribeAccount(response, &metadata) } output := &DescribeAccountOutput{} 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_deserializeOpDocumentDescribeAccountOutput(&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_deserializeOpErrorDescribeAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeAccountModifications struct { } func (*awsAwsjson11_deserializeOpDescribeAccountModifications) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeAccountModifications) HandleDeserialize(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_deserializeOpErrorDescribeAccountModifications(response, &metadata) } output := &DescribeAccountModificationsOutput{} 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_deserializeOpDocumentDescribeAccountModificationsOutput(&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_deserializeOpErrorDescribeAccountModifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeClientBranding struct { } func (*awsAwsjson11_deserializeOpDescribeClientBranding) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeClientBranding) HandleDeserialize(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_deserializeOpErrorDescribeClientBranding(response, &metadata) } output := &DescribeClientBrandingOutput{} 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_deserializeOpDocumentDescribeClientBrandingOutput(&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_deserializeOpErrorDescribeClientBranding(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeClientProperties struct { } func (*awsAwsjson11_deserializeOpDescribeClientProperties) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeClientProperties) HandleDeserialize(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_deserializeOpErrorDescribeClientProperties(response, &metadata) } output := &DescribeClientPropertiesOutput{} 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_deserializeOpDocumentDescribeClientPropertiesOutput(&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_deserializeOpErrorDescribeClientProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeConnectClientAddIns struct { } func (*awsAwsjson11_deserializeOpDescribeConnectClientAddIns) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeConnectClientAddIns) HandleDeserialize(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_deserializeOpErrorDescribeConnectClientAddIns(response, &metadata) } output := &DescribeConnectClientAddInsOutput{} 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_deserializeOpDocumentDescribeConnectClientAddInsOutput(&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_deserializeOpErrorDescribeConnectClientAddIns(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeConnectionAliases struct { } func (*awsAwsjson11_deserializeOpDescribeConnectionAliases) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeConnectionAliases) HandleDeserialize(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_deserializeOpErrorDescribeConnectionAliases(response, &metadata) } output := &DescribeConnectionAliasesOutput{} 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_deserializeOpDocumentDescribeConnectionAliasesOutput(&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_deserializeOpErrorDescribeConnectionAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeConnectionAliasPermissions struct { } func (*awsAwsjson11_deserializeOpDescribeConnectionAliasPermissions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeConnectionAliasPermissions) HandleDeserialize(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_deserializeOpErrorDescribeConnectionAliasPermissions(response, &metadata) } output := &DescribeConnectionAliasPermissionsOutput{} 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_deserializeOpDocumentDescribeConnectionAliasPermissionsOutput(&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_deserializeOpErrorDescribeConnectionAliasPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeIpGroups struct { } func (*awsAwsjson11_deserializeOpDescribeIpGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeIpGroups) HandleDeserialize(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_deserializeOpErrorDescribeIpGroups(response, &metadata) } output := &DescribeIpGroupsOutput{} 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_deserializeOpDocumentDescribeIpGroupsOutput(&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_deserializeOpErrorDescribeIpGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeTags struct { } func (*awsAwsjson11_deserializeOpDescribeTags) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeTags) HandleDeserialize(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_deserializeOpErrorDescribeTags(response, &metadata) } output := &DescribeTagsOutput{} 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_deserializeOpDocumentDescribeTagsOutput(&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_deserializeOpErrorDescribeTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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_deserializeOpDescribeWorkspaceBundles struct { } func (*awsAwsjson11_deserializeOpDescribeWorkspaceBundles) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeWorkspaceBundles) HandleDeserialize(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_deserializeOpErrorDescribeWorkspaceBundles(response, &metadata) } output := &DescribeWorkspaceBundlesOutput{} 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_deserializeOpDocumentDescribeWorkspaceBundlesOutput(&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_deserializeOpErrorDescribeWorkspaceBundles(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeWorkspaceDirectories struct { } func (*awsAwsjson11_deserializeOpDescribeWorkspaceDirectories) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeWorkspaceDirectories) HandleDeserialize(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_deserializeOpErrorDescribeWorkspaceDirectories(response, &metadata) } output := &DescribeWorkspaceDirectoriesOutput{} 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_deserializeOpDocumentDescribeWorkspaceDirectoriesOutput(&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_deserializeOpErrorDescribeWorkspaceDirectories(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeWorkspaceImagePermissions struct { } func (*awsAwsjson11_deserializeOpDescribeWorkspaceImagePermissions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeWorkspaceImagePermissions) HandleDeserialize(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_deserializeOpErrorDescribeWorkspaceImagePermissions(response, &metadata) } output := &DescribeWorkspaceImagePermissionsOutput{} 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_deserializeOpDocumentDescribeWorkspaceImagePermissionsOutput(&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_deserializeOpErrorDescribeWorkspaceImagePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeWorkspaceImages struct { } func (*awsAwsjson11_deserializeOpDescribeWorkspaceImages) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeWorkspaceImages) HandleDeserialize(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_deserializeOpErrorDescribeWorkspaceImages(response, &metadata) } output := &DescribeWorkspaceImagesOutput{} 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_deserializeOpDocumentDescribeWorkspaceImagesOutput(&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_deserializeOpErrorDescribeWorkspaceImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeWorkspaces struct { } func (*awsAwsjson11_deserializeOpDescribeWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeWorkspaces) HandleDeserialize(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_deserializeOpErrorDescribeWorkspaces(response, &metadata) } output := &DescribeWorkspacesOutput{} 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_deserializeOpDocumentDescribeWorkspacesOutput(&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_deserializeOpErrorDescribeWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeWorkspacesConnectionStatus struct { } func (*awsAwsjson11_deserializeOpDescribeWorkspacesConnectionStatus) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeWorkspacesConnectionStatus) HandleDeserialize(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_deserializeOpErrorDescribeWorkspacesConnectionStatus(response, &metadata) } output := &DescribeWorkspacesConnectionStatusOutput{} 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_deserializeOpDocumentDescribeWorkspacesConnectionStatusOutput(&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_deserializeOpErrorDescribeWorkspacesConnectionStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeWorkspaceSnapshots struct { } func (*awsAwsjson11_deserializeOpDescribeWorkspaceSnapshots) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeWorkspaceSnapshots) HandleDeserialize(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_deserializeOpErrorDescribeWorkspaceSnapshots(response, &metadata) } output := &DescribeWorkspaceSnapshotsOutput{} 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_deserializeOpDocumentDescribeWorkspaceSnapshotsOutput(&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_deserializeOpErrorDescribeWorkspaceSnapshots(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDisassociateConnectionAlias struct { } func (*awsAwsjson11_deserializeOpDisassociateConnectionAlias) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDisassociateConnectionAlias) HandleDeserialize(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_deserializeOpErrorDisassociateConnectionAlias(response, &metadata) } output := &DisassociateConnectionAliasOutput{} 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_deserializeOpDocumentDisassociateConnectionAliasOutput(&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_deserializeOpErrorDisassociateConnectionAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDisassociateIpGroups struct { } func (*awsAwsjson11_deserializeOpDisassociateIpGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDisassociateIpGroups) HandleDeserialize(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_deserializeOpErrorDisassociateIpGroups(response, &metadata) } output := &DisassociateIpGroupsOutput{} 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_deserializeOpDocumentDisassociateIpGroupsOutput(&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_deserializeOpErrorDisassociateIpGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpImportClientBranding struct { } func (*awsAwsjson11_deserializeOpImportClientBranding) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpImportClientBranding) HandleDeserialize(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_deserializeOpErrorImportClientBranding(response, &metadata) } output := &ImportClientBrandingOutput{} 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_deserializeOpDocumentImportClientBrandingOutput(&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_deserializeOpErrorImportClientBranding(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpImportWorkspaceImage struct { } func (*awsAwsjson11_deserializeOpImportWorkspaceImage) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpImportWorkspaceImage) HandleDeserialize(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_deserializeOpErrorImportWorkspaceImage(response, &metadata) } output := &ImportWorkspaceImageOutput{} 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_deserializeOpDocumentImportWorkspaceImageOutput(&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_deserializeOpErrorImportWorkspaceImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListAvailableManagementCidrRanges struct { } func (*awsAwsjson11_deserializeOpListAvailableManagementCidrRanges) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListAvailableManagementCidrRanges) HandleDeserialize(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_deserializeOpErrorListAvailableManagementCidrRanges(response, &metadata) } output := &ListAvailableManagementCidrRangesOutput{} 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_deserializeOpDocumentListAvailableManagementCidrRangesOutput(&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_deserializeOpErrorListAvailableManagementCidrRanges(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpMigrateWorkspace struct { } func (*awsAwsjson11_deserializeOpMigrateWorkspace) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpMigrateWorkspace) HandleDeserialize(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_deserializeOpErrorMigrateWorkspace(response, &metadata) } output := &MigrateWorkspaceOutput{} 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_deserializeOpDocumentMigrateWorkspaceOutput(&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_deserializeOpErrorMigrateWorkspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationInProgressException", errorCode): return awsAwsjson11_deserializeErrorOperationInProgressException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifyAccount struct { } func (*awsAwsjson11_deserializeOpModifyAccount) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifyAccount) HandleDeserialize(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_deserializeOpErrorModifyAccount(response, &metadata) } output := &ModifyAccountOutput{} 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_deserializeOpDocumentModifyAccountOutput(&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_deserializeOpErrorModifyAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifyCertificateBasedAuthProperties struct { } func (*awsAwsjson11_deserializeOpModifyCertificateBasedAuthProperties) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifyCertificateBasedAuthProperties) HandleDeserialize(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_deserializeOpErrorModifyCertificateBasedAuthProperties(response, &metadata) } output := &ModifyCertificateBasedAuthPropertiesOutput{} 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_deserializeOpDocumentModifyCertificateBasedAuthPropertiesOutput(&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_deserializeOpErrorModifyCertificateBasedAuthProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifyClientProperties struct { } func (*awsAwsjson11_deserializeOpModifyClientProperties) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifyClientProperties) HandleDeserialize(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_deserializeOpErrorModifyClientProperties(response, &metadata) } output := &ModifyClientPropertiesOutput{} 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_deserializeOpDocumentModifyClientPropertiesOutput(&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_deserializeOpErrorModifyClientProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifySamlProperties struct { } func (*awsAwsjson11_deserializeOpModifySamlProperties) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifySamlProperties) HandleDeserialize(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_deserializeOpErrorModifySamlProperties(response, &metadata) } output := &ModifySamlPropertiesOutput{} 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_deserializeOpDocumentModifySamlPropertiesOutput(&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_deserializeOpErrorModifySamlProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifySelfservicePermissions struct { } func (*awsAwsjson11_deserializeOpModifySelfservicePermissions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifySelfservicePermissions) HandleDeserialize(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_deserializeOpErrorModifySelfservicePermissions(response, &metadata) } output := &ModifySelfservicePermissionsOutput{} 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_deserializeOpDocumentModifySelfservicePermissionsOutput(&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_deserializeOpErrorModifySelfservicePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifyWorkspaceAccessProperties struct { } func (*awsAwsjson11_deserializeOpModifyWorkspaceAccessProperties) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifyWorkspaceAccessProperties) HandleDeserialize(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_deserializeOpErrorModifyWorkspaceAccessProperties(response, &metadata) } output := &ModifyWorkspaceAccessPropertiesOutput{} 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_deserializeOpDocumentModifyWorkspaceAccessPropertiesOutput(&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_deserializeOpErrorModifyWorkspaceAccessProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifyWorkspaceCreationProperties struct { } func (*awsAwsjson11_deserializeOpModifyWorkspaceCreationProperties) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifyWorkspaceCreationProperties) HandleDeserialize(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_deserializeOpErrorModifyWorkspaceCreationProperties(response, &metadata) } output := &ModifyWorkspaceCreationPropertiesOutput{} 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_deserializeOpDocumentModifyWorkspaceCreationPropertiesOutput(&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_deserializeOpErrorModifyWorkspaceCreationProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifyWorkspaceProperties struct { } func (*awsAwsjson11_deserializeOpModifyWorkspaceProperties) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifyWorkspaceProperties) HandleDeserialize(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_deserializeOpErrorModifyWorkspaceProperties(response, &metadata) } output := &ModifyWorkspacePropertiesOutput{} 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_deserializeOpDocumentModifyWorkspacePropertiesOutput(&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_deserializeOpErrorModifyWorkspaceProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationInProgressException", errorCode): return awsAwsjson11_deserializeErrorOperationInProgressException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) case strings.EqualFold("UnsupportedWorkspaceConfigurationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedWorkspaceConfigurationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpModifyWorkspaceState struct { } func (*awsAwsjson11_deserializeOpModifyWorkspaceState) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpModifyWorkspaceState) HandleDeserialize(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_deserializeOpErrorModifyWorkspaceState(response, &metadata) } output := &ModifyWorkspaceStateOutput{} 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_deserializeOpDocumentModifyWorkspaceStateOutput(&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_deserializeOpErrorModifyWorkspaceState(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRebootWorkspaces struct { } func (*awsAwsjson11_deserializeOpRebootWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRebootWorkspaces) HandleDeserialize(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_deserializeOpErrorRebootWorkspaces(response, &metadata) } output := &RebootWorkspacesOutput{} 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_deserializeOpDocumentRebootWorkspacesOutput(&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_deserializeOpErrorRebootWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRebuildWorkspaces struct { } func (*awsAwsjson11_deserializeOpRebuildWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRebuildWorkspaces) HandleDeserialize(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_deserializeOpErrorRebuildWorkspaces(response, &metadata) } output := &RebuildWorkspacesOutput{} 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_deserializeOpDocumentRebuildWorkspacesOutput(&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_deserializeOpErrorRebuildWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRegisterWorkspaceDirectory struct { } func (*awsAwsjson11_deserializeOpRegisterWorkspaceDirectory) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRegisterWorkspaceDirectory) HandleDeserialize(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_deserializeOpErrorRegisterWorkspaceDirectory(response, &metadata) } output := &RegisterWorkspaceDirectoryOutput{} 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_deserializeOpDocumentRegisterWorkspaceDirectoryOutput(&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_deserializeOpErrorRegisterWorkspaceDirectory(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedNetworkConfigurationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedNetworkConfigurationException(response, errorBody) case strings.EqualFold("WorkspacesDefaultRoleNotFoundException", errorCode): return awsAwsjson11_deserializeErrorWorkspacesDefaultRoleNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRestoreWorkspace struct { } func (*awsAwsjson11_deserializeOpRestoreWorkspace) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRestoreWorkspace) HandleDeserialize(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_deserializeOpErrorRestoreWorkspace(response, &metadata) } output := &RestoreWorkspaceOutput{} 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_deserializeOpDocumentRestoreWorkspaceOutput(&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_deserializeOpErrorRestoreWorkspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRevokeIpRules struct { } func (*awsAwsjson11_deserializeOpRevokeIpRules) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRevokeIpRules) HandleDeserialize(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_deserializeOpErrorRevokeIpRules(response, &metadata) } output := &RevokeIpRulesOutput{} 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_deserializeOpDocumentRevokeIpRulesOutput(&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_deserializeOpErrorRevokeIpRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpStartWorkspaces struct { } func (*awsAwsjson11_deserializeOpStartWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpStartWorkspaces) HandleDeserialize(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_deserializeOpErrorStartWorkspaces(response, &metadata) } output := &StartWorkspacesOutput{} 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_deserializeOpDocumentStartWorkspacesOutput(&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_deserializeOpErrorStartWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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 { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpStopWorkspaces struct { } func (*awsAwsjson11_deserializeOpStopWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpStopWorkspaces) HandleDeserialize(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_deserializeOpErrorStopWorkspaces(response, &metadata) } output := &StopWorkspacesOutput{} 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_deserializeOpDocumentStopWorkspacesOutput(&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_deserializeOpErrorStopWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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 { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpTerminateWorkspaces struct { } func (*awsAwsjson11_deserializeOpTerminateWorkspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpTerminateWorkspaces) HandleDeserialize(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_deserializeOpErrorTerminateWorkspaces(response, &metadata) } output := &TerminateWorkspacesOutput{} 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_deserializeOpDocumentTerminateWorkspacesOutput(&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_deserializeOpErrorTerminateWorkspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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 { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateConnectClientAddIn struct { } func (*awsAwsjson11_deserializeOpUpdateConnectClientAddIn) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateConnectClientAddIn) HandleDeserialize(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_deserializeOpErrorUpdateConnectClientAddIn(response, &metadata) } output := &UpdateConnectClientAddInOutput{} 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_deserializeOpDocumentUpdateConnectClientAddInOutput(&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_deserializeOpErrorUpdateConnectClientAddIn(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateConnectionAliasPermission struct { } func (*awsAwsjson11_deserializeOpUpdateConnectionAliasPermission) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateConnectionAliasPermission) HandleDeserialize(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_deserializeOpErrorUpdateConnectionAliasPermission(response, &metadata) } output := &UpdateConnectionAliasPermissionOutput{} 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_deserializeOpDocumentUpdateConnectionAliasPermissionOutput(&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_deserializeOpErrorUpdateConnectionAliasPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceAssociatedException", errorCode): return awsAwsjson11_deserializeErrorResourceAssociatedException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateRulesOfIpGroup struct { } func (*awsAwsjson11_deserializeOpUpdateRulesOfIpGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateRulesOfIpGroup) HandleDeserialize(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_deserializeOpErrorUpdateRulesOfIpGroup(response, &metadata) } output := &UpdateRulesOfIpGroupOutput{} 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_deserializeOpDocumentUpdateRulesOfIpGroupOutput(&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_deserializeOpErrorUpdateRulesOfIpGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateWorkspaceBundle struct { } func (*awsAwsjson11_deserializeOpUpdateWorkspaceBundle) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateWorkspaceBundle) HandleDeserialize(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_deserializeOpErrorUpdateWorkspaceBundle(response, &metadata) } output := &UpdateWorkspaceBundleOutput{} 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_deserializeOpDocumentUpdateWorkspaceBundleOutput(&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_deserializeOpErrorUpdateWorkspaceBundle(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateWorkspaceImagePermission struct { } func (*awsAwsjson11_deserializeOpUpdateWorkspaceImagePermission) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateWorkspaceImagePermission) HandleDeserialize(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_deserializeOpErrorUpdateWorkspaceImagePermission(response, &metadata) } output := &UpdateWorkspaceImagePermissionOutput{} 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_deserializeOpDocumentUpdateWorkspaceImagePermissionOutput(&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_deserializeOpErrorUpdateWorkspaceImagePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) case strings.EqualFold("OperationNotSupportedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorResourceUnavailableException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorAccessDeniedException(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.AccessDeniedException{} err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidParameterValuesException(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.InvalidParameterValuesException{} err := awsAwsjson11_deserializeDocumentInvalidParameterValuesException(&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_deserializeErrorInvalidResourceStateException(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.InvalidResourceStateException{} err := awsAwsjson11_deserializeDocumentInvalidResourceStateException(&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_deserializeErrorOperationInProgressException(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.OperationInProgressException{} err := awsAwsjson11_deserializeDocumentOperationInProgressException(&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_deserializeErrorOperationNotSupportedException(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.OperationNotSupportedException{} err := awsAwsjson11_deserializeDocumentOperationNotSupportedException(&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_deserializeErrorResourceAlreadyExistsException(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.ResourceAlreadyExistsException{} err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&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_deserializeErrorResourceAssociatedException(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.ResourceAssociatedException{} err := awsAwsjson11_deserializeDocumentResourceAssociatedException(&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_deserializeErrorResourceCreationFailedException(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.ResourceCreationFailedException{} err := awsAwsjson11_deserializeDocumentResourceCreationFailedException(&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_deserializeErrorResourceLimitExceededException(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.ResourceLimitExceededException{} err := awsAwsjson11_deserializeDocumentResourceLimitExceededException(&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_deserializeErrorResourceUnavailableException(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.ResourceUnavailableException{} err := awsAwsjson11_deserializeDocumentResourceUnavailableException(&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_deserializeErrorUnsupportedNetworkConfigurationException(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.UnsupportedNetworkConfigurationException{} err := awsAwsjson11_deserializeDocumentUnsupportedNetworkConfigurationException(&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_deserializeErrorUnsupportedWorkspaceConfigurationException(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.UnsupportedWorkspaceConfigurationException{} err := awsAwsjson11_deserializeDocumentUnsupportedWorkspaceConfigurationException(&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_deserializeErrorWorkspacesDefaultRoleNotFoundException(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.WorkspacesDefaultRoleNotFoundException{} err := awsAwsjson11_deserializeDocumentWorkspacesDefaultRoleNotFoundException(&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_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, 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.AccessDeniedException if *v == nil { sv = &types.AccessDeniedException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAccountModification(v **types.AccountModification, 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.AccountModification if *v == nil { sv = &types.AccountModification{} } else { sv = *v } for key, value := range shape { switch key { case "DedicatedTenancyManagementCidrRange": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DedicatedTenancyManagementCidrRange to be of type string, got %T instead", value) } sv.DedicatedTenancyManagementCidrRange = ptr.String(jtv) } case "DedicatedTenancySupport": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DedicatedTenancySupportResultEnum to be of type string, got %T instead", value) } sv.DedicatedTenancySupport = types.DedicatedTenancySupportResultEnum(jtv) } case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceErrorCode to be of type string, got %T instead", value) } sv.ErrorCode = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "ModificationState": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DedicatedTenancyModificationStateEnum to be of type string, got %T instead", value) } sv.ModificationState = types.DedicatedTenancyModificationStateEnum(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) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAccountModificationList(v *[]types.AccountModification, 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.AccountModification if *v == nil { cv = []types.AccountModification{} } else { cv = *v } for _, value := range shape { var col types.AccountModification destAddr := &col if err := awsAwsjson11_deserializeDocumentAccountModification(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentBundleList(v *[]types.WorkspaceBundle, 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.WorkspaceBundle if *v == nil { cv = []types.WorkspaceBundle{} } else { cv = *v } for _, value := range shape { var col types.WorkspaceBundle destAddr := &col if err := awsAwsjson11_deserializeDocumentWorkspaceBundle(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCertificateBasedAuthProperties(v **types.CertificateBasedAuthProperties, 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.CertificateBasedAuthProperties if *v == nil { sv = &types.CertificateBasedAuthProperties{} } else { sv = *v } for key, value := range shape { switch key { case "CertificateAuthorityArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CertificateAuthorityArn to be of type string, got %T instead", value) } sv.CertificateAuthorityArn = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CertificateBasedAuthStatusEnum to be of type string, got %T instead", value) } sv.Status = types.CertificateBasedAuthStatusEnum(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentClientProperties(v **types.ClientProperties, 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.ClientProperties if *v == nil { sv = &types.ClientProperties{} } else { sv = *v } for key, value := range shape { switch key { case "LogUploadEnabled": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LogUploadEnum to be of type string, got %T instead", value) } sv.LogUploadEnabled = types.LogUploadEnum(jtv) } case "ReconnectEnabled": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ReconnectEnum to be of type string, got %T instead", value) } sv.ReconnectEnabled = types.ReconnectEnum(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentClientPropertiesList(v *[]types.ClientPropertiesResult, 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.ClientPropertiesResult if *v == nil { cv = []types.ClientPropertiesResult{} } else { cv = *v } for _, value := range shape { var col types.ClientPropertiesResult destAddr := &col if err := awsAwsjson11_deserializeDocumentClientPropertiesResult(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentClientPropertiesResult(v **types.ClientPropertiesResult, 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.ClientPropertiesResult if *v == nil { sv = &types.ClientPropertiesResult{} } else { sv = *v } for key, value := range shape { switch key { case "ClientProperties": if err := awsAwsjson11_deserializeDocumentClientProperties(&sv.ClientProperties, value); err != nil { return err } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentComputeType(v **types.ComputeType, 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.ComputeType if *v == nil { sv = &types.ComputeType{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Compute to be of type string, got %T instead", value) } sv.Name = types.Compute(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConnectClientAddIn(v **types.ConnectClientAddIn, 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.ConnectClientAddIn if *v == nil { sv = &types.ConnectClientAddIn{} } else { sv = *v } for key, value := range shape { switch key { case "AddInId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AmazonUuid to be of type string, got %T instead", value) } sv.AddInId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AddInName 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 DirectoryId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "URL": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AddInUrl to be of type string, got %T instead", value) } sv.URL = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConnectClientAddInList(v *[]types.ConnectClientAddIn, 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.ConnectClientAddIn if *v == nil { cv = []types.ConnectClientAddIn{} } else { cv = *v } for _, value := range shape { var col types.ConnectClientAddIn destAddr := &col if err := awsAwsjson11_deserializeDocumentConnectClientAddIn(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentConnectionAlias(v **types.ConnectionAlias, 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.ConnectionAlias if *v == nil { sv = &types.ConnectionAlias{} } else { sv = *v } for key, value := range shape { switch key { case "AliasId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionAliasId to be of type string, got %T instead", value) } sv.AliasId = ptr.String(jtv) } case "Associations": if err := awsAwsjson11_deserializeDocumentConnectionAliasAssociationList(&sv.Associations, value); err != nil { return err } case "ConnectionString": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionString to be of type string, got %T instead", value) } sv.ConnectionString = ptr.String(jtv) } case "OwnerAccountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } sv.OwnerAccountId = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionAliasState to be of type string, got %T instead", value) } sv.State = types.ConnectionAliasState(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConnectionAliasAssociation(v **types.ConnectionAliasAssociation, 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.ConnectionAliasAssociation if *v == nil { sv = &types.ConnectionAliasAssociation{} } else { sv = *v } for key, value := range shape { switch key { case "AssociatedAccountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } sv.AssociatedAccountId = ptr.String(jtv) } case "AssociationStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AssociationStatus to be of type string, got %T instead", value) } sv.AssociationStatus = types.AssociationStatus(jtv) } case "ConnectionIdentifier": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionIdentifier to be of type string, got %T instead", value) } sv.ConnectionIdentifier = ptr.String(jtv) } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConnectionAliasAssociationList(v *[]types.ConnectionAliasAssociation, 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.ConnectionAliasAssociation if *v == nil { cv = []types.ConnectionAliasAssociation{} } else { cv = *v } for _, value := range shape { var col types.ConnectionAliasAssociation destAddr := &col if err := awsAwsjson11_deserializeDocumentConnectionAliasAssociation(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentConnectionAliasList(v *[]types.ConnectionAlias, 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.ConnectionAlias if *v == nil { cv = []types.ConnectionAlias{} } else { cv = *v } for _, value := range shape { var col types.ConnectionAlias destAddr := &col if err := awsAwsjson11_deserializeDocumentConnectionAlias(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentConnectionAliasPermission(v **types.ConnectionAliasPermission, 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.ConnectionAliasPermission if *v == nil { sv = &types.ConnectionAliasPermission{} } else { sv = *v } for key, value := range shape { switch key { case "AllowAssociation": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.AllowAssociation = ptr.Bool(jtv) } case "SharedAccountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } sv.SharedAccountId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConnectionAliasPermissions(v *[]types.ConnectionAliasPermission, 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.ConnectionAliasPermission if *v == nil { cv = []types.ConnectionAliasPermission{} } else { cv = *v } for _, value := range shape { var col types.ConnectionAliasPermission destAddr := &col if err := awsAwsjson11_deserializeDocumentConnectionAliasPermission(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDedicatedTenancyCidrRangeList(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 DedicatedTenancyManagementCidrRange to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(v **types.DefaultClientBrandingAttributes, 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.DefaultClientBrandingAttributes if *v == nil { sv = &types.DefaultClientBrandingAttributes{} } else { sv = *v } for key, value := range shape { switch key { case "ForgotPasswordLink": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.ForgotPasswordLink = ptr.String(jtv) } case "LoginMessage": if err := awsAwsjson11_deserializeDocumentLoginMessage(&sv.LoginMessage, value); err != nil { return err } case "LogoUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.LogoUrl = ptr.String(jtv) } case "SupportEmail": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientEmail to be of type string, got %T instead", value) } sv.SupportEmail = ptr.String(jtv) } case "SupportLink": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.SupportLink = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDefaultWorkspaceCreationProperties(v **types.DefaultWorkspaceCreationProperties, 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.DefaultWorkspaceCreationProperties if *v == nil { sv = &types.DefaultWorkspaceCreationProperties{} } else { sv = *v } for key, value := range shape { switch key { case "CustomSecurityGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SecurityGroupId to be of type string, got %T instead", value) } sv.CustomSecurityGroupId = ptr.String(jtv) } case "DefaultOu": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DefaultOu to be of type string, got %T instead", value) } sv.DefaultOu = ptr.String(jtv) } case "EnableInternetAccess": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.EnableInternetAccess = ptr.Bool(jtv) } case "EnableMaintenanceMode": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.EnableMaintenanceMode = ptr.Bool(jtv) } case "EnableWorkDocs": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.EnableWorkDocs = ptr.Bool(jtv) } case "UserEnabledAsLocalAdministrator": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.UserEnabledAsLocalAdministrator = ptr.Bool(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDirectoryList(v *[]types.WorkspaceDirectory, 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.WorkspaceDirectory if *v == nil { cv = []types.WorkspaceDirectory{} } else { cv = *v } for _, value := range shape { var col types.WorkspaceDirectory destAddr := &col if err := awsAwsjson11_deserializeDocumentWorkspaceDirectory(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDnsIpAddresses(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 IpAddress to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequest(v **types.FailedCreateStandbyWorkspacesRequest, 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.FailedCreateStandbyWorkspacesRequest if *v == nil { sv = &types.FailedCreateStandbyWorkspacesRequest{} } else { sv = *v } for key, value := range shape { switch key { case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceErrorCode to be of type string, got %T instead", value) } sv.ErrorCode = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "StandbyWorkspaceRequest": if err := awsAwsjson11_deserializeDocumentStandbyWorkspace(&sv.StandbyWorkspaceRequest, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequestList(v *[]types.FailedCreateStandbyWorkspacesRequest, 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.FailedCreateStandbyWorkspacesRequest if *v == nil { cv = []types.FailedCreateStandbyWorkspacesRequest{} } else { cv = *v } for _, value := range shape { var col types.FailedCreateStandbyWorkspacesRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedCreateWorkspaceRequest(v **types.FailedCreateWorkspaceRequest, 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.FailedCreateWorkspaceRequest if *v == nil { sv = &types.FailedCreateWorkspaceRequest{} } else { sv = *v } for key, value := range shape { switch key { case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorType to be of type string, got %T instead", value) } sv.ErrorCode = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "WorkspaceRequest": if err := awsAwsjson11_deserializeDocumentWorkspaceRequest(&sv.WorkspaceRequest, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentFailedCreateWorkspaceRequests(v *[]types.FailedCreateWorkspaceRequest, 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.FailedCreateWorkspaceRequest if *v == nil { cv = []types.FailedCreateWorkspaceRequest{} } else { cv = *v } for _, value := range shape { var col types.FailedCreateWorkspaceRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentFailedCreateWorkspaceRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedRebootWorkspaceRequests(v *[]types.FailedWorkspaceChangeRequest, 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.FailedWorkspaceChangeRequest if *v == nil { cv = []types.FailedWorkspaceChangeRequest{} } else { cv = *v } for _, value := range shape { var col types.FailedWorkspaceChangeRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentFailedWorkspaceChangeRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedRebuildWorkspaceRequests(v *[]types.FailedWorkspaceChangeRequest, 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.FailedWorkspaceChangeRequest if *v == nil { cv = []types.FailedWorkspaceChangeRequest{} } else { cv = *v } for _, value := range shape { var col types.FailedWorkspaceChangeRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentFailedWorkspaceChangeRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedStartWorkspaceRequests(v *[]types.FailedWorkspaceChangeRequest, 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.FailedWorkspaceChangeRequest if *v == nil { cv = []types.FailedWorkspaceChangeRequest{} } else { cv = *v } for _, value := range shape { var col types.FailedWorkspaceChangeRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentFailedWorkspaceChangeRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedStopWorkspaceRequests(v *[]types.FailedWorkspaceChangeRequest, 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.FailedWorkspaceChangeRequest if *v == nil { cv = []types.FailedWorkspaceChangeRequest{} } else { cv = *v } for _, value := range shape { var col types.FailedWorkspaceChangeRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentFailedWorkspaceChangeRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedTerminateWorkspaceRequests(v *[]types.FailedWorkspaceChangeRequest, 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.FailedWorkspaceChangeRequest if *v == nil { cv = []types.FailedWorkspaceChangeRequest{} } else { cv = *v } for _, value := range shape { var col types.FailedWorkspaceChangeRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentFailedWorkspaceChangeRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFailedWorkspaceChangeRequest(v **types.FailedWorkspaceChangeRequest, 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.FailedWorkspaceChangeRequest if *v == nil { sv = &types.FailedWorkspaceChangeRequest{} } else { sv = *v } for key, value := range shape { switch key { case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorType to be of type string, got %T instead", value) } sv.ErrorCode = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "WorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.WorkspaceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentImagePermission(v **types.ImagePermission, 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.ImagePermission if *v == nil { sv = &types.ImagePermission{} } else { sv = *v } for key, value := range shape { switch key { case "SharedAccountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } sv.SharedAccountId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentImagePermissions(v *[]types.ImagePermission, 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.ImagePermission if *v == nil { cv = []types.ImagePermission{} } else { cv = *v } for _, value := range shape { var col types.ImagePermission destAddr := &col if err := awsAwsjson11_deserializeDocumentImagePermission(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentInvalidParameterValuesException(v **types.InvalidParameterValuesException, 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.InvalidParameterValuesException if *v == nil { sv = &types.InvalidParameterValuesException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidResourceStateException(v **types.InvalidResourceStateException, 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.InvalidResourceStateException if *v == nil { sv = &types.InvalidResourceStateException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIosClientBrandingAttributes(v **types.IosClientBrandingAttributes, 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.IosClientBrandingAttributes if *v == nil { sv = &types.IosClientBrandingAttributes{} } else { sv = *v } for key, value := range shape { switch key { case "ForgotPasswordLink": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.ForgotPasswordLink = ptr.String(jtv) } case "LoginMessage": if err := awsAwsjson11_deserializeDocumentLoginMessage(&sv.LoginMessage, value); err != nil { return err } case "Logo2xUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.Logo2xUrl = ptr.String(jtv) } case "Logo3xUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.Logo3xUrl = ptr.String(jtv) } case "LogoUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.LogoUrl = ptr.String(jtv) } case "SupportEmail": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientEmail to be of type string, got %T instead", value) } sv.SupportEmail = ptr.String(jtv) } case "SupportLink": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientUrl to be of type string, got %T instead", value) } sv.SupportLink = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIpGroupIdList(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 IpGroupId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentIpRuleItem(v **types.IpRuleItem, 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.IpRuleItem if *v == nil { sv = &types.IpRuleItem{} } else { sv = *v } for key, value := range shape { switch key { case "ipRule": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpRule to be of type string, got %T instead", value) } sv.IpRule = ptr.String(jtv) } case "ruleDesc": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpRuleDesc to be of type string, got %T instead", value) } sv.RuleDesc = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIpRuleList(v *[]types.IpRuleItem, 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.IpRuleItem if *v == nil { cv = []types.IpRuleItem{} } else { cv = *v } for _, value := range shape { var col types.IpRuleItem destAddr := &col if err := awsAwsjson11_deserializeDocumentIpRuleItem(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentLoginMessage(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientLoginMessage to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentModificationState(v **types.ModificationState, 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.ModificationState if *v == nil { sv = &types.ModificationState{} } else { sv = *v } for key, value := range shape { switch key { case "Resource": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ModificationResourceEnum to be of type string, got %T instead", value) } sv.Resource = types.ModificationResourceEnum(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ModificationStateEnum to be of type string, got %T instead", value) } sv.State = types.ModificationStateEnum(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentModificationStateList(v *[]types.ModificationState, 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.ModificationState if *v == nil { cv = []types.ModificationState{} } else { cv = *v } for _, value := range shape { var col types.ModificationState destAddr := &col if err := awsAwsjson11_deserializeDocumentModificationState(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentOperatingSystem(v **types.OperatingSystem, 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.OperatingSystem if *v == nil { sv = &types.OperatingSystem{} } else { sv = *v } for key, value := range shape { switch key { case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OperatingSystemType to be of type string, got %T instead", value) } sv.Type = types.OperatingSystemType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOperationInProgressException(v **types.OperationInProgressException, 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.OperationInProgressException if *v == nil { sv = &types.OperationInProgressException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOperationNotSupportedException(v **types.OperationNotSupportedException, 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.OperationNotSupportedException if *v == nil { sv = &types.OperationNotSupportedException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "reason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExceptionErrorCode to be of type string, got %T instead", value) } sv.Reason = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequest(v **types.PendingCreateStandbyWorkspacesRequest, 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.PendingCreateStandbyWorkspacesRequest if *v == nil { sv = &types.PendingCreateStandbyWorkspacesRequest{} } else { sv = *v } for key, value := range shape { switch key { case "DirectoryId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) } sv.DirectoryId = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceState to be of type string, got %T instead", value) } sv.State = types.WorkspaceState(jtv) } case "UserName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.UserName = ptr.String(jtv) } case "WorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.WorkspaceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequestList(v *[]types.PendingCreateStandbyWorkspacesRequest, 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.PendingCreateStandbyWorkspacesRequest if *v == nil { cv = []types.PendingCreateStandbyWorkspacesRequest{} } else { cv = *v } for _, value := range shape { var col types.PendingCreateStandbyWorkspacesRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentProtocolList(v *[]types.Protocol, 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.Protocol if *v == nil { cv = []types.Protocol{} } else { cv = *v } for _, value := range shape { var col types.Protocol if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) } col = types.Protocol(jtv) } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRelatedWorkspaceProperties(v **types.RelatedWorkspaceProperties, 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.RelatedWorkspaceProperties if *v == nil { sv = &types.RelatedWorkspaceProperties{} } else { sv = *v } for key, value := range shape { switch key { case "Region": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Region to be of type string, got %T instead", value) } sv.Region = ptr.String(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceState to be of type string, got %T instead", value) } sv.State = types.WorkspaceState(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StandbyWorkspaceRelationshipType to be of type string, got %T instead", value) } sv.Type = types.StandbyWorkspaceRelationshipType(jtv) } case "WorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.WorkspaceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRelatedWorkspaces(v *[]types.RelatedWorkspaceProperties, 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.RelatedWorkspaceProperties if *v == nil { cv = []types.RelatedWorkspaceProperties{} } else { cv = *v } for _, value := range shape { var col types.RelatedWorkspaceProperties destAddr := &col if err := awsAwsjson11_deserializeDocumentRelatedWorkspaceProperties(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(v **types.ResourceAlreadyExistsException, 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.ResourceAlreadyExistsException if *v == nil { sv = &types.ResourceAlreadyExistsException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceAssociatedException(v **types.ResourceAssociatedException, 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.ResourceAssociatedException if *v == nil { sv = &types.ResourceAssociatedException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceCreationFailedException(v **types.ResourceCreationFailedException, 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.ResourceCreationFailedException if *v == nil { sv = &types.ResourceCreationFailedException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceLimitExceededException(v **types.ResourceLimitExceededException, 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.ResourceLimitExceededException if *v == nil { sv = &types.ResourceLimitExceededException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceUnavailableException(v **types.ResourceUnavailableException, 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.ResourceUnavailableException if *v == nil { sv = &types.ResourceUnavailableException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRootStorage(v **types.RootStorage, 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.RootStorage if *v == nil { sv = &types.RootStorage{} } else { sv = *v } for key, value := range shape { switch key { case "Capacity": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.Capacity = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSamlProperties(v **types.SamlProperties, 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.SamlProperties if *v == nil { sv = &types.SamlProperties{} } else { sv = *v } for key, value := range shape { switch key { case "RelayStateParameterName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.RelayStateParameterName = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SamlStatusEnum to be of type string, got %T instead", value) } sv.Status = types.SamlStatusEnum(jtv) } case "UserAccessUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SamlUserAccessUrl to be of type string, got %T instead", value) } sv.UserAccessUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSelfservicePermissions(v **types.SelfservicePermissions, 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.SelfservicePermissions if *v == nil { sv = &types.SelfservicePermissions{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeComputeType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ReconnectEnum to be of type string, got %T instead", value) } sv.ChangeComputeType = types.ReconnectEnum(jtv) } case "IncreaseVolumeSize": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ReconnectEnum to be of type string, got %T instead", value) } sv.IncreaseVolumeSize = types.ReconnectEnum(jtv) } case "RebuildWorkspace": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ReconnectEnum to be of type string, got %T instead", value) } sv.RebuildWorkspace = types.ReconnectEnum(jtv) } case "RestartWorkspace": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ReconnectEnum to be of type string, got %T instead", value) } sv.RestartWorkspace = types.ReconnectEnum(jtv) } case "SwitchRunningMode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ReconnectEnum to be of type string, got %T instead", value) } sv.SwitchRunningMode = types.ReconnectEnum(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSnapshot(v **types.Snapshot, 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.Snapshot if *v == nil { sv = &types.Snapshot{} } else { sv = *v } for key, value := range shape { switch key { case "SnapshotTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.SnapshotTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSnapshotList(v *[]types.Snapshot, 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.Snapshot if *v == nil { cv = []types.Snapshot{} } else { cv = *v } for _, value := range shape { var col types.Snapshot destAddr := &col if err := awsAwsjson11_deserializeDocumentSnapshot(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentStandbyWorkspace(v **types.StandbyWorkspace, 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.StandbyWorkspace if *v == nil { sv = &types.StandbyWorkspace{} } else { sv = *v } for key, value := range shape { switch key { case "DirectoryId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) } sv.DirectoryId = ptr.String(jtv) } case "PrimaryWorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.PrimaryWorkspaceId = ptr.String(jtv) } case "Tags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } case "VolumeEncryptionKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected VolumeEncryptionKey to be of type string, got %T instead", value) } sv.VolumeEncryptionKey = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSubnetIds(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 SubnetId to be of type string, got %T instead", value) } col = jtv } 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_deserializeDocumentUnsupportedNetworkConfigurationException(v **types.UnsupportedNetworkConfigurationException, 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.UnsupportedNetworkConfigurationException if *v == nil { sv = &types.UnsupportedNetworkConfigurationException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUnsupportedWorkspaceConfigurationException(v **types.UnsupportedWorkspaceConfigurationException, 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.UnsupportedWorkspaceConfigurationException if *v == nil { sv = &types.UnsupportedWorkspaceConfigurationException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUpdateResult(v **types.UpdateResult, 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.UpdateResult if *v == nil { sv = &types.UpdateResult{} } 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 UpdateDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "UpdateAvailable": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.UpdateAvailable = ptr.Bool(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUserStorage(v **types.UserStorage, 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.UserStorage if *v == nil { sv = &types.UserStorage{} } else { sv = *v } for key, value := range shape { switch key { case "Capacity": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.Capacity = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspace(v **types.Workspace, 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.Workspace if *v == nil { sv = &types.Workspace{} } else { sv = *v } for key, value := range shape { switch key { case "BundleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BundleId to be of type string, got %T instead", value) } sv.BundleId = ptr.String(jtv) } case "ComputerName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ComputerName to be of type string, got %T instead", value) } sv.ComputerName = ptr.String(jtv) } case "DirectoryId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) } sv.DirectoryId = ptr.String(jtv) } case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceErrorCode to be of type string, got %T instead", value) } sv.ErrorCode = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "IpAddress": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpAddress to be of type string, got %T instead", value) } sv.IpAddress = ptr.String(jtv) } case "ModificationStates": if err := awsAwsjson11_deserializeDocumentModificationStateList(&sv.ModificationStates, value); err != nil { return err } case "RelatedWorkspaces": if err := awsAwsjson11_deserializeDocumentRelatedWorkspaces(&sv.RelatedWorkspaces, value); err != nil { return err } case "RootVolumeEncryptionEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.RootVolumeEncryptionEnabled = ptr.Bool(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceState to be of type string, got %T instead", value) } sv.State = types.WorkspaceState(jtv) } case "SubnetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value) } sv.SubnetId = ptr.String(jtv) } case "UserName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.UserName = ptr.String(jtv) } case "UserVolumeEncryptionEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.UserVolumeEncryptionEnabled = ptr.Bool(jtv) } case "VolumeEncryptionKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected VolumeEncryptionKey to be of type string, got %T instead", value) } sv.VolumeEncryptionKey = ptr.String(jtv) } case "WorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.WorkspaceId = ptr.String(jtv) } case "WorkspaceProperties": if err := awsAwsjson11_deserializeDocumentWorkspaceProperties(&sv.WorkspaceProperties, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspaceAccessProperties(v **types.WorkspaceAccessProperties, 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.WorkspaceAccessProperties if *v == nil { sv = &types.WorkspaceAccessProperties{} } else { sv = *v } for key, value := range shape { switch key { case "DeviceTypeAndroid": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeAndroid = types.AccessPropertyValue(jtv) } case "DeviceTypeChromeOs": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeChromeOs = types.AccessPropertyValue(jtv) } case "DeviceTypeIos": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeIos = types.AccessPropertyValue(jtv) } case "DeviceTypeLinux": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeLinux = types.AccessPropertyValue(jtv) } case "DeviceTypeOsx": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeOsx = types.AccessPropertyValue(jtv) } case "DeviceTypeWeb": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeWeb = types.AccessPropertyValue(jtv) } case "DeviceTypeWindows": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeWindows = types.AccessPropertyValue(jtv) } case "DeviceTypeZeroClient": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessPropertyValue to be of type string, got %T instead", value) } sv.DeviceTypeZeroClient = types.AccessPropertyValue(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspaceBundle(v **types.WorkspaceBundle, 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.WorkspaceBundle if *v == nil { sv = &types.WorkspaceBundle{} } else { sv = *v } for key, value := range shape { switch key { case "BundleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BundleId to be of type string, got %T instead", value) } sv.BundleId = ptr.String(jtv) } case "BundleType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BundleType to be of type string, got %T instead", value) } sv.BundleType = types.BundleType(jtv) } case "ComputeType": if err := awsAwsjson11_deserializeDocumentComputeType(&sv.ComputeType, value); err != nil { return err } case "CreationTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreationTime = 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 Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "ImageId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageId to be of type string, got %T instead", value) } sv.ImageId = ptr.String(jtv) } case "LastUpdatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdatedTime = 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 NonEmptyString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Owner": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BundleOwner to be of type string, got %T instead", value) } sv.Owner = ptr.String(jtv) } case "RootStorage": if err := awsAwsjson11_deserializeDocumentRootStorage(&sv.RootStorage, value); err != nil { return err } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceBundleState to be of type string, got %T instead", value) } sv.State = types.WorkspaceBundleState(jtv) } case "UserStorage": if err := awsAwsjson11_deserializeDocumentUserStorage(&sv.UserStorage, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspaceConnectionStatus(v **types.WorkspaceConnectionStatus, 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.WorkspaceConnectionStatus if *v == nil { sv = &types.WorkspaceConnectionStatus{} } else { sv = *v } for key, value := range shape { switch key { case "ConnectionState": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value) } sv.ConnectionState = types.ConnectionState(jtv) } case "ConnectionStateCheckTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ConnectionStateCheckTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "LastKnownUserConnectionTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastKnownUserConnectionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "WorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.WorkspaceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspaceConnectionStatusList(v *[]types.WorkspaceConnectionStatus, 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.WorkspaceConnectionStatus if *v == nil { cv = []types.WorkspaceConnectionStatus{} } else { cv = *v } for _, value := range shape { var col types.WorkspaceConnectionStatus destAddr := &col if err := awsAwsjson11_deserializeDocumentWorkspaceConnectionStatus(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentWorkspaceDirectory(v **types.WorkspaceDirectory, 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.WorkspaceDirectory if *v == nil { sv = &types.WorkspaceDirectory{} } 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 Alias to be of type string, got %T instead", value) } sv.Alias = ptr.String(jtv) } case "CertificateBasedAuthProperties": if err := awsAwsjson11_deserializeDocumentCertificateBasedAuthProperties(&sv.CertificateBasedAuthProperties, value); err != nil { return err } case "CustomerUserName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.CustomerUserName = ptr.String(jtv) } case "DirectoryId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) } sv.DirectoryId = ptr.String(jtv) } case "DirectoryName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DirectoryName to be of type string, got %T instead", value) } sv.DirectoryName = ptr.String(jtv) } case "DirectoryType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceDirectoryType to be of type string, got %T instead", value) } sv.DirectoryType = types.WorkspaceDirectoryType(jtv) } case "DnsIpAddresses": if err := awsAwsjson11_deserializeDocumentDnsIpAddresses(&sv.DnsIpAddresses, value); err != nil { return err } case "IamRoleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.IamRoleId = ptr.String(jtv) } case "ipGroupIds": if err := awsAwsjson11_deserializeDocumentIpGroupIdList(&sv.IpGroupIds, value); err != nil { return err } case "RegistrationCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RegistrationCode to be of type string, got %T instead", value) } sv.RegistrationCode = ptr.String(jtv) } case "SamlProperties": if err := awsAwsjson11_deserializeDocumentSamlProperties(&sv.SamlProperties, value); err != nil { return err } case "SelfservicePermissions": if err := awsAwsjson11_deserializeDocumentSelfservicePermissions(&sv.SelfservicePermissions, value); err != nil { return err } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceDirectoryState to be of type string, got %T instead", value) } sv.State = types.WorkspaceDirectoryState(jtv) } case "SubnetIds": if err := awsAwsjson11_deserializeDocumentSubnetIds(&sv.SubnetIds, value); err != nil { return err } case "Tenancy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Tenancy to be of type string, got %T instead", value) } sv.Tenancy = types.Tenancy(jtv) } case "WorkspaceAccessProperties": if err := awsAwsjson11_deserializeDocumentWorkspaceAccessProperties(&sv.WorkspaceAccessProperties, value); err != nil { return err } case "WorkspaceCreationProperties": if err := awsAwsjson11_deserializeDocumentDefaultWorkspaceCreationProperties(&sv.WorkspaceCreationProperties, value); err != nil { return err } case "WorkspaceSecurityGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SecurityGroupId to be of type string, got %T instead", value) } sv.WorkspaceSecurityGroupId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspaceImage(v **types.WorkspaceImage, 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.WorkspaceImage if *v == nil { sv = &types.WorkspaceImage{} } else { sv = *v } for key, value := range shape { switch key { case "Created": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Created = 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 WorkspaceImageDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageErrorCode to be of type string, got %T instead", value) } sv.ErrorCode = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "ImageId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageId to be of type string, got %T instead", value) } sv.ImageId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "OperatingSystem": if err := awsAwsjson11_deserializeDocumentOperatingSystem(&sv.OperatingSystem, value); err != nil { return err } case "OwnerAccountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } sv.OwnerAccountId = ptr.String(jtv) } case "RequiredTenancy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageRequiredTenancy to be of type string, got %T instead", value) } sv.RequiredTenancy = types.WorkspaceImageRequiredTenancy(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageState to be of type string, got %T instead", value) } sv.State = types.WorkspaceImageState(jtv) } case "Updates": if err := awsAwsjson11_deserializeDocumentUpdateResult(&sv.Updates, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspaceImageList(v *[]types.WorkspaceImage, 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.WorkspaceImage if *v == nil { cv = []types.WorkspaceImage{} } else { cv = *v } for _, value := range shape { var col types.WorkspaceImage destAddr := &col if err := awsAwsjson11_deserializeDocumentWorkspaceImage(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentWorkspaceList(v *[]types.Workspace, 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.Workspace if *v == nil { cv = []types.Workspace{} } else { cv = *v } for _, value := range shape { var col types.Workspace destAddr := &col if err := awsAwsjson11_deserializeDocumentWorkspace(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentWorkspaceProperties(v **types.WorkspaceProperties, 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.WorkspaceProperties if *v == nil { sv = &types.WorkspaceProperties{} } else { sv = *v } for key, value := range shape { switch key { case "ComputeTypeName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Compute to be of type string, got %T instead", value) } sv.ComputeTypeName = types.Compute(jtv) } case "Protocols": if err := awsAwsjson11_deserializeDocumentProtocolList(&sv.Protocols, value); err != nil { return err } case "RootVolumeSizeGib": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RootVolumeSizeGib to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.RootVolumeSizeGib = ptr.Int32(int32(i64)) } case "RunningMode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RunningMode to be of type string, got %T instead", value) } sv.RunningMode = types.RunningMode(jtv) } case "RunningModeAutoStopTimeoutInMinutes": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RunningModeAutoStopTimeoutInMinutes to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.RunningModeAutoStopTimeoutInMinutes = ptr.Int32(int32(i64)) } case "UserVolumeSizeGib": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected UserVolumeSizeGib to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.UserVolumeSizeGib = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspaceRequest(v **types.WorkspaceRequest, 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.WorkspaceRequest if *v == nil { sv = &types.WorkspaceRequest{} } else { sv = *v } for key, value := range shape { switch key { case "BundleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BundleId to be of type string, got %T instead", value) } sv.BundleId = ptr.String(jtv) } case "DirectoryId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) } sv.DirectoryId = ptr.String(jtv) } case "RootVolumeEncryptionEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.RootVolumeEncryptionEnabled = ptr.Bool(jtv) } case "Tags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } case "UserName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.UserName = ptr.String(jtv) } case "UserVolumeEncryptionEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.UserVolumeEncryptionEnabled = ptr.Bool(jtv) } case "VolumeEncryptionKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected VolumeEncryptionKey to be of type string, got %T instead", value) } sv.VolumeEncryptionKey = ptr.String(jtv) } case "WorkspaceProperties": if err := awsAwsjson11_deserializeDocumentWorkspaceProperties(&sv.WorkspaceProperties, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspacesDefaultRoleNotFoundException(v **types.WorkspacesDefaultRoleNotFoundException, 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.WorkspacesDefaultRoleNotFoundException if *v == nil { sv = &types.WorkspacesDefaultRoleNotFoundException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspacesIpGroup(v **types.WorkspacesIpGroup, 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.WorkspacesIpGroup if *v == nil { sv = &types.WorkspacesIpGroup{} } else { sv = *v } for key, value := range shape { switch key { case "groupDesc": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpGroupDesc to be of type string, got %T instead", value) } sv.GroupDesc = ptr.String(jtv) } case "groupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpGroupId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "groupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpGroupName to be of type string, got %T instead", value) } sv.GroupName = ptr.String(jtv) } case "userRules": if err := awsAwsjson11_deserializeDocumentIpRuleList(&sv.UserRules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWorkspacesIpGroupsList(v *[]types.WorkspacesIpGroup, 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.WorkspacesIpGroup if *v == nil { cv = []types.WorkspacesIpGroup{} } else { cv = *v } for _, value := range shape { var col types.WorkspacesIpGroup destAddr := &col if err := awsAwsjson11_deserializeDocumentWorkspacesIpGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeOpDocumentAssociateConnectionAliasOutput(v **AssociateConnectionAliasOutput, 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 *AssociateConnectionAliasOutput if *v == nil { sv = &AssociateConnectionAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ConnectionIdentifier": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionIdentifier to be of type string, got %T instead", value) } sv.ConnectionIdentifier = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAssociateIpGroupsOutput(v **AssociateIpGroupsOutput, 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 *AssociateIpGroupsOutput if *v == nil { sv = &AssociateIpGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAuthorizeIpRulesOutput(v **AuthorizeIpRulesOutput, 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 *AuthorizeIpRulesOutput if *v == nil { sv = &AuthorizeIpRulesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCopyWorkspaceImageOutput(v **CopyWorkspaceImageOutput, 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 *CopyWorkspaceImageOutput if *v == nil { sv = &CopyWorkspaceImageOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ImageId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageId to be of type string, got %T instead", value) } sv.ImageId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateConnectClientAddInOutput(v **CreateConnectClientAddInOutput, 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 *CreateConnectClientAddInOutput if *v == nil { sv = &CreateConnectClientAddInOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AddInId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AmazonUuid to be of type string, got %T instead", value) } sv.AddInId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateConnectionAliasOutput(v **CreateConnectionAliasOutput, 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 *CreateConnectionAliasOutput if *v == nil { sv = &CreateConnectionAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AliasId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionAliasId to be of type string, got %T instead", value) } sv.AliasId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateIpGroupOutput(v **CreateIpGroupOutput, 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 *CreateIpGroupOutput if *v == nil { sv = &CreateIpGroupOutput{} } 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 IpGroupId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateStandbyWorkspacesOutput(v **CreateStandbyWorkspacesOutput, 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 *CreateStandbyWorkspacesOutput if *v == nil { sv = &CreateStandbyWorkspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailedStandbyRequests": if err := awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequestList(&sv.FailedStandbyRequests, value); err != nil { return err } case "PendingStandbyRequests": if err := awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequestList(&sv.PendingStandbyRequests, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateTagsOutput(v **CreateTagsOutput, 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 *CreateTagsOutput if *v == nil { sv = &CreateTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateUpdatedWorkspaceImageOutput(v **CreateUpdatedWorkspaceImageOutput, 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 *CreateUpdatedWorkspaceImageOutput if *v == nil { sv = &CreateUpdatedWorkspaceImageOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ImageId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageId to be of type string, got %T instead", value) } sv.ImageId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateWorkspaceBundleOutput(v **CreateWorkspaceBundleOutput, 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 *CreateWorkspaceBundleOutput if *v == nil { sv = &CreateWorkspaceBundleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "WorkspaceBundle": if err := awsAwsjson11_deserializeDocumentWorkspaceBundle(&sv.WorkspaceBundle, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateWorkspaceImageOutput(v **CreateWorkspaceImageOutput, 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 *CreateWorkspaceImageOutput if *v == nil { sv = &CreateWorkspaceImageOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Created": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Created = 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 WorkspaceImageDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "ImageId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageId to be of type string, got %T instead", value) } sv.ImageId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "OperatingSystem": if err := awsAwsjson11_deserializeDocumentOperatingSystem(&sv.OperatingSystem, value); err != nil { return err } case "OwnerAccountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } sv.OwnerAccountId = ptr.String(jtv) } case "RequiredTenancy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageRequiredTenancy to be of type string, got %T instead", value) } sv.RequiredTenancy = types.WorkspaceImageRequiredTenancy(jtv) } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageState to be of type string, got %T instead", value) } sv.State = types.WorkspaceImageState(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateWorkspacesOutput(v **CreateWorkspacesOutput, 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 *CreateWorkspacesOutput if *v == nil { sv = &CreateWorkspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailedRequests": if err := awsAwsjson11_deserializeDocumentFailedCreateWorkspaceRequests(&sv.FailedRequests, value); err != nil { return err } case "PendingRequests": if err := awsAwsjson11_deserializeDocumentWorkspaceList(&sv.PendingRequests, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteClientBrandingOutput(v **DeleteClientBrandingOutput, 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 *DeleteClientBrandingOutput if *v == nil { sv = &DeleteClientBrandingOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteConnectClientAddInOutput(v **DeleteConnectClientAddInOutput, 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 *DeleteConnectClientAddInOutput if *v == nil { sv = &DeleteConnectClientAddInOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteConnectionAliasOutput(v **DeleteConnectionAliasOutput, 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 *DeleteConnectionAliasOutput if *v == nil { sv = &DeleteConnectionAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteIpGroupOutput(v **DeleteIpGroupOutput, 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 *DeleteIpGroupOutput if *v == nil { sv = &DeleteIpGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteTagsOutput(v **DeleteTagsOutput, 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 *DeleteTagsOutput if *v == nil { sv = &DeleteTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteWorkspaceBundleOutput(v **DeleteWorkspaceBundleOutput, 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 *DeleteWorkspaceBundleOutput if *v == nil { sv = &DeleteWorkspaceBundleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteWorkspaceImageOutput(v **DeleteWorkspaceImageOutput, 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 *DeleteWorkspaceImageOutput if *v == nil { sv = &DeleteWorkspaceImageOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeregisterWorkspaceDirectoryOutput(v **DeregisterWorkspaceDirectoryOutput, 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 *DeregisterWorkspaceDirectoryOutput if *v == nil { sv = &DeregisterWorkspaceDirectoryOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeAccountModificationsOutput(v **DescribeAccountModificationsOutput, 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 *DescribeAccountModificationsOutput if *v == nil { sv = &DescribeAccountModificationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AccountModifications": if err := awsAwsjson11_deserializeDocumentAccountModificationList(&sv.AccountModifications, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeAccountOutput(v **DescribeAccountOutput, 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 *DescribeAccountOutput if *v == nil { sv = &DescribeAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DedicatedTenancyManagementCidrRange": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DedicatedTenancyManagementCidrRange to be of type string, got %T instead", value) } sv.DedicatedTenancyManagementCidrRange = ptr.String(jtv) } case "DedicatedTenancySupport": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DedicatedTenancySupportResultEnum to be of type string, got %T instead", value) } sv.DedicatedTenancySupport = types.DedicatedTenancySupportResultEnum(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeClientBrandingOutput(v **DescribeClientBrandingOutput, 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 *DescribeClientBrandingOutput if *v == nil { sv = &DescribeClientBrandingOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DeviceTypeAndroid": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeAndroid, value); err != nil { return err } case "DeviceTypeIos": if err := awsAwsjson11_deserializeDocumentIosClientBrandingAttributes(&sv.DeviceTypeIos, value); err != nil { return err } case "DeviceTypeLinux": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeLinux, value); err != nil { return err } case "DeviceTypeOsx": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeOsx, value); err != nil { return err } case "DeviceTypeWeb": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeWeb, value); err != nil { return err } case "DeviceTypeWindows": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeWindows, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeClientPropertiesOutput(v **DescribeClientPropertiesOutput, 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 *DescribeClientPropertiesOutput if *v == nil { sv = &DescribeClientPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ClientPropertiesList": if err := awsAwsjson11_deserializeDocumentClientPropertiesList(&sv.ClientPropertiesList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeConnectClientAddInsOutput(v **DescribeConnectClientAddInsOutput, 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 *DescribeConnectClientAddInsOutput if *v == nil { sv = &DescribeConnectClientAddInsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AddIns": if err := awsAwsjson11_deserializeDocumentConnectClientAddInList(&sv.AddIns, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeConnectionAliasesOutput(v **DescribeConnectionAliasesOutput, 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 *DescribeConnectionAliasesOutput if *v == nil { sv = &DescribeConnectionAliasesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ConnectionAliases": if err := awsAwsjson11_deserializeDocumentConnectionAliasList(&sv.ConnectionAliases, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeConnectionAliasPermissionsOutput(v **DescribeConnectionAliasPermissionsOutput, 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 *DescribeConnectionAliasPermissionsOutput if *v == nil { sv = &DescribeConnectionAliasPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AliasId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConnectionAliasId to be of type string, got %T instead", value) } sv.AliasId = ptr.String(jtv) } case "ConnectionAliasPermissions": if err := awsAwsjson11_deserializeDocumentConnectionAliasPermissions(&sv.ConnectionAliasPermissions, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeIpGroupsOutput(v **DescribeIpGroupsOutput, 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 *DescribeIpGroupsOutput if *v == nil { sv = &DescribeIpGroupsOutput{} } 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 PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Result": if err := awsAwsjson11_deserializeDocumentWorkspacesIpGroupsList(&sv.Result, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeTagsOutput(v **DescribeTagsOutput, 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 *DescribeTagsOutput if *v == nil { sv = &DescribeTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "TagList": if err := awsAwsjson11_deserializeDocumentTagList(&sv.TagList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeWorkspaceBundlesOutput(v **DescribeWorkspaceBundlesOutput, 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 *DescribeWorkspaceBundlesOutput if *v == nil { sv = &DescribeWorkspaceBundlesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Bundles": if err := awsAwsjson11_deserializeDocumentBundleList(&sv.Bundles, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeWorkspaceDirectoriesOutput(v **DescribeWorkspaceDirectoriesOutput, 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 *DescribeWorkspaceDirectoriesOutput if *v == nil { sv = &DescribeWorkspaceDirectoriesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Directories": if err := awsAwsjson11_deserializeDocumentDirectoryList(&sv.Directories, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeWorkspaceImagePermissionsOutput(v **DescribeWorkspaceImagePermissionsOutput, 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 *DescribeWorkspaceImagePermissionsOutput if *v == nil { sv = &DescribeWorkspaceImagePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ImageId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageId to be of type string, got %T instead", value) } sv.ImageId = ptr.String(jtv) } case "ImagePermissions": if err := awsAwsjson11_deserializeDocumentImagePermissions(&sv.ImagePermissions, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeWorkspaceImagesOutput(v **DescribeWorkspaceImagesOutput, 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 *DescribeWorkspaceImagesOutput if *v == nil { sv = &DescribeWorkspaceImagesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Images": if err := awsAwsjson11_deserializeDocumentWorkspaceImageList(&sv.Images, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeWorkspacesConnectionStatusOutput(v **DescribeWorkspacesConnectionStatusOutput, 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 *DescribeWorkspacesConnectionStatusOutput if *v == nil { sv = &DescribeWorkspacesConnectionStatusOutput{} } 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 PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "WorkspacesConnectionStatus": if err := awsAwsjson11_deserializeDocumentWorkspaceConnectionStatusList(&sv.WorkspacesConnectionStatus, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeWorkspaceSnapshotsOutput(v **DescribeWorkspaceSnapshotsOutput, 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 *DescribeWorkspaceSnapshotsOutput if *v == nil { sv = &DescribeWorkspaceSnapshotsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RebuildSnapshots": if err := awsAwsjson11_deserializeDocumentSnapshotList(&sv.RebuildSnapshots, value); err != nil { return err } case "RestoreSnapshots": if err := awsAwsjson11_deserializeDocumentSnapshotList(&sv.RestoreSnapshots, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeWorkspacesOutput(v **DescribeWorkspacesOutput, 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 *DescribeWorkspacesOutput if *v == nil { sv = &DescribeWorkspacesOutput{} } 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 PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Workspaces": if err := awsAwsjson11_deserializeDocumentWorkspaceList(&sv.Workspaces, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDisassociateConnectionAliasOutput(v **DisassociateConnectionAliasOutput, 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 *DisassociateConnectionAliasOutput if *v == nil { sv = &DisassociateConnectionAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDisassociateIpGroupsOutput(v **DisassociateIpGroupsOutput, 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 *DisassociateIpGroupsOutput if *v == nil { sv = &DisassociateIpGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentImportClientBrandingOutput(v **ImportClientBrandingOutput, 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 *ImportClientBrandingOutput if *v == nil { sv = &ImportClientBrandingOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DeviceTypeAndroid": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeAndroid, value); err != nil { return err } case "DeviceTypeIos": if err := awsAwsjson11_deserializeDocumentIosClientBrandingAttributes(&sv.DeviceTypeIos, value); err != nil { return err } case "DeviceTypeLinux": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeLinux, value); err != nil { return err } case "DeviceTypeOsx": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeOsx, value); err != nil { return err } case "DeviceTypeWeb": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeWeb, value); err != nil { return err } case "DeviceTypeWindows": if err := awsAwsjson11_deserializeDocumentDefaultClientBrandingAttributes(&sv.DeviceTypeWindows, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentImportWorkspaceImageOutput(v **ImportWorkspaceImageOutput, 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 *ImportWorkspaceImageOutput if *v == nil { sv = &ImportWorkspaceImageOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ImageId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceImageId to be of type string, got %T instead", value) } sv.ImageId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListAvailableManagementCidrRangesOutput(v **ListAvailableManagementCidrRangesOutput, 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 *ListAvailableManagementCidrRangesOutput if *v == nil { sv = &ListAvailableManagementCidrRangesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ManagementCidrRanges": if err := awsAwsjson11_deserializeDocumentDedicatedTenancyCidrRangeList(&sv.ManagementCidrRanges, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentMigrateWorkspaceOutput(v **MigrateWorkspaceOutput, 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 *MigrateWorkspaceOutput if *v == nil { sv = &MigrateWorkspaceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "SourceWorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.SourceWorkspaceId = ptr.String(jtv) } case "TargetWorkspaceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) } sv.TargetWorkspaceId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifyAccountOutput(v **ModifyAccountOutput, 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 *ModifyAccountOutput if *v == nil { sv = &ModifyAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifyCertificateBasedAuthPropertiesOutput(v **ModifyCertificateBasedAuthPropertiesOutput, 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 *ModifyCertificateBasedAuthPropertiesOutput if *v == nil { sv = &ModifyCertificateBasedAuthPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifyClientPropertiesOutput(v **ModifyClientPropertiesOutput, 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 *ModifyClientPropertiesOutput if *v == nil { sv = &ModifyClientPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifySamlPropertiesOutput(v **ModifySamlPropertiesOutput, 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 *ModifySamlPropertiesOutput if *v == nil { sv = &ModifySamlPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifySelfservicePermissionsOutput(v **ModifySelfservicePermissionsOutput, 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 *ModifySelfservicePermissionsOutput if *v == nil { sv = &ModifySelfservicePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifyWorkspaceAccessPropertiesOutput(v **ModifyWorkspaceAccessPropertiesOutput, 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 *ModifyWorkspaceAccessPropertiesOutput if *v == nil { sv = &ModifyWorkspaceAccessPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifyWorkspaceCreationPropertiesOutput(v **ModifyWorkspaceCreationPropertiesOutput, 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 *ModifyWorkspaceCreationPropertiesOutput if *v == nil { sv = &ModifyWorkspaceCreationPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifyWorkspacePropertiesOutput(v **ModifyWorkspacePropertiesOutput, 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 *ModifyWorkspacePropertiesOutput if *v == nil { sv = &ModifyWorkspacePropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentModifyWorkspaceStateOutput(v **ModifyWorkspaceStateOutput, 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 *ModifyWorkspaceStateOutput if *v == nil { sv = &ModifyWorkspaceStateOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRebootWorkspacesOutput(v **RebootWorkspacesOutput, 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 *RebootWorkspacesOutput if *v == nil { sv = &RebootWorkspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailedRequests": if err := awsAwsjson11_deserializeDocumentFailedRebootWorkspaceRequests(&sv.FailedRequests, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRebuildWorkspacesOutput(v **RebuildWorkspacesOutput, 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 *RebuildWorkspacesOutput if *v == nil { sv = &RebuildWorkspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailedRequests": if err := awsAwsjson11_deserializeDocumentFailedRebuildWorkspaceRequests(&sv.FailedRequests, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRegisterWorkspaceDirectoryOutput(v **RegisterWorkspaceDirectoryOutput, 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 *RegisterWorkspaceDirectoryOutput if *v == nil { sv = &RegisterWorkspaceDirectoryOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRestoreWorkspaceOutput(v **RestoreWorkspaceOutput, 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 *RestoreWorkspaceOutput if *v == nil { sv = &RestoreWorkspaceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRevokeIpRulesOutput(v **RevokeIpRulesOutput, 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 *RevokeIpRulesOutput if *v == nil { sv = &RevokeIpRulesOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentStartWorkspacesOutput(v **StartWorkspacesOutput, 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 *StartWorkspacesOutput if *v == nil { sv = &StartWorkspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailedRequests": if err := awsAwsjson11_deserializeDocumentFailedStartWorkspaceRequests(&sv.FailedRequests, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentStopWorkspacesOutput(v **StopWorkspacesOutput, 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 *StopWorkspacesOutput if *v == nil { sv = &StopWorkspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailedRequests": if err := awsAwsjson11_deserializeDocumentFailedStopWorkspaceRequests(&sv.FailedRequests, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentTerminateWorkspacesOutput(v **TerminateWorkspacesOutput, 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 *TerminateWorkspacesOutput if *v == nil { sv = &TerminateWorkspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FailedRequests": if err := awsAwsjson11_deserializeDocumentFailedTerminateWorkspaceRequests(&sv.FailedRequests, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateConnectClientAddInOutput(v **UpdateConnectClientAddInOutput, 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 *UpdateConnectClientAddInOutput if *v == nil { sv = &UpdateConnectClientAddInOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateConnectionAliasPermissionOutput(v **UpdateConnectionAliasPermissionOutput, 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 *UpdateConnectionAliasPermissionOutput if *v == nil { sv = &UpdateConnectionAliasPermissionOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateRulesOfIpGroupOutput(v **UpdateRulesOfIpGroupOutput, 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 *UpdateRulesOfIpGroupOutput if *v == nil { sv = &UpdateRulesOfIpGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateWorkspaceBundleOutput(v **UpdateWorkspaceBundleOutput, 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 *UpdateWorkspaceBundleOutput if *v == nil { sv = &UpdateWorkspaceBundleOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateWorkspaceImagePermissionOutput(v **UpdateWorkspaceImagePermissionOutput, 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 *UpdateWorkspaceImagePermissionOutput if *v == nil { sv = &UpdateWorkspaceImagePermissionOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil }
15,146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package workspaces provides the API client, operations, and parameter types for // Amazon WorkSpaces. // // Amazon WorkSpaces Service Amazon WorkSpaces enables you to provision virtual, // cloud-based Microsoft Windows or Amazon Linux desktops for your users, known as // WorkSpaces. WorkSpaces eliminates the need to procure and deploy hardware or // install complex software. You can quickly add or remove users as your needs // change. Users can access their virtual desktops from multiple devices or web // browsers. This API Reference provides detailed information about the actions, // data types, parameters, and errors of the WorkSpaces service. For more // information about the supported Amazon Web Services Regions, endpoints, and // service quotas of the Amazon WorkSpaces service, see WorkSpaces endpoints and // quotas (https://docs.aws.amazon.com/general/latest/gr/wsp.html) in the Amazon // Web Services General Reference. You can also manage your WorkSpaces resources // using the WorkSpaces console, Command Line Interface (CLI), and SDKs. For more // information about administering WorkSpaces, see the Amazon WorkSpaces // Administration Guide (https://docs.aws.amazon.com/workspaces/latest/adminguide/) // . For more information about using the Amazon WorkSpaces client application or // web browser to access provisioned WorkSpaces, see the Amazon WorkSpaces User // Guide (https://docs.aws.amazon.com/workspaces/latest/userguide/) . For more // information about using the CLI to manage your WorkSpaces resources, see the // WorkSpaces section of the CLI Reference (https://docs.aws.amazon.com/cli/latest/reference/workspaces/index.html) // . package workspaces
27
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces 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/workspaces/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 = "workspaces" } 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 workspaces // goModuleVersion is the tagged release for this module const goModuleVersion = "1.28.15"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/workspaces/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_serializeOpAssociateConnectionAlias struct { } func (*awsAwsjson11_serializeOpAssociateConnectionAlias) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAssociateConnectionAlias) 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.(*AssociateConnectionAliasInput) _ = 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("WorkspacesService.AssociateConnectionAlias") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAssociateConnectionAliasInput(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_serializeOpAssociateIpGroups struct { } func (*awsAwsjson11_serializeOpAssociateIpGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAssociateIpGroups) 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.(*AssociateIpGroupsInput) _ = 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("WorkspacesService.AssociateIpGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAssociateIpGroupsInput(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_serializeOpAuthorizeIpRules struct { } func (*awsAwsjson11_serializeOpAuthorizeIpRules) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAuthorizeIpRules) 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.(*AuthorizeIpRulesInput) _ = 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("WorkspacesService.AuthorizeIpRules") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAuthorizeIpRulesInput(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_serializeOpCopyWorkspaceImage struct { } func (*awsAwsjson11_serializeOpCopyWorkspaceImage) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCopyWorkspaceImage) 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.(*CopyWorkspaceImageInput) _ = 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("WorkspacesService.CopyWorkspaceImage") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCopyWorkspaceImageInput(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_serializeOpCreateConnectClientAddIn struct { } func (*awsAwsjson11_serializeOpCreateConnectClientAddIn) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateConnectClientAddIn) 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.(*CreateConnectClientAddInInput) _ = 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("WorkspacesService.CreateConnectClientAddIn") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateConnectClientAddInInput(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_serializeOpCreateConnectionAlias struct { } func (*awsAwsjson11_serializeOpCreateConnectionAlias) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateConnectionAlias) 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.(*CreateConnectionAliasInput) _ = 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("WorkspacesService.CreateConnectionAlias") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateConnectionAliasInput(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_serializeOpCreateIpGroup struct { } func (*awsAwsjson11_serializeOpCreateIpGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateIpGroup) 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.(*CreateIpGroupInput) _ = 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("WorkspacesService.CreateIpGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateIpGroupInput(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_serializeOpCreateStandbyWorkspaces struct { } func (*awsAwsjson11_serializeOpCreateStandbyWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateStandbyWorkspaces) 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.(*CreateStandbyWorkspacesInput) _ = 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("WorkspacesService.CreateStandbyWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateStandbyWorkspacesInput(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_serializeOpCreateTags struct { } func (*awsAwsjson11_serializeOpCreateTags) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateTags) 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.(*CreateTagsInput) _ = 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("WorkspacesService.CreateTags") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateTagsInput(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_serializeOpCreateUpdatedWorkspaceImage struct { } func (*awsAwsjson11_serializeOpCreateUpdatedWorkspaceImage) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateUpdatedWorkspaceImage) 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.(*CreateUpdatedWorkspaceImageInput) _ = 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("WorkspacesService.CreateUpdatedWorkspaceImage") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateUpdatedWorkspaceImageInput(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_serializeOpCreateWorkspaceBundle struct { } func (*awsAwsjson11_serializeOpCreateWorkspaceBundle) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateWorkspaceBundle) 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.(*CreateWorkspaceBundleInput) _ = 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("WorkspacesService.CreateWorkspaceBundle") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateWorkspaceBundleInput(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_serializeOpCreateWorkspaceImage struct { } func (*awsAwsjson11_serializeOpCreateWorkspaceImage) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateWorkspaceImage) 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.(*CreateWorkspaceImageInput) _ = 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("WorkspacesService.CreateWorkspaceImage") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateWorkspaceImageInput(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_serializeOpCreateWorkspaces struct { } func (*awsAwsjson11_serializeOpCreateWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateWorkspaces) 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.(*CreateWorkspacesInput) _ = 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("WorkspacesService.CreateWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateWorkspacesInput(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_serializeOpDeleteClientBranding struct { } func (*awsAwsjson11_serializeOpDeleteClientBranding) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteClientBranding) 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.(*DeleteClientBrandingInput) _ = 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("WorkspacesService.DeleteClientBranding") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteClientBrandingInput(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_serializeOpDeleteConnectClientAddIn struct { } func (*awsAwsjson11_serializeOpDeleteConnectClientAddIn) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteConnectClientAddIn) 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.(*DeleteConnectClientAddInInput) _ = 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("WorkspacesService.DeleteConnectClientAddIn") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteConnectClientAddInInput(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_serializeOpDeleteConnectionAlias struct { } func (*awsAwsjson11_serializeOpDeleteConnectionAlias) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteConnectionAlias) 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.(*DeleteConnectionAliasInput) _ = 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("WorkspacesService.DeleteConnectionAlias") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteConnectionAliasInput(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_serializeOpDeleteIpGroup struct { } func (*awsAwsjson11_serializeOpDeleteIpGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteIpGroup) 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.(*DeleteIpGroupInput) _ = 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("WorkspacesService.DeleteIpGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteIpGroupInput(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_serializeOpDeleteTags struct { } func (*awsAwsjson11_serializeOpDeleteTags) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteTags) 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.(*DeleteTagsInput) _ = 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("WorkspacesService.DeleteTags") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteTagsInput(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_serializeOpDeleteWorkspaceBundle struct { } func (*awsAwsjson11_serializeOpDeleteWorkspaceBundle) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteWorkspaceBundle) 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.(*DeleteWorkspaceBundleInput) _ = 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("WorkspacesService.DeleteWorkspaceBundle") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteWorkspaceBundleInput(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_serializeOpDeleteWorkspaceImage struct { } func (*awsAwsjson11_serializeOpDeleteWorkspaceImage) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteWorkspaceImage) 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.(*DeleteWorkspaceImageInput) _ = 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("WorkspacesService.DeleteWorkspaceImage") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteWorkspaceImageInput(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_serializeOpDeregisterWorkspaceDirectory struct { } func (*awsAwsjson11_serializeOpDeregisterWorkspaceDirectory) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeregisterWorkspaceDirectory) 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.(*DeregisterWorkspaceDirectoryInput) _ = 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("WorkspacesService.DeregisterWorkspaceDirectory") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeregisterWorkspaceDirectoryInput(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_serializeOpDescribeAccount struct { } func (*awsAwsjson11_serializeOpDescribeAccount) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeAccount) 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.(*DescribeAccountInput) _ = 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("WorkspacesService.DescribeAccount") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeAccountInput(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_serializeOpDescribeAccountModifications struct { } func (*awsAwsjson11_serializeOpDescribeAccountModifications) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeAccountModifications) 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.(*DescribeAccountModificationsInput) _ = 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("WorkspacesService.DescribeAccountModifications") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeAccountModificationsInput(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_serializeOpDescribeClientBranding struct { } func (*awsAwsjson11_serializeOpDescribeClientBranding) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeClientBranding) 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.(*DescribeClientBrandingInput) _ = 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("WorkspacesService.DescribeClientBranding") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeClientBrandingInput(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_serializeOpDescribeClientProperties struct { } func (*awsAwsjson11_serializeOpDescribeClientProperties) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeClientProperties) 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.(*DescribeClientPropertiesInput) _ = 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("WorkspacesService.DescribeClientProperties") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeClientPropertiesInput(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_serializeOpDescribeConnectClientAddIns struct { } func (*awsAwsjson11_serializeOpDescribeConnectClientAddIns) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeConnectClientAddIns) 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.(*DescribeConnectClientAddInsInput) _ = 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("WorkspacesService.DescribeConnectClientAddIns") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeConnectClientAddInsInput(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_serializeOpDescribeConnectionAliases struct { } func (*awsAwsjson11_serializeOpDescribeConnectionAliases) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeConnectionAliases) 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.(*DescribeConnectionAliasesInput) _ = 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("WorkspacesService.DescribeConnectionAliases") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeConnectionAliasesInput(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_serializeOpDescribeConnectionAliasPermissions struct { } func (*awsAwsjson11_serializeOpDescribeConnectionAliasPermissions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeConnectionAliasPermissions) 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.(*DescribeConnectionAliasPermissionsInput) _ = 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("WorkspacesService.DescribeConnectionAliasPermissions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeConnectionAliasPermissionsInput(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_serializeOpDescribeIpGroups struct { } func (*awsAwsjson11_serializeOpDescribeIpGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeIpGroups) 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.(*DescribeIpGroupsInput) _ = 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("WorkspacesService.DescribeIpGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeIpGroupsInput(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_serializeOpDescribeTags struct { } func (*awsAwsjson11_serializeOpDescribeTags) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeTags) 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.(*DescribeTagsInput) _ = 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("WorkspacesService.DescribeTags") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeTagsInput(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_serializeOpDescribeWorkspaceBundles struct { } func (*awsAwsjson11_serializeOpDescribeWorkspaceBundles) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeWorkspaceBundles) 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.(*DescribeWorkspaceBundlesInput) _ = 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("WorkspacesService.DescribeWorkspaceBundles") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeWorkspaceBundlesInput(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_serializeOpDescribeWorkspaceDirectories struct { } func (*awsAwsjson11_serializeOpDescribeWorkspaceDirectories) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeWorkspaceDirectories) 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.(*DescribeWorkspaceDirectoriesInput) _ = 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("WorkspacesService.DescribeWorkspaceDirectories") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeWorkspaceDirectoriesInput(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_serializeOpDescribeWorkspaceImagePermissions struct { } func (*awsAwsjson11_serializeOpDescribeWorkspaceImagePermissions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeWorkspaceImagePermissions) 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.(*DescribeWorkspaceImagePermissionsInput) _ = 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("WorkspacesService.DescribeWorkspaceImagePermissions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeWorkspaceImagePermissionsInput(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_serializeOpDescribeWorkspaceImages struct { } func (*awsAwsjson11_serializeOpDescribeWorkspaceImages) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeWorkspaceImages) 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.(*DescribeWorkspaceImagesInput) _ = 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("WorkspacesService.DescribeWorkspaceImages") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeWorkspaceImagesInput(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_serializeOpDescribeWorkspaces struct { } func (*awsAwsjson11_serializeOpDescribeWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeWorkspaces) 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.(*DescribeWorkspacesInput) _ = 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("WorkspacesService.DescribeWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeWorkspacesInput(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_serializeOpDescribeWorkspacesConnectionStatus struct { } func (*awsAwsjson11_serializeOpDescribeWorkspacesConnectionStatus) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeWorkspacesConnectionStatus) 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.(*DescribeWorkspacesConnectionStatusInput) _ = 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("WorkspacesService.DescribeWorkspacesConnectionStatus") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeWorkspacesConnectionStatusInput(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_serializeOpDescribeWorkspaceSnapshots struct { } func (*awsAwsjson11_serializeOpDescribeWorkspaceSnapshots) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeWorkspaceSnapshots) 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.(*DescribeWorkspaceSnapshotsInput) _ = 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("WorkspacesService.DescribeWorkspaceSnapshots") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeWorkspaceSnapshotsInput(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_serializeOpDisassociateConnectionAlias struct { } func (*awsAwsjson11_serializeOpDisassociateConnectionAlias) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDisassociateConnectionAlias) 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.(*DisassociateConnectionAliasInput) _ = 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("WorkspacesService.DisassociateConnectionAlias") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDisassociateConnectionAliasInput(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_serializeOpDisassociateIpGroups struct { } func (*awsAwsjson11_serializeOpDisassociateIpGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDisassociateIpGroups) 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.(*DisassociateIpGroupsInput) _ = 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("WorkspacesService.DisassociateIpGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDisassociateIpGroupsInput(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_serializeOpImportClientBranding struct { } func (*awsAwsjson11_serializeOpImportClientBranding) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpImportClientBranding) 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.(*ImportClientBrandingInput) _ = 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("WorkspacesService.ImportClientBranding") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentImportClientBrandingInput(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_serializeOpImportWorkspaceImage struct { } func (*awsAwsjson11_serializeOpImportWorkspaceImage) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpImportWorkspaceImage) 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.(*ImportWorkspaceImageInput) _ = 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("WorkspacesService.ImportWorkspaceImage") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentImportWorkspaceImageInput(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_serializeOpListAvailableManagementCidrRanges struct { } func (*awsAwsjson11_serializeOpListAvailableManagementCidrRanges) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListAvailableManagementCidrRanges) 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.(*ListAvailableManagementCidrRangesInput) _ = 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("WorkspacesService.ListAvailableManagementCidrRanges") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListAvailableManagementCidrRangesInput(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_serializeOpMigrateWorkspace struct { } func (*awsAwsjson11_serializeOpMigrateWorkspace) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpMigrateWorkspace) 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.(*MigrateWorkspaceInput) _ = 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("WorkspacesService.MigrateWorkspace") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentMigrateWorkspaceInput(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_serializeOpModifyAccount struct { } func (*awsAwsjson11_serializeOpModifyAccount) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifyAccount) 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.(*ModifyAccountInput) _ = 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("WorkspacesService.ModifyAccount") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifyAccountInput(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_serializeOpModifyCertificateBasedAuthProperties struct { } func (*awsAwsjson11_serializeOpModifyCertificateBasedAuthProperties) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifyCertificateBasedAuthProperties) 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.(*ModifyCertificateBasedAuthPropertiesInput) _ = 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("WorkspacesService.ModifyCertificateBasedAuthProperties") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifyCertificateBasedAuthPropertiesInput(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_serializeOpModifyClientProperties struct { } func (*awsAwsjson11_serializeOpModifyClientProperties) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifyClientProperties) 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.(*ModifyClientPropertiesInput) _ = 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("WorkspacesService.ModifyClientProperties") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifyClientPropertiesInput(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_serializeOpModifySamlProperties struct { } func (*awsAwsjson11_serializeOpModifySamlProperties) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifySamlProperties) 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.(*ModifySamlPropertiesInput) _ = 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("WorkspacesService.ModifySamlProperties") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifySamlPropertiesInput(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_serializeOpModifySelfservicePermissions struct { } func (*awsAwsjson11_serializeOpModifySelfservicePermissions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifySelfservicePermissions) 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.(*ModifySelfservicePermissionsInput) _ = 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("WorkspacesService.ModifySelfservicePermissions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifySelfservicePermissionsInput(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_serializeOpModifyWorkspaceAccessProperties struct { } func (*awsAwsjson11_serializeOpModifyWorkspaceAccessProperties) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifyWorkspaceAccessProperties) 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.(*ModifyWorkspaceAccessPropertiesInput) _ = 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("WorkspacesService.ModifyWorkspaceAccessProperties") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifyWorkspaceAccessPropertiesInput(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_serializeOpModifyWorkspaceCreationProperties struct { } func (*awsAwsjson11_serializeOpModifyWorkspaceCreationProperties) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifyWorkspaceCreationProperties) 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.(*ModifyWorkspaceCreationPropertiesInput) _ = 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("WorkspacesService.ModifyWorkspaceCreationProperties") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifyWorkspaceCreationPropertiesInput(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_serializeOpModifyWorkspaceProperties struct { } func (*awsAwsjson11_serializeOpModifyWorkspaceProperties) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifyWorkspaceProperties) 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.(*ModifyWorkspacePropertiesInput) _ = 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("WorkspacesService.ModifyWorkspaceProperties") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifyWorkspacePropertiesInput(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_serializeOpModifyWorkspaceState struct { } func (*awsAwsjson11_serializeOpModifyWorkspaceState) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpModifyWorkspaceState) 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.(*ModifyWorkspaceStateInput) _ = 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("WorkspacesService.ModifyWorkspaceState") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentModifyWorkspaceStateInput(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_serializeOpRebootWorkspaces struct { } func (*awsAwsjson11_serializeOpRebootWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRebootWorkspaces) 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.(*RebootWorkspacesInput) _ = 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("WorkspacesService.RebootWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRebootWorkspacesInput(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_serializeOpRebuildWorkspaces struct { } func (*awsAwsjson11_serializeOpRebuildWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRebuildWorkspaces) 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.(*RebuildWorkspacesInput) _ = 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("WorkspacesService.RebuildWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRebuildWorkspacesInput(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_serializeOpRegisterWorkspaceDirectory struct { } func (*awsAwsjson11_serializeOpRegisterWorkspaceDirectory) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRegisterWorkspaceDirectory) 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.(*RegisterWorkspaceDirectoryInput) _ = 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("WorkspacesService.RegisterWorkspaceDirectory") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRegisterWorkspaceDirectoryInput(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_serializeOpRestoreWorkspace struct { } func (*awsAwsjson11_serializeOpRestoreWorkspace) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRestoreWorkspace) 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.(*RestoreWorkspaceInput) _ = 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("WorkspacesService.RestoreWorkspace") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRestoreWorkspaceInput(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_serializeOpRevokeIpRules struct { } func (*awsAwsjson11_serializeOpRevokeIpRules) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRevokeIpRules) 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.(*RevokeIpRulesInput) _ = 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("WorkspacesService.RevokeIpRules") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRevokeIpRulesInput(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_serializeOpStartWorkspaces struct { } func (*awsAwsjson11_serializeOpStartWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpStartWorkspaces) 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.(*StartWorkspacesInput) _ = 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("WorkspacesService.StartWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentStartWorkspacesInput(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_serializeOpStopWorkspaces struct { } func (*awsAwsjson11_serializeOpStopWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpStopWorkspaces) 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.(*StopWorkspacesInput) _ = 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("WorkspacesService.StopWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentStopWorkspacesInput(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_serializeOpTerminateWorkspaces struct { } func (*awsAwsjson11_serializeOpTerminateWorkspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpTerminateWorkspaces) 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.(*TerminateWorkspacesInput) _ = 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("WorkspacesService.TerminateWorkspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentTerminateWorkspacesInput(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_serializeOpUpdateConnectClientAddIn struct { } func (*awsAwsjson11_serializeOpUpdateConnectClientAddIn) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateConnectClientAddIn) 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.(*UpdateConnectClientAddInInput) _ = 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("WorkspacesService.UpdateConnectClientAddIn") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateConnectClientAddInInput(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_serializeOpUpdateConnectionAliasPermission struct { } func (*awsAwsjson11_serializeOpUpdateConnectionAliasPermission) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateConnectionAliasPermission) 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.(*UpdateConnectionAliasPermissionInput) _ = 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("WorkspacesService.UpdateConnectionAliasPermission") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateConnectionAliasPermissionInput(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_serializeOpUpdateRulesOfIpGroup struct { } func (*awsAwsjson11_serializeOpUpdateRulesOfIpGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateRulesOfIpGroup) 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.(*UpdateRulesOfIpGroupInput) _ = 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("WorkspacesService.UpdateRulesOfIpGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateRulesOfIpGroupInput(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_serializeOpUpdateWorkspaceBundle struct { } func (*awsAwsjson11_serializeOpUpdateWorkspaceBundle) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateWorkspaceBundle) 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.(*UpdateWorkspaceBundleInput) _ = 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("WorkspacesService.UpdateWorkspaceBundle") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateWorkspaceBundleInput(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_serializeOpUpdateWorkspaceImagePermission struct { } func (*awsAwsjson11_serializeOpUpdateWorkspaceImagePermission) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateWorkspaceImagePermission) 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.(*UpdateWorkspaceImagePermissionInput) _ = 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("WorkspacesService.UpdateWorkspaceImagePermission") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateWorkspaceImagePermissionInput(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_serializeDocumentApplicationList(v []types.Application, 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_serializeDocumentBundleIdList(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_serializeDocumentCertificateBasedAuthProperties(v *types.CertificateBasedAuthProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CertificateAuthorityArn != nil { ok := object.Key("CertificateAuthorityArn") ok.String(*v.CertificateAuthorityArn) } if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) } return nil } func awsAwsjson11_serializeDocumentClientDeviceTypeList(v []types.ClientDeviceType, 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_serializeDocumentClientProperties(v *types.ClientProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.LogUploadEnabled) > 0 { ok := object.Key("LogUploadEnabled") ok.String(string(v.LogUploadEnabled)) } if len(v.ReconnectEnabled) > 0 { ok := object.Key("ReconnectEnabled") ok.String(string(v.ReconnectEnabled)) } return nil } func awsAwsjson11_serializeDocumentComputeType(v *types.ComputeType, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Name) > 0 { ok := object.Key("Name") ok.String(string(v.Name)) } return nil } func awsAwsjson11_serializeDocumentConnectionAliasIdList(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_serializeDocumentConnectionAliasPermission(v *types.ConnectionAliasPermission, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AllowAssociation != nil { ok := object.Key("AllowAssociation") ok.Boolean(*v.AllowAssociation) } if v.SharedAccountId != nil { ok := object.Key("SharedAccountId") ok.String(*v.SharedAccountId) } return nil } func awsAwsjson11_serializeDocumentDefaultImportClientBrandingAttributes(v *types.DefaultImportClientBrandingAttributes, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ForgotPasswordLink != nil { ok := object.Key("ForgotPasswordLink") ok.String(*v.ForgotPasswordLink) } if v.LoginMessage != nil { ok := object.Key("LoginMessage") if err := awsAwsjson11_serializeDocumentLoginMessage(v.LoginMessage, ok); err != nil { return err } } if v.Logo != nil { ok := object.Key("Logo") ok.Base64EncodeBytes(v.Logo) } if v.SupportEmail != nil { ok := object.Key("SupportEmail") ok.String(*v.SupportEmail) } if v.SupportLink != nil { ok := object.Key("SupportLink") ok.String(*v.SupportLink) } return nil } func awsAwsjson11_serializeDocumentDeletableCertificateBasedAuthPropertiesList(v []types.DeletableCertificateBasedAuthProperty, 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_serializeDocumentDeletableSamlPropertiesList(v []types.DeletableSamlProperty, 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_serializeDocumentDirectoryIdList(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_serializeDocumentIosImportClientBrandingAttributes(v *types.IosImportClientBrandingAttributes, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ForgotPasswordLink != nil { ok := object.Key("ForgotPasswordLink") ok.String(*v.ForgotPasswordLink) } if v.LoginMessage != nil { ok := object.Key("LoginMessage") if err := awsAwsjson11_serializeDocumentLoginMessage(v.LoginMessage, ok); err != nil { return err } } if v.Logo != nil { ok := object.Key("Logo") ok.Base64EncodeBytes(v.Logo) } if v.Logo2x != nil { ok := object.Key("Logo2x") ok.Base64EncodeBytes(v.Logo2x) } if v.Logo3x != nil { ok := object.Key("Logo3x") ok.Base64EncodeBytes(v.Logo3x) } if v.SupportEmail != nil { ok := object.Key("SupportEmail") ok.String(*v.SupportEmail) } if v.SupportLink != nil { ok := object.Key("SupportLink") ok.String(*v.SupportLink) } return nil } func awsAwsjson11_serializeDocumentIpGroupIdList(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_serializeDocumentIpRevokedRuleList(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_serializeDocumentIpRuleItem(v *types.IpRuleItem, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IpRule != nil { ok := object.Key("ipRule") ok.String(*v.IpRule) } if v.RuleDesc != nil { ok := object.Key("ruleDesc") ok.String(*v.RuleDesc) } return nil } func awsAwsjson11_serializeDocumentIpRuleList(v []types.IpRuleItem, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentIpRuleItem(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentLoginMessage(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.String(v[key]) } return nil } func awsAwsjson11_serializeDocumentProtocolList(v []types.Protocol, 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_serializeDocumentRebootRequest(v *types.RebootRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeDocumentRebootWorkspaceRequests(v []types.RebootRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRebootRequest(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRebuildRequest(v *types.RebuildRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeDocumentRebuildWorkspaceRequests(v []types.RebuildRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRebuildRequest(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentResourceIdList(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_serializeDocumentRootStorage(v *types.RootStorage, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Capacity != nil { ok := object.Key("Capacity") ok.String(*v.Capacity) } return nil } func awsAwsjson11_serializeDocumentSamlProperties(v *types.SamlProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RelayStateParameterName != nil { ok := object.Key("RelayStateParameterName") ok.String(*v.RelayStateParameterName) } if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) } if v.UserAccessUrl != nil { ok := object.Key("UserAccessUrl") ok.String(*v.UserAccessUrl) } return nil } func awsAwsjson11_serializeDocumentSelfservicePermissions(v *types.SelfservicePermissions, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ChangeComputeType) > 0 { ok := object.Key("ChangeComputeType") ok.String(string(v.ChangeComputeType)) } if len(v.IncreaseVolumeSize) > 0 { ok := object.Key("IncreaseVolumeSize") ok.String(string(v.IncreaseVolumeSize)) } if len(v.RebuildWorkspace) > 0 { ok := object.Key("RebuildWorkspace") ok.String(string(v.RebuildWorkspace)) } if len(v.RestartWorkspace) > 0 { ok := object.Key("RestartWorkspace") ok.String(string(v.RestartWorkspace)) } if len(v.SwitchRunningMode) > 0 { ok := object.Key("SwitchRunningMode") ok.String(string(v.SwitchRunningMode)) } return nil } func awsAwsjson11_serializeDocumentStandbyWorkspace(v *types.StandbyWorkspace, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } if v.PrimaryWorkspaceId != nil { ok := object.Key("PrimaryWorkspaceId") ok.String(*v.PrimaryWorkspaceId) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.VolumeEncryptionKey != nil { ok := object.Key("VolumeEncryptionKey") ok.String(*v.VolumeEncryptionKey) } return nil } func awsAwsjson11_serializeDocumentStandbyWorkspacesList(v []types.StandbyWorkspace, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentStandbyWorkspace(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentStartRequest(v *types.StartRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeDocumentStartWorkspaceRequests(v []types.StartRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentStartRequest(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentStopRequest(v *types.StopRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeDocumentStopWorkspaceRequests(v []types.StopRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentStopRequest(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSubnetIds(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_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_serializeDocumentTerminateRequest(v *types.TerminateRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeDocumentTerminateWorkspaceRequests(v []types.TerminateRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentTerminateRequest(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentUserStorage(v *types.UserStorage, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Capacity != nil { ok := object.Key("Capacity") ok.String(*v.Capacity) } return nil } func awsAwsjson11_serializeDocumentWorkspaceAccessProperties(v *types.WorkspaceAccessProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.DeviceTypeAndroid) > 0 { ok := object.Key("DeviceTypeAndroid") ok.String(string(v.DeviceTypeAndroid)) } if len(v.DeviceTypeChromeOs) > 0 { ok := object.Key("DeviceTypeChromeOs") ok.String(string(v.DeviceTypeChromeOs)) } if len(v.DeviceTypeIos) > 0 { ok := object.Key("DeviceTypeIos") ok.String(string(v.DeviceTypeIos)) } if len(v.DeviceTypeLinux) > 0 { ok := object.Key("DeviceTypeLinux") ok.String(string(v.DeviceTypeLinux)) } if len(v.DeviceTypeOsx) > 0 { ok := object.Key("DeviceTypeOsx") ok.String(string(v.DeviceTypeOsx)) } if len(v.DeviceTypeWeb) > 0 { ok := object.Key("DeviceTypeWeb") ok.String(string(v.DeviceTypeWeb)) } if len(v.DeviceTypeWindows) > 0 { ok := object.Key("DeviceTypeWindows") ok.String(string(v.DeviceTypeWindows)) } if len(v.DeviceTypeZeroClient) > 0 { ok := object.Key("DeviceTypeZeroClient") ok.String(string(v.DeviceTypeZeroClient)) } return nil } func awsAwsjson11_serializeDocumentWorkspaceCreationProperties(v *types.WorkspaceCreationProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CustomSecurityGroupId != nil { ok := object.Key("CustomSecurityGroupId") ok.String(*v.CustomSecurityGroupId) } if v.DefaultOu != nil { ok := object.Key("DefaultOu") ok.String(*v.DefaultOu) } if v.EnableInternetAccess != nil { ok := object.Key("EnableInternetAccess") ok.Boolean(*v.EnableInternetAccess) } if v.EnableMaintenanceMode != nil { ok := object.Key("EnableMaintenanceMode") ok.Boolean(*v.EnableMaintenanceMode) } if v.EnableWorkDocs != nil { ok := object.Key("EnableWorkDocs") ok.Boolean(*v.EnableWorkDocs) } if v.UserEnabledAsLocalAdministrator != nil { ok := object.Key("UserEnabledAsLocalAdministrator") ok.Boolean(*v.UserEnabledAsLocalAdministrator) } return nil } func awsAwsjson11_serializeDocumentWorkspaceIdList(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_serializeDocumentWorkspaceImageIdList(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_serializeDocumentWorkspaceProperties(v *types.WorkspaceProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ComputeTypeName) > 0 { ok := object.Key("ComputeTypeName") ok.String(string(v.ComputeTypeName)) } if v.Protocols != nil { ok := object.Key("Protocols") if err := awsAwsjson11_serializeDocumentProtocolList(v.Protocols, ok); err != nil { return err } } if v.RootVolumeSizeGib != nil { ok := object.Key("RootVolumeSizeGib") ok.Integer(*v.RootVolumeSizeGib) } if len(v.RunningMode) > 0 { ok := object.Key("RunningMode") ok.String(string(v.RunningMode)) } if v.RunningModeAutoStopTimeoutInMinutes != nil { ok := object.Key("RunningModeAutoStopTimeoutInMinutes") ok.Integer(*v.RunningModeAutoStopTimeoutInMinutes) } if v.UserVolumeSizeGib != nil { ok := object.Key("UserVolumeSizeGib") ok.Integer(*v.UserVolumeSizeGib) } return nil } func awsAwsjson11_serializeDocumentWorkspaceRequest(v *types.WorkspaceRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BundleId != nil { ok := object.Key("BundleId") ok.String(*v.BundleId) } if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } if v.RootVolumeEncryptionEnabled != nil { ok := object.Key("RootVolumeEncryptionEnabled") ok.Boolean(*v.RootVolumeEncryptionEnabled) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.UserName != nil { ok := object.Key("UserName") ok.String(*v.UserName) } if v.UserVolumeEncryptionEnabled != nil { ok := object.Key("UserVolumeEncryptionEnabled") ok.Boolean(*v.UserVolumeEncryptionEnabled) } if v.VolumeEncryptionKey != nil { ok := object.Key("VolumeEncryptionKey") ok.String(*v.VolumeEncryptionKey) } if v.WorkspaceProperties != nil { ok := object.Key("WorkspaceProperties") if err := awsAwsjson11_serializeDocumentWorkspaceProperties(v.WorkspaceProperties, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentWorkspaceRequestList(v []types.WorkspaceRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentWorkspaceRequest(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentAssociateConnectionAliasInput(v *AssociateConnectionAliasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AliasId != nil { ok := object.Key("AliasId") ok.String(*v.AliasId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentAssociateIpGroupsInput(v *AssociateIpGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } if v.GroupIds != nil { ok := object.Key("GroupIds") if err := awsAwsjson11_serializeDocumentIpGroupIdList(v.GroupIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentAuthorizeIpRulesInput(v *AuthorizeIpRulesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.UserRules != nil { ok := object.Key("UserRules") if err := awsAwsjson11_serializeDocumentIpRuleList(v.UserRules, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCopyWorkspaceImageInput(v *CopyWorkspaceImageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() 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.SourceImageId != nil { ok := object.Key("SourceImageId") ok.String(*v.SourceImageId) } if v.SourceRegion != nil { ok := object.Key("SourceRegion") ok.String(*v.SourceRegion) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateConnectClientAddInInput(v *CreateConnectClientAddInInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.URL != nil { ok := object.Key("URL") ok.String(*v.URL) } return nil } func awsAwsjson11_serializeOpDocumentCreateConnectionAliasInput(v *CreateConnectionAliasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ConnectionString != nil { ok := object.Key("ConnectionString") ok.String(*v.ConnectionString) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateIpGroupInput(v *CreateIpGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupDesc != nil { ok := object.Key("GroupDesc") ok.String(*v.GroupDesc) } if v.GroupName != nil { ok := object.Key("GroupName") ok.String(*v.GroupName) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.UserRules != nil { ok := object.Key("UserRules") if err := awsAwsjson11_serializeDocumentIpRuleList(v.UserRules, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateStandbyWorkspacesInput(v *CreateStandbyWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PrimaryRegion != nil { ok := object.Key("PrimaryRegion") ok.String(*v.PrimaryRegion) } if v.StandbyWorkspaces != nil { ok := object.Key("StandbyWorkspaces") if err := awsAwsjson11_serializeDocumentStandbyWorkspacesList(v.StandbyWorkspaces, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateUpdatedWorkspaceImageInput(v *CreateUpdatedWorkspaceImageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() 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.SourceImageId != nil { ok := object.Key("SourceImageId") ok.String(*v.SourceImageId) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateWorkspaceBundleInput(v *CreateWorkspaceBundleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BundleDescription != nil { ok := object.Key("BundleDescription") ok.String(*v.BundleDescription) } if v.BundleName != nil { ok := object.Key("BundleName") ok.String(*v.BundleName) } if v.ComputeType != nil { ok := object.Key("ComputeType") if err := awsAwsjson11_serializeDocumentComputeType(v.ComputeType, ok); err != nil { return err } } if v.ImageId != nil { ok := object.Key("ImageId") ok.String(*v.ImageId) } if v.RootStorage != nil { ok := object.Key("RootStorage") if err := awsAwsjson11_serializeDocumentRootStorage(v.RootStorage, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.UserStorage != nil { ok := object.Key("UserStorage") if err := awsAwsjson11_serializeDocumentUserStorage(v.UserStorage, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateWorkspaceImageInput(v *CreateWorkspaceImageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() 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.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeOpDocumentCreateWorkspacesInput(v *CreateWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Workspaces != nil { ok := object.Key("Workspaces") if err := awsAwsjson11_serializeDocumentWorkspaceRequestList(v.Workspaces, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentDeleteClientBrandingInput(v *DeleteClientBrandingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Platforms != nil { ok := object.Key("Platforms") if err := awsAwsjson11_serializeDocumentClientDeviceTypeList(v.Platforms, ok); err != nil { return err } } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteConnectClientAddInInput(v *DeleteConnectClientAddInInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AddInId != nil { ok := object.Key("AddInId") ok.String(*v.AddInId) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteConnectionAliasInput(v *DeleteConnectionAliasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AliasId != nil { ok := object.Key("AliasId") ok.String(*v.AliasId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteIpGroupInput(v *DeleteIpGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentDeleteWorkspaceBundleInput(v *DeleteWorkspaceBundleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BundleId != nil { ok := object.Key("BundleId") ok.String(*v.BundleId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteWorkspaceImageInput(v *DeleteWorkspaceImageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImageId != nil { ok := object.Key("ImageId") ok.String(*v.ImageId) } return nil } func awsAwsjson11_serializeOpDocumentDeregisterWorkspaceDirectoryInput(v *DeregisterWorkspaceDirectoryInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeAccountInput(v *DescribeAccountInput, value smithyjson.Value) error { object := value.Object() defer object.Close() return nil } func awsAwsjson11_serializeOpDocumentDescribeAccountModificationsInput(v *DescribeAccountModificationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentDescribeClientBrandingInput(v *DescribeClientBrandingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeClientPropertiesInput(v *DescribeClientPropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceIds != nil { ok := object.Key("ResourceIds") if err := awsAwsjson11_serializeDocumentResourceIdList(v.ResourceIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentDescribeConnectClientAddInsInput(v *DescribeConnectClientAddInsInput, 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.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeConnectionAliasesInput(v *DescribeConnectionAliasesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AliasIds != nil { ok := object.Key("AliasIds") if err := awsAwsjson11_serializeDocumentConnectionAliasIdList(v.AliasIds, ok); err != nil { return err } } if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeConnectionAliasPermissionsInput(v *DescribeConnectionAliasPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AliasId != nil { ok := object.Key("AliasId") ok.String(*v.AliasId) } 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_serializeOpDocumentDescribeIpGroupsInput(v *DescribeIpGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupIds != nil { ok := object.Key("GroupIds") if err := awsAwsjson11_serializeDocumentIpGroupIdList(v.GroupIds, ok); err != nil { return err } } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentDescribeTagsInput(v *DescribeTagsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeWorkspaceBundlesInput(v *DescribeWorkspaceBundlesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BundleIds != nil { ok := object.Key("BundleIds") if err := awsAwsjson11_serializeDocumentBundleIdList(v.BundleIds, ok); err != nil { return err } } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.Owner != nil { ok := object.Key("Owner") ok.String(*v.Owner) } return nil } func awsAwsjson11_serializeOpDocumentDescribeWorkspaceDirectoriesInput(v *DescribeWorkspaceDirectoriesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DirectoryIds != nil { ok := object.Key("DirectoryIds") if err := awsAwsjson11_serializeDocumentDirectoryIdList(v.DirectoryIds, ok); err != nil { return err } } if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentDescribeWorkspaceImagePermissionsInput(v *DescribeWorkspaceImagePermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImageId != nil { ok := object.Key("ImageId") ok.String(*v.ImageId) } 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_serializeOpDocumentDescribeWorkspaceImagesInput(v *DescribeWorkspaceImagesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImageIds != nil { ok := object.Key("ImageIds") if err := awsAwsjson11_serializeDocumentWorkspaceImageIdList(v.ImageIds, ok); err != nil { return err } } if len(v.ImageType) > 0 { ok := object.Key("ImageType") ok.String(string(v.ImageType)) } 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_serializeOpDocumentDescribeWorkspacesConnectionStatusInput(v *DescribeWorkspacesConnectionStatusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.WorkspaceIds != nil { ok := object.Key("WorkspaceIds") if err := awsAwsjson11_serializeDocumentWorkspaceIdList(v.WorkspaceIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentDescribeWorkspacesInput(v *DescribeWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BundleId != nil { ok := object.Key("BundleId") ok.String(*v.BundleId) } if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.UserName != nil { ok := object.Key("UserName") ok.String(*v.UserName) } if v.WorkspaceIds != nil { ok := object.Key("WorkspaceIds") if err := awsAwsjson11_serializeDocumentWorkspaceIdList(v.WorkspaceIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentDescribeWorkspaceSnapshotsInput(v *DescribeWorkspaceSnapshotsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeOpDocumentDisassociateConnectionAliasInput(v *DisassociateConnectionAliasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AliasId != nil { ok := object.Key("AliasId") ok.String(*v.AliasId) } return nil } func awsAwsjson11_serializeOpDocumentDisassociateIpGroupsInput(v *DisassociateIpGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } if v.GroupIds != nil { ok := object.Key("GroupIds") if err := awsAwsjson11_serializeDocumentIpGroupIdList(v.GroupIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentImportClientBrandingInput(v *ImportClientBrandingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeviceTypeAndroid != nil { ok := object.Key("DeviceTypeAndroid") if err := awsAwsjson11_serializeDocumentDefaultImportClientBrandingAttributes(v.DeviceTypeAndroid, ok); err != nil { return err } } if v.DeviceTypeIos != nil { ok := object.Key("DeviceTypeIos") if err := awsAwsjson11_serializeDocumentIosImportClientBrandingAttributes(v.DeviceTypeIos, ok); err != nil { return err } } if v.DeviceTypeLinux != nil { ok := object.Key("DeviceTypeLinux") if err := awsAwsjson11_serializeDocumentDefaultImportClientBrandingAttributes(v.DeviceTypeLinux, ok); err != nil { return err } } if v.DeviceTypeOsx != nil { ok := object.Key("DeviceTypeOsx") if err := awsAwsjson11_serializeDocumentDefaultImportClientBrandingAttributes(v.DeviceTypeOsx, ok); err != nil { return err } } if v.DeviceTypeWeb != nil { ok := object.Key("DeviceTypeWeb") if err := awsAwsjson11_serializeDocumentDefaultImportClientBrandingAttributes(v.DeviceTypeWeb, ok); err != nil { return err } } if v.DeviceTypeWindows != nil { ok := object.Key("DeviceTypeWindows") if err := awsAwsjson11_serializeDocumentDefaultImportClientBrandingAttributes(v.DeviceTypeWindows, ok); err != nil { return err } } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentImportWorkspaceImageInput(v *ImportWorkspaceImageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Applications != nil { ok := object.Key("Applications") if err := awsAwsjson11_serializeDocumentApplicationList(v.Applications, ok); err != nil { return err } } if v.Ec2ImageId != nil { ok := object.Key("Ec2ImageId") ok.String(*v.Ec2ImageId) } if v.ImageDescription != nil { ok := object.Key("ImageDescription") ok.String(*v.ImageDescription) } if v.ImageName != nil { ok := object.Key("ImageName") ok.String(*v.ImageName) } if len(v.IngestionProcess) > 0 { ok := object.Key("IngestionProcess") ok.String(string(v.IngestionProcess)) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentListAvailableManagementCidrRangesInput(v *ListAvailableManagementCidrRangesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ManagementCidrRangeConstraint != nil { ok := object.Key("ManagementCidrRangeConstraint") ok.String(*v.ManagementCidrRangeConstraint) } 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_serializeOpDocumentMigrateWorkspaceInput(v *MigrateWorkspaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BundleId != nil { ok := object.Key("BundleId") ok.String(*v.BundleId) } if v.SourceWorkspaceId != nil { ok := object.Key("SourceWorkspaceId") ok.String(*v.SourceWorkspaceId) } return nil } func awsAwsjson11_serializeOpDocumentModifyAccountInput(v *ModifyAccountInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DedicatedTenancyManagementCidrRange != nil { ok := object.Key("DedicatedTenancyManagementCidrRange") ok.String(*v.DedicatedTenancyManagementCidrRange) } if len(v.DedicatedTenancySupport) > 0 { ok := object.Key("DedicatedTenancySupport") ok.String(string(v.DedicatedTenancySupport)) } return nil } func awsAwsjson11_serializeOpDocumentModifyCertificateBasedAuthPropertiesInput(v *ModifyCertificateBasedAuthPropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CertificateBasedAuthProperties != nil { ok := object.Key("CertificateBasedAuthProperties") if err := awsAwsjson11_serializeDocumentCertificateBasedAuthProperties(v.CertificateBasedAuthProperties, ok); err != nil { return err } } if v.PropertiesToDelete != nil { ok := object.Key("PropertiesToDelete") if err := awsAwsjson11_serializeDocumentDeletableCertificateBasedAuthPropertiesList(v.PropertiesToDelete, ok); err != nil { return err } } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentModifyClientPropertiesInput(v *ModifyClientPropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientProperties != nil { ok := object.Key("ClientProperties") if err := awsAwsjson11_serializeDocumentClientProperties(v.ClientProperties, ok); err != nil { return err } } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } return nil } func awsAwsjson11_serializeOpDocumentModifySamlPropertiesInput(v *ModifySamlPropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PropertiesToDelete != nil { ok := object.Key("PropertiesToDelete") if err := awsAwsjson11_serializeDocumentDeletableSamlPropertiesList(v.PropertiesToDelete, ok); err != nil { return err } } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.SamlProperties != nil { ok := object.Key("SamlProperties") if err := awsAwsjson11_serializeDocumentSamlProperties(v.SamlProperties, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentModifySelfservicePermissionsInput(v *ModifySelfservicePermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.SelfservicePermissions != nil { ok := object.Key("SelfservicePermissions") if err := awsAwsjson11_serializeDocumentSelfservicePermissions(v.SelfservicePermissions, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentModifyWorkspaceAccessPropertiesInput(v *ModifyWorkspaceAccessPropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.WorkspaceAccessProperties != nil { ok := object.Key("WorkspaceAccessProperties") if err := awsAwsjson11_serializeDocumentWorkspaceAccessProperties(v.WorkspaceAccessProperties, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentModifyWorkspaceCreationPropertiesInput(v *ModifyWorkspaceCreationPropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.WorkspaceCreationProperties != nil { ok := object.Key("WorkspaceCreationProperties") if err := awsAwsjson11_serializeDocumentWorkspaceCreationProperties(v.WorkspaceCreationProperties, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentModifyWorkspacePropertiesInput(v *ModifyWorkspacePropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } if v.WorkspaceProperties != nil { ok := object.Key("WorkspaceProperties") if err := awsAwsjson11_serializeDocumentWorkspaceProperties(v.WorkspaceProperties, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentModifyWorkspaceStateInput(v *ModifyWorkspaceStateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } if len(v.WorkspaceState) > 0 { ok := object.Key("WorkspaceState") ok.String(string(v.WorkspaceState)) } return nil } func awsAwsjson11_serializeOpDocumentRebootWorkspacesInput(v *RebootWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RebootWorkspaceRequests != nil { ok := object.Key("RebootWorkspaceRequests") if err := awsAwsjson11_serializeDocumentRebootWorkspaceRequests(v.RebootWorkspaceRequests, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentRebuildWorkspacesInput(v *RebuildWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RebuildWorkspaceRequests != nil { ok := object.Key("RebuildWorkspaceRequests") if err := awsAwsjson11_serializeDocumentRebuildWorkspaceRequests(v.RebuildWorkspaceRequests, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentRegisterWorkspaceDirectoryInput(v *RegisterWorkspaceDirectoryInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) } if v.EnableSelfService != nil { ok := object.Key("EnableSelfService") ok.Boolean(*v.EnableSelfService) } if v.EnableWorkDocs != nil { ok := object.Key("EnableWorkDocs") ok.Boolean(*v.EnableWorkDocs) } if v.SubnetIds != nil { ok := object.Key("SubnetIds") if err := awsAwsjson11_serializeDocumentSubnetIds(v.SubnetIds, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if len(v.Tenancy) > 0 { ok := object.Key("Tenancy") ok.String(string(v.Tenancy)) } return nil } func awsAwsjson11_serializeOpDocumentRestoreWorkspaceInput(v *RestoreWorkspaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WorkspaceId != nil { ok := object.Key("WorkspaceId") ok.String(*v.WorkspaceId) } return nil } func awsAwsjson11_serializeOpDocumentRevokeIpRulesInput(v *RevokeIpRulesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.UserRules != nil { ok := object.Key("UserRules") if err := awsAwsjson11_serializeDocumentIpRevokedRuleList(v.UserRules, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentStartWorkspacesInput(v *StartWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StartWorkspaceRequests != nil { ok := object.Key("StartWorkspaceRequests") if err := awsAwsjson11_serializeDocumentStartWorkspaceRequests(v.StartWorkspaceRequests, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentStopWorkspacesInput(v *StopWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StopWorkspaceRequests != nil { ok := object.Key("StopWorkspaceRequests") if err := awsAwsjson11_serializeDocumentStopWorkspaceRequests(v.StopWorkspaceRequests, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentTerminateWorkspacesInput(v *TerminateWorkspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.TerminateWorkspaceRequests != nil { ok := object.Key("TerminateWorkspaceRequests") if err := awsAwsjson11_serializeDocumentTerminateWorkspaceRequests(v.TerminateWorkspaceRequests, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateConnectClientAddInInput(v *UpdateConnectClientAddInInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AddInId != nil { ok := object.Key("AddInId") ok.String(*v.AddInId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.URL != nil { ok := object.Key("URL") ok.String(*v.URL) } return nil } func awsAwsjson11_serializeOpDocumentUpdateConnectionAliasPermissionInput(v *UpdateConnectionAliasPermissionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AliasId != nil { ok := object.Key("AliasId") ok.String(*v.AliasId) } if v.ConnectionAliasPermission != nil { ok := object.Key("ConnectionAliasPermission") if err := awsAwsjson11_serializeDocumentConnectionAliasPermission(v.ConnectionAliasPermission, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateRulesOfIpGroupInput(v *UpdateRulesOfIpGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.UserRules != nil { ok := object.Key("UserRules") if err := awsAwsjson11_serializeDocumentIpRuleList(v.UserRules, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateWorkspaceBundleInput(v *UpdateWorkspaceBundleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BundleId != nil { ok := object.Key("BundleId") ok.String(*v.BundleId) } if v.ImageId != nil { ok := object.Key("ImageId") ok.String(*v.ImageId) } return nil } func awsAwsjson11_serializeOpDocumentUpdateWorkspaceImagePermissionInput(v *UpdateWorkspaceImagePermissionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AllowCopyImage != nil { ok := object.Key("AllowCopyImage") ok.Boolean(*v.AllowCopyImage) } if v.ImageId != nil { ok := object.Key("ImageId") ok.String(*v.ImageId) } if v.SharedAccountId != nil { ok := object.Key("SharedAccountId") ok.String(*v.SharedAccountId) } return nil }
5,751
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspaces import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/workspaces/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAssociateConnectionAlias struct { } func (*validateOpAssociateConnectionAlias) ID() string { return "OperationInputValidation" } func (m *validateOpAssociateConnectionAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociateConnectionAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociateConnectionAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAssociateIpGroups struct { } func (*validateOpAssociateIpGroups) ID() string { return "OperationInputValidation" } func (m *validateOpAssociateIpGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociateIpGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociateIpGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAuthorizeIpRules struct { } func (*validateOpAuthorizeIpRules) ID() string { return "OperationInputValidation" } func (m *validateOpAuthorizeIpRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AuthorizeIpRulesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAuthorizeIpRulesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCopyWorkspaceImage struct { } func (*validateOpCopyWorkspaceImage) ID() string { return "OperationInputValidation" } func (m *validateOpCopyWorkspaceImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CopyWorkspaceImageInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCopyWorkspaceImageInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateConnectClientAddIn struct { } func (*validateOpCreateConnectClientAddIn) ID() string { return "OperationInputValidation" } func (m *validateOpCreateConnectClientAddIn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateConnectClientAddInInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateConnectClientAddInInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateConnectionAlias struct { } func (*validateOpCreateConnectionAlias) ID() string { return "OperationInputValidation" } func (m *validateOpCreateConnectionAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateConnectionAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateConnectionAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateIpGroup struct { } func (*validateOpCreateIpGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateIpGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateIpGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateIpGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateStandbyWorkspaces struct { } func (*validateOpCreateStandbyWorkspaces) ID() string { return "OperationInputValidation" } func (m *validateOpCreateStandbyWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateStandbyWorkspacesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateStandbyWorkspacesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateTags struct { } func (*validateOpCreateTags) ID() string { return "OperationInputValidation" } func (m *validateOpCreateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateUpdatedWorkspaceImage struct { } func (*validateOpCreateUpdatedWorkspaceImage) ID() string { return "OperationInputValidation" } func (m *validateOpCreateUpdatedWorkspaceImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateUpdatedWorkspaceImageInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateUpdatedWorkspaceImageInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateWorkspaceBundle struct { } func (*validateOpCreateWorkspaceBundle) ID() string { return "OperationInputValidation" } func (m *validateOpCreateWorkspaceBundle) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateWorkspaceBundleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateWorkspaceBundleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateWorkspaceImage struct { } func (*validateOpCreateWorkspaceImage) ID() string { return "OperationInputValidation" } func (m *validateOpCreateWorkspaceImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateWorkspaceImageInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateWorkspaceImageInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateWorkspaces struct { } func (*validateOpCreateWorkspaces) ID() string { return "OperationInputValidation" } func (m *validateOpCreateWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateWorkspacesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateWorkspacesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteClientBranding struct { } func (*validateOpDeleteClientBranding) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteClientBranding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteClientBrandingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteClientBrandingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteConnectClientAddIn struct { } func (*validateOpDeleteConnectClientAddIn) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteConnectClientAddIn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteConnectClientAddInInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteConnectClientAddInInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteConnectionAlias struct { } func (*validateOpDeleteConnectionAlias) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteConnectionAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteConnectionAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteConnectionAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteIpGroup struct { } func (*validateOpDeleteIpGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteIpGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteIpGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteIpGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteTags struct { } func (*validateOpDeleteTags) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteWorkspaceImage struct { } func (*validateOpDeleteWorkspaceImage) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteWorkspaceImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteWorkspaceImageInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteWorkspaceImageInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeregisterWorkspaceDirectory struct { } func (*validateOpDeregisterWorkspaceDirectory) ID() string { return "OperationInputValidation" } func (m *validateOpDeregisterWorkspaceDirectory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeregisterWorkspaceDirectoryInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeregisterWorkspaceDirectoryInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeClientBranding struct { } func (*validateOpDescribeClientBranding) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeClientBranding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeClientBrandingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeClientBrandingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeClientProperties struct { } func (*validateOpDescribeClientProperties) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeClientProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeClientPropertiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeClientPropertiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeConnectClientAddIns struct { } func (*validateOpDescribeConnectClientAddIns) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeConnectClientAddIns) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeConnectClientAddInsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeConnectClientAddInsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeConnectionAliasPermissions struct { } func (*validateOpDescribeConnectionAliasPermissions) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeConnectionAliasPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeConnectionAliasPermissionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeConnectionAliasPermissionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeTags struct { } func (*validateOpDescribeTags) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeWorkspaceImagePermissions struct { } func (*validateOpDescribeWorkspaceImagePermissions) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeWorkspaceImagePermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeWorkspaceImagePermissionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeWorkspaceImagePermissionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeWorkspaceSnapshots struct { } func (*validateOpDescribeWorkspaceSnapshots) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeWorkspaceSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeWorkspaceSnapshotsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeWorkspaceSnapshotsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDisassociateConnectionAlias struct { } func (*validateOpDisassociateConnectionAlias) ID() string { return "OperationInputValidation" } func (m *validateOpDisassociateConnectionAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DisassociateConnectionAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDisassociateConnectionAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDisassociateIpGroups struct { } func (*validateOpDisassociateIpGroups) ID() string { return "OperationInputValidation" } func (m *validateOpDisassociateIpGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DisassociateIpGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDisassociateIpGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpImportClientBranding struct { } func (*validateOpImportClientBranding) ID() string { return "OperationInputValidation" } func (m *validateOpImportClientBranding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ImportClientBrandingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpImportClientBrandingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpImportWorkspaceImage struct { } func (*validateOpImportWorkspaceImage) ID() string { return "OperationInputValidation" } func (m *validateOpImportWorkspaceImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ImportWorkspaceImageInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpImportWorkspaceImageInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAvailableManagementCidrRanges struct { } func (*validateOpListAvailableManagementCidrRanges) ID() string { return "OperationInputValidation" } func (m *validateOpListAvailableManagementCidrRanges) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAvailableManagementCidrRangesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAvailableManagementCidrRangesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpMigrateWorkspace struct { } func (*validateOpMigrateWorkspace) ID() string { return "OperationInputValidation" } func (m *validateOpMigrateWorkspace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*MigrateWorkspaceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpMigrateWorkspaceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyCertificateBasedAuthProperties struct { } func (*validateOpModifyCertificateBasedAuthProperties) ID() string { return "OperationInputValidation" } func (m *validateOpModifyCertificateBasedAuthProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyCertificateBasedAuthPropertiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyCertificateBasedAuthPropertiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyClientProperties struct { } func (*validateOpModifyClientProperties) ID() string { return "OperationInputValidation" } func (m *validateOpModifyClientProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyClientPropertiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyClientPropertiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifySamlProperties struct { } func (*validateOpModifySamlProperties) ID() string { return "OperationInputValidation" } func (m *validateOpModifySamlProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifySamlPropertiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifySamlPropertiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifySelfservicePermissions struct { } func (*validateOpModifySelfservicePermissions) ID() string { return "OperationInputValidation" } func (m *validateOpModifySelfservicePermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifySelfservicePermissionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifySelfservicePermissionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyWorkspaceAccessProperties struct { } func (*validateOpModifyWorkspaceAccessProperties) ID() string { return "OperationInputValidation" } func (m *validateOpModifyWorkspaceAccessProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyWorkspaceAccessPropertiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyWorkspaceAccessPropertiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyWorkspaceCreationProperties struct { } func (*validateOpModifyWorkspaceCreationProperties) ID() string { return "OperationInputValidation" } func (m *validateOpModifyWorkspaceCreationProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyWorkspaceCreationPropertiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyWorkspaceCreationPropertiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyWorkspaceProperties struct { } func (*validateOpModifyWorkspaceProperties) ID() string { return "OperationInputValidation" } func (m *validateOpModifyWorkspaceProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyWorkspacePropertiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyWorkspacePropertiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyWorkspaceState struct { } func (*validateOpModifyWorkspaceState) ID() string { return "OperationInputValidation" } func (m *validateOpModifyWorkspaceState) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyWorkspaceStateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyWorkspaceStateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRebootWorkspaces struct { } func (*validateOpRebootWorkspaces) ID() string { return "OperationInputValidation" } func (m *validateOpRebootWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RebootWorkspacesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRebootWorkspacesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRebuildWorkspaces struct { } func (*validateOpRebuildWorkspaces) ID() string { return "OperationInputValidation" } func (m *validateOpRebuildWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RebuildWorkspacesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRebuildWorkspacesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRegisterWorkspaceDirectory struct { } func (*validateOpRegisterWorkspaceDirectory) ID() string { return "OperationInputValidation" } func (m *validateOpRegisterWorkspaceDirectory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RegisterWorkspaceDirectoryInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRegisterWorkspaceDirectoryInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRestoreWorkspace struct { } func (*validateOpRestoreWorkspace) ID() string { return "OperationInputValidation" } func (m *validateOpRestoreWorkspace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RestoreWorkspaceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRestoreWorkspaceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRevokeIpRules struct { } func (*validateOpRevokeIpRules) ID() string { return "OperationInputValidation" } func (m *validateOpRevokeIpRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RevokeIpRulesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRevokeIpRulesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartWorkspaces struct { } func (*validateOpStartWorkspaces) ID() string { return "OperationInputValidation" } func (m *validateOpStartWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartWorkspacesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartWorkspacesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStopWorkspaces struct { } func (*validateOpStopWorkspaces) ID() string { return "OperationInputValidation" } func (m *validateOpStopWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StopWorkspacesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStopWorkspacesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTerminateWorkspaces struct { } func (*validateOpTerminateWorkspaces) ID() string { return "OperationInputValidation" } func (m *validateOpTerminateWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TerminateWorkspacesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTerminateWorkspacesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateConnectClientAddIn struct { } func (*validateOpUpdateConnectClientAddIn) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateConnectClientAddIn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateConnectClientAddInInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateConnectClientAddInInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateConnectionAliasPermission struct { } func (*validateOpUpdateConnectionAliasPermission) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateConnectionAliasPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateConnectionAliasPermissionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateConnectionAliasPermissionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRulesOfIpGroup struct { } func (*validateOpUpdateRulesOfIpGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRulesOfIpGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRulesOfIpGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRulesOfIpGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateWorkspaceImagePermission struct { } func (*validateOpUpdateWorkspaceImagePermission) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateWorkspaceImagePermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateWorkspaceImagePermissionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateWorkspaceImagePermissionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAssociateConnectionAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateConnectionAlias{}, middleware.After) } func addOpAssociateIpGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateIpGroups{}, middleware.After) } func addOpAuthorizeIpRulesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAuthorizeIpRules{}, middleware.After) } func addOpCopyWorkspaceImageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCopyWorkspaceImage{}, middleware.After) } func addOpCreateConnectClientAddInValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateConnectClientAddIn{}, middleware.After) } func addOpCreateConnectionAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateConnectionAlias{}, middleware.After) } func addOpCreateIpGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIpGroup{}, middleware.After) } func addOpCreateStandbyWorkspacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateStandbyWorkspaces{}, middleware.After) } func addOpCreateTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTags{}, middleware.After) } func addOpCreateUpdatedWorkspaceImageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateUpdatedWorkspaceImage{}, middleware.After) } func addOpCreateWorkspaceBundleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateWorkspaceBundle{}, middleware.After) } func addOpCreateWorkspaceImageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateWorkspaceImage{}, middleware.After) } func addOpCreateWorkspacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateWorkspaces{}, middleware.After) } func addOpDeleteClientBrandingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteClientBranding{}, middleware.After) } func addOpDeleteConnectClientAddInValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteConnectClientAddIn{}, middleware.After) } func addOpDeleteConnectionAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteConnectionAlias{}, middleware.After) } func addOpDeleteIpGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteIpGroup{}, middleware.After) } func addOpDeleteTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTags{}, middleware.After) } func addOpDeleteWorkspaceImageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteWorkspaceImage{}, middleware.After) } func addOpDeregisterWorkspaceDirectoryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterWorkspaceDirectory{}, middleware.After) } func addOpDescribeClientBrandingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeClientBranding{}, middleware.After) } func addOpDescribeClientPropertiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeClientProperties{}, middleware.After) } func addOpDescribeConnectClientAddInsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeConnectClientAddIns{}, middleware.After) } func addOpDescribeConnectionAliasPermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeConnectionAliasPermissions{}, middleware.After) } func addOpDescribeTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeTags{}, middleware.After) } func addOpDescribeWorkspaceImagePermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeWorkspaceImagePermissions{}, middleware.After) } func addOpDescribeWorkspaceSnapshotsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeWorkspaceSnapshots{}, middleware.After) } func addOpDisassociateConnectionAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateConnectionAlias{}, middleware.After) } func addOpDisassociateIpGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateIpGroups{}, middleware.After) } func addOpImportClientBrandingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpImportClientBranding{}, middleware.After) } func addOpImportWorkspaceImageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpImportWorkspaceImage{}, middleware.After) } func addOpListAvailableManagementCidrRangesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAvailableManagementCidrRanges{}, middleware.After) } func addOpMigrateWorkspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpMigrateWorkspace{}, middleware.After) } func addOpModifyCertificateBasedAuthPropertiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyCertificateBasedAuthProperties{}, middleware.After) } func addOpModifyClientPropertiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyClientProperties{}, middleware.After) } func addOpModifySamlPropertiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifySamlProperties{}, middleware.After) } func addOpModifySelfservicePermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifySelfservicePermissions{}, middleware.After) } func addOpModifyWorkspaceAccessPropertiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyWorkspaceAccessProperties{}, middleware.After) } func addOpModifyWorkspaceCreationPropertiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyWorkspaceCreationProperties{}, middleware.After) } func addOpModifyWorkspacePropertiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyWorkspaceProperties{}, middleware.After) } func addOpModifyWorkspaceStateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyWorkspaceState{}, middleware.After) } func addOpRebootWorkspacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRebootWorkspaces{}, middleware.After) } func addOpRebuildWorkspacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRebuildWorkspaces{}, middleware.After) } func addOpRegisterWorkspaceDirectoryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRegisterWorkspaceDirectory{}, middleware.After) } func addOpRestoreWorkspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRestoreWorkspace{}, middleware.After) } func addOpRevokeIpRulesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRevokeIpRules{}, middleware.After) } func addOpStartWorkspacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartWorkspaces{}, middleware.After) } func addOpStopWorkspacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopWorkspaces{}, middleware.After) } func addOpTerminateWorkspacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTerminateWorkspaces{}, middleware.After) } func addOpUpdateConnectClientAddInValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateConnectClientAddIn{}, middleware.After) } func addOpUpdateConnectionAliasPermissionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateConnectionAliasPermission{}, middleware.After) } func addOpUpdateRulesOfIpGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRulesOfIpGroup{}, middleware.After) } func addOpUpdateWorkspaceImagePermissionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateWorkspaceImagePermission{}, middleware.After) } func validateConnectionAliasPermission(v *types.ConnectionAliasPermission) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ConnectionAliasPermission"} if v.SharedAccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("SharedAccountId")) } if v.AllowAssociation == nil { invalidParams.Add(smithy.NewErrParamRequired("AllowAssociation")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRebootRequest(v *types.RebootRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebootRequest"} if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRebootWorkspaceRequests(v []types.RebootRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebootWorkspaceRequests"} for i := range v { if err := validateRebootRequest(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRebuildRequest(v *types.RebuildRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebuildRequest"} if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRebuildWorkspaceRequests(v []types.RebuildRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebuildWorkspaceRequests"} for i := range v { if err := validateRebuildRequest(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStandbyWorkspace(v *types.StandbyWorkspace) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StandbyWorkspace"} if v.PrimaryWorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("PrimaryWorkspaceId")) } if v.DirectoryId == nil { invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) } 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 validateStandbyWorkspacesList(v []types.StandbyWorkspace) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StandbyWorkspacesList"} for i := range v { if err := validateStandbyWorkspace(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } 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 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 validateTerminateRequest(v *types.TerminateRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TerminateRequest"} if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTerminateWorkspaceRequests(v []types.TerminateRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TerminateWorkspaceRequests"} for i := range v { if err := validateTerminateRequest(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateWorkspaceRequest(v *types.WorkspaceRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WorkspaceRequest"} if v.DirectoryId == nil { invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) } if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.BundleId == nil { invalidParams.Add(smithy.NewErrParamRequired("BundleId")) } 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 validateWorkspaceRequestList(v []types.WorkspaceRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WorkspaceRequestList"} for i := range v { if err := validateWorkspaceRequest(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociateConnectionAliasInput(v *AssociateConnectionAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateConnectionAliasInput"} if v.AliasId == nil { invalidParams.Add(smithy.NewErrParamRequired("AliasId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociateIpGroupsInput(v *AssociateIpGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateIpGroupsInput"} if v.DirectoryId == nil { invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) } if v.GroupIds == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAuthorizeIpRulesInput(v *AuthorizeIpRulesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AuthorizeIpRulesInput"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.UserRules == nil { invalidParams.Add(smithy.NewErrParamRequired("UserRules")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCopyWorkspaceImageInput(v *CopyWorkspaceImageInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CopyWorkspaceImageInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.SourceImageId == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceImageId")) } if v.SourceRegion == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceRegion")) } 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 validateOpCreateConnectClientAddInInput(v *CreateConnectClientAddInInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateConnectClientAddInInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.URL == nil { invalidParams.Add(smithy.NewErrParamRequired("URL")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateConnectionAliasInput(v *CreateConnectionAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateConnectionAliasInput"} if v.ConnectionString == nil { invalidParams.Add(smithy.NewErrParamRequired("ConnectionString")) } 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 validateOpCreateIpGroupInput(v *CreateIpGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateIpGroupInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } 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 validateOpCreateStandbyWorkspacesInput(v *CreateStandbyWorkspacesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateStandbyWorkspacesInput"} if v.PrimaryRegion == nil { invalidParams.Add(smithy.NewErrParamRequired("PrimaryRegion")) } if v.StandbyWorkspaces == nil { invalidParams.Add(smithy.NewErrParamRequired("StandbyWorkspaces")) } else if v.StandbyWorkspaces != nil { if err := validateStandbyWorkspacesList(v.StandbyWorkspaces); err != nil { invalidParams.AddNested("StandbyWorkspaces", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateTagsInput(v *CreateTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateTagsInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } 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 validateOpCreateUpdatedWorkspaceImageInput(v *CreateUpdatedWorkspaceImageInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateUpdatedWorkspaceImageInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.Description == nil { invalidParams.Add(smithy.NewErrParamRequired("Description")) } if v.SourceImageId == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceImageId")) } 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 validateOpCreateWorkspaceBundleInput(v *CreateWorkspaceBundleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateWorkspaceBundleInput"} if v.BundleName == nil { invalidParams.Add(smithy.NewErrParamRequired("BundleName")) } if v.BundleDescription == nil { invalidParams.Add(smithy.NewErrParamRequired("BundleDescription")) } if v.ImageId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImageId")) } if v.ComputeType == nil { invalidParams.Add(smithy.NewErrParamRequired("ComputeType")) } if v.UserStorage == nil { invalidParams.Add(smithy.NewErrParamRequired("UserStorage")) } 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 validateOpCreateWorkspaceImageInput(v *CreateWorkspaceImageInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateWorkspaceImageInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.Description == nil { invalidParams.Add(smithy.NewErrParamRequired("Description")) } if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } 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 validateOpCreateWorkspacesInput(v *CreateWorkspacesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateWorkspacesInput"} if v.Workspaces == nil { invalidParams.Add(smithy.NewErrParamRequired("Workspaces")) } else if v.Workspaces != nil { if err := validateWorkspaceRequestList(v.Workspaces); err != nil { invalidParams.AddNested("Workspaces", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteClientBrandingInput(v *DeleteClientBrandingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteClientBrandingInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.Platforms == nil { invalidParams.Add(smithy.NewErrParamRequired("Platforms")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteConnectClientAddInInput(v *DeleteConnectClientAddInInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteConnectClientAddInInput"} if v.AddInId == nil { invalidParams.Add(smithy.NewErrParamRequired("AddInId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteConnectionAliasInput(v *DeleteConnectionAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteConnectionAliasInput"} if v.AliasId == nil { invalidParams.Add(smithy.NewErrParamRequired("AliasId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteIpGroupInput(v *DeleteIpGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteIpGroupInput"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteTagsInput(v *DeleteTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteTagsInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteWorkspaceImageInput(v *DeleteWorkspaceImageInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteWorkspaceImageInput"} if v.ImageId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImageId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeregisterWorkspaceDirectoryInput(v *DeregisterWorkspaceDirectoryInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeregisterWorkspaceDirectoryInput"} if v.DirectoryId == nil { invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeClientBrandingInput(v *DescribeClientBrandingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeClientBrandingInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeClientPropertiesInput(v *DescribeClientPropertiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeClientPropertiesInput"} if v.ResourceIds == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeConnectClientAddInsInput(v *DescribeConnectClientAddInsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeConnectClientAddInsInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeConnectionAliasPermissionsInput(v *DescribeConnectionAliasPermissionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeConnectionAliasPermissionsInput"} if v.AliasId == nil { invalidParams.Add(smithy.NewErrParamRequired("AliasId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeTagsInput(v *DescribeTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeTagsInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeWorkspaceImagePermissionsInput(v *DescribeWorkspaceImagePermissionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeWorkspaceImagePermissionsInput"} if v.ImageId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImageId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeWorkspaceSnapshotsInput(v *DescribeWorkspaceSnapshotsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeWorkspaceSnapshotsInput"} if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDisassociateConnectionAliasInput(v *DisassociateConnectionAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateConnectionAliasInput"} if v.AliasId == nil { invalidParams.Add(smithy.NewErrParamRequired("AliasId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDisassociateIpGroupsInput(v *DisassociateIpGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateIpGroupsInput"} if v.DirectoryId == nil { invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) } if v.GroupIds == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpImportClientBrandingInput(v *ImportClientBrandingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ImportClientBrandingInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpImportWorkspaceImageInput(v *ImportWorkspaceImageInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ImportWorkspaceImageInput"} if v.Ec2ImageId == nil { invalidParams.Add(smithy.NewErrParamRequired("Ec2ImageId")) } if len(v.IngestionProcess) == 0 { invalidParams.Add(smithy.NewErrParamRequired("IngestionProcess")) } if v.ImageName == nil { invalidParams.Add(smithy.NewErrParamRequired("ImageName")) } if v.ImageDescription == nil { invalidParams.Add(smithy.NewErrParamRequired("ImageDescription")) } 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 validateOpListAvailableManagementCidrRangesInput(v *ListAvailableManagementCidrRangesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAvailableManagementCidrRangesInput"} if v.ManagementCidrRangeConstraint == nil { invalidParams.Add(smithy.NewErrParamRequired("ManagementCidrRangeConstraint")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpMigrateWorkspaceInput(v *MigrateWorkspaceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MigrateWorkspaceInput"} if v.SourceWorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceWorkspaceId")) } if v.BundleId == nil { invalidParams.Add(smithy.NewErrParamRequired("BundleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyCertificateBasedAuthPropertiesInput(v *ModifyCertificateBasedAuthPropertiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyCertificateBasedAuthPropertiesInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyClientPropertiesInput(v *ModifyClientPropertiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyClientPropertiesInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.ClientProperties == nil { invalidParams.Add(smithy.NewErrParamRequired("ClientProperties")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifySamlPropertiesInput(v *ModifySamlPropertiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifySamlPropertiesInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifySelfservicePermissionsInput(v *ModifySelfservicePermissionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifySelfservicePermissionsInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.SelfservicePermissions == nil { invalidParams.Add(smithy.NewErrParamRequired("SelfservicePermissions")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyWorkspaceAccessPropertiesInput(v *ModifyWorkspaceAccessPropertiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyWorkspaceAccessPropertiesInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.WorkspaceAccessProperties == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceAccessProperties")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyWorkspaceCreationPropertiesInput(v *ModifyWorkspaceCreationPropertiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyWorkspaceCreationPropertiesInput"} if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.WorkspaceCreationProperties == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceCreationProperties")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyWorkspacePropertiesInput(v *ModifyWorkspacePropertiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyWorkspacePropertiesInput"} if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } if v.WorkspaceProperties == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceProperties")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyWorkspaceStateInput(v *ModifyWorkspaceStateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyWorkspaceStateInput"} if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } if len(v.WorkspaceState) == 0 { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceState")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRebootWorkspacesInput(v *RebootWorkspacesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebootWorkspacesInput"} if v.RebootWorkspaceRequests == nil { invalidParams.Add(smithy.NewErrParamRequired("RebootWorkspaceRequests")) } else if v.RebootWorkspaceRequests != nil { if err := validateRebootWorkspaceRequests(v.RebootWorkspaceRequests); err != nil { invalidParams.AddNested("RebootWorkspaceRequests", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRebuildWorkspacesInput(v *RebuildWorkspacesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebuildWorkspacesInput"} if v.RebuildWorkspaceRequests == nil { invalidParams.Add(smithy.NewErrParamRequired("RebuildWorkspaceRequests")) } else if v.RebuildWorkspaceRequests != nil { if err := validateRebuildWorkspaceRequests(v.RebuildWorkspaceRequests); err != nil { invalidParams.AddNested("RebuildWorkspaceRequests", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRegisterWorkspaceDirectoryInput(v *RegisterWorkspaceDirectoryInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegisterWorkspaceDirectoryInput"} if v.DirectoryId == nil { invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) } if v.EnableWorkDocs == nil { invalidParams.Add(smithy.NewErrParamRequired("EnableWorkDocs")) } 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 validateOpRestoreWorkspaceInput(v *RestoreWorkspaceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RestoreWorkspaceInput"} if v.WorkspaceId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRevokeIpRulesInput(v *RevokeIpRulesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RevokeIpRulesInput"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.UserRules == nil { invalidParams.Add(smithy.NewErrParamRequired("UserRules")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartWorkspacesInput(v *StartWorkspacesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartWorkspacesInput"} if v.StartWorkspaceRequests == nil { invalidParams.Add(smithy.NewErrParamRequired("StartWorkspaceRequests")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStopWorkspacesInput(v *StopWorkspacesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StopWorkspacesInput"} if v.StopWorkspaceRequests == nil { invalidParams.Add(smithy.NewErrParamRequired("StopWorkspaceRequests")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTerminateWorkspacesInput(v *TerminateWorkspacesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TerminateWorkspacesInput"} if v.TerminateWorkspaceRequests == nil { invalidParams.Add(smithy.NewErrParamRequired("TerminateWorkspaceRequests")) } else if v.TerminateWorkspaceRequests != nil { if err := validateTerminateWorkspaceRequests(v.TerminateWorkspaceRequests); err != nil { invalidParams.AddNested("TerminateWorkspaceRequests", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateConnectClientAddInInput(v *UpdateConnectClientAddInInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateConnectClientAddInInput"} if v.AddInId == nil { invalidParams.Add(smithy.NewErrParamRequired("AddInId")) } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateConnectionAliasPermissionInput(v *UpdateConnectionAliasPermissionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateConnectionAliasPermissionInput"} if v.AliasId == nil { invalidParams.Add(smithy.NewErrParamRequired("AliasId")) } if v.ConnectionAliasPermission == nil { invalidParams.Add(smithy.NewErrParamRequired("ConnectionAliasPermission")) } else if v.ConnectionAliasPermission != nil { if err := validateConnectionAliasPermission(v.ConnectionAliasPermission); err != nil { invalidParams.AddNested("ConnectionAliasPermission", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRulesOfIpGroupInput(v *UpdateRulesOfIpGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRulesOfIpGroupInput"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.UserRules == nil { invalidParams.Add(smithy.NewErrParamRequired("UserRules")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateWorkspaceImagePermissionInput(v *UpdateWorkspaceImagePermissionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateWorkspaceImagePermissionInput"} if v.ImageId == nil { invalidParams.Add(smithy.NewErrParamRequired("ImageId")) } if v.AllowCopyImage == nil { invalidParams.Add(smithy.NewErrParamRequired("AllowCopyImage")) } if v.SharedAccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("SharedAccountId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
2,490
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 WorkSpaces 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: "workspaces.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workspaces-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workspaces.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ Hostname: "workspaces-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-west-2", }: endpoints.Endpoint{ Hostname: "workspaces-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.us-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.us-west-2.amazonaws.com", }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "workspaces.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workspaces-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workspaces.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "cn-northwest-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workspaces.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-iso-west-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workspaces.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workspaces.{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: "workspaces-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workspaces.{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: "workspaces.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "workspaces-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "workspaces.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "fips-us-gov-east-1", }: endpoints.Endpoint{ Hostname: "workspaces-fips.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-gov-west-1", }: endpoints.Endpoint{ Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.us-gov-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com", }, }, }, }
424
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 AccessPropertyValue string // Enum values for AccessPropertyValue const ( AccessPropertyValueAllow AccessPropertyValue = "ALLOW" AccessPropertyValueDeny AccessPropertyValue = "DENY" ) // Values returns all known values for AccessPropertyValue. 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 (AccessPropertyValue) Values() []AccessPropertyValue { return []AccessPropertyValue{ "ALLOW", "DENY", } } type Application string // Enum values for Application const ( ApplicationMicrosoftOffice2016 Application = "Microsoft_Office_2016" ApplicationMicrosoftOffice2019 Application = "Microsoft_Office_2019" ) // Values returns all known values for Application. 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 (Application) Values() []Application { return []Application{ "Microsoft_Office_2016", "Microsoft_Office_2019", } } type AssociationStatus string // Enum values for AssociationStatus const ( AssociationStatusNotAssociated AssociationStatus = "NOT_ASSOCIATED" AssociationStatusAssociatedWithOwnerAccount AssociationStatus = "ASSOCIATED_WITH_OWNER_ACCOUNT" AssociationStatusAssociatedWithSharedAccount AssociationStatus = "ASSOCIATED_WITH_SHARED_ACCOUNT" AssociationStatusPendingAssociation AssociationStatus = "PENDING_ASSOCIATION" AssociationStatusPendingDisassociation AssociationStatus = "PENDING_DISASSOCIATION" ) // Values returns all known values for AssociationStatus. 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 (AssociationStatus) Values() []AssociationStatus { return []AssociationStatus{ "NOT_ASSOCIATED", "ASSOCIATED_WITH_OWNER_ACCOUNT", "ASSOCIATED_WITH_SHARED_ACCOUNT", "PENDING_ASSOCIATION", "PENDING_DISASSOCIATION", } } type BundleType string // Enum values for BundleType const ( BundleTypeRegular BundleType = "REGULAR" BundleTypeStandby BundleType = "STANDBY" ) // Values returns all known values for BundleType. 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 (BundleType) Values() []BundleType { return []BundleType{ "REGULAR", "STANDBY", } } type CertificateBasedAuthStatusEnum string // Enum values for CertificateBasedAuthStatusEnum const ( CertificateBasedAuthStatusEnumDisabled CertificateBasedAuthStatusEnum = "DISABLED" CertificateBasedAuthStatusEnumEnabled CertificateBasedAuthStatusEnum = "ENABLED" ) // Values returns all known values for CertificateBasedAuthStatusEnum. 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 (CertificateBasedAuthStatusEnum) Values() []CertificateBasedAuthStatusEnum { return []CertificateBasedAuthStatusEnum{ "DISABLED", "ENABLED", } } type ClientDeviceType string // Enum values for ClientDeviceType const ( ClientDeviceTypeDeviceTypeWindows ClientDeviceType = "DeviceTypeWindows" ClientDeviceTypeDeviceTypeOsx ClientDeviceType = "DeviceTypeOsx" ClientDeviceTypeDeviceTypeAndroid ClientDeviceType = "DeviceTypeAndroid" ClientDeviceTypeDeviceTypeIos ClientDeviceType = "DeviceTypeIos" ClientDeviceTypeDeviceTypeLinux ClientDeviceType = "DeviceTypeLinux" ClientDeviceTypeDeviceTypeWeb ClientDeviceType = "DeviceTypeWeb" ) // Values returns all known values for ClientDeviceType. 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 (ClientDeviceType) Values() []ClientDeviceType { return []ClientDeviceType{ "DeviceTypeWindows", "DeviceTypeOsx", "DeviceTypeAndroid", "DeviceTypeIos", "DeviceTypeLinux", "DeviceTypeWeb", } } type Compute string // Enum values for Compute const ( ComputeValue Compute = "VALUE" ComputeStandard Compute = "STANDARD" ComputePerformance Compute = "PERFORMANCE" ComputePower Compute = "POWER" ComputeGraphics Compute = "GRAPHICS" ComputePowerpro Compute = "POWERPRO" ComputeGraphicspro Compute = "GRAPHICSPRO" ComputeGraphicsG4dn Compute = "GRAPHICS_G4DN" ComputeGraphicsproG4dn Compute = "GRAPHICSPRO_G4DN" ) // Values returns all known values for Compute. 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 (Compute) Values() []Compute { return []Compute{ "VALUE", "STANDARD", "PERFORMANCE", "POWER", "GRAPHICS", "POWERPRO", "GRAPHICSPRO", "GRAPHICS_G4DN", "GRAPHICSPRO_G4DN", } } type ConnectionAliasState string // Enum values for ConnectionAliasState const ( ConnectionAliasStateCreating ConnectionAliasState = "CREATING" ConnectionAliasStateCreated ConnectionAliasState = "CREATED" ConnectionAliasStateDeleting ConnectionAliasState = "DELETING" ) // Values returns all known values for ConnectionAliasState. 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 (ConnectionAliasState) Values() []ConnectionAliasState { return []ConnectionAliasState{ "CREATING", "CREATED", "DELETING", } } type ConnectionState string // Enum values for ConnectionState const ( ConnectionStateConnected ConnectionState = "CONNECTED" ConnectionStateDisconnected ConnectionState = "DISCONNECTED" ConnectionStateUnknown ConnectionState = "UNKNOWN" ) // Values returns all known values for ConnectionState. 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 (ConnectionState) Values() []ConnectionState { return []ConnectionState{ "CONNECTED", "DISCONNECTED", "UNKNOWN", } } type DedicatedTenancyModificationStateEnum string // Enum values for DedicatedTenancyModificationStateEnum const ( DedicatedTenancyModificationStateEnumPending DedicatedTenancyModificationStateEnum = "PENDING" DedicatedTenancyModificationStateEnumCompleted DedicatedTenancyModificationStateEnum = "COMPLETED" DedicatedTenancyModificationStateEnumFailed DedicatedTenancyModificationStateEnum = "FAILED" ) // Values returns all known values for DedicatedTenancyModificationStateEnum. 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 (DedicatedTenancyModificationStateEnum) Values() []DedicatedTenancyModificationStateEnum { return []DedicatedTenancyModificationStateEnum{ "PENDING", "COMPLETED", "FAILED", } } type DedicatedTenancySupportEnum string // Enum values for DedicatedTenancySupportEnum const ( DedicatedTenancySupportEnumEnabled DedicatedTenancySupportEnum = "ENABLED" ) // Values returns all known values for DedicatedTenancySupportEnum. 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 (DedicatedTenancySupportEnum) Values() []DedicatedTenancySupportEnum { return []DedicatedTenancySupportEnum{ "ENABLED", } } type DedicatedTenancySupportResultEnum string // Enum values for DedicatedTenancySupportResultEnum const ( DedicatedTenancySupportResultEnumEnabled DedicatedTenancySupportResultEnum = "ENABLED" DedicatedTenancySupportResultEnumDisabled DedicatedTenancySupportResultEnum = "DISABLED" ) // Values returns all known values for DedicatedTenancySupportResultEnum. 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 (DedicatedTenancySupportResultEnum) Values() []DedicatedTenancySupportResultEnum { return []DedicatedTenancySupportResultEnum{ "ENABLED", "DISABLED", } } type DeletableCertificateBasedAuthProperty string // Enum values for DeletableCertificateBasedAuthProperty const ( DeletableCertificateBasedAuthPropertyCertificateBasedAuthPropertiesCertificateAuthorityArn DeletableCertificateBasedAuthProperty = "CERTIFICATE_BASED_AUTH_PROPERTIES_CERTIFICATE_AUTHORITY_ARN" ) // Values returns all known values for DeletableCertificateBasedAuthProperty. 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 (DeletableCertificateBasedAuthProperty) Values() []DeletableCertificateBasedAuthProperty { return []DeletableCertificateBasedAuthProperty{ "CERTIFICATE_BASED_AUTH_PROPERTIES_CERTIFICATE_AUTHORITY_ARN", } } type DeletableSamlProperty string // Enum values for DeletableSamlProperty const ( DeletableSamlPropertySamlPropertiesUserAccessUrl DeletableSamlProperty = "SAML_PROPERTIES_USER_ACCESS_URL" DeletableSamlPropertySamlPropertiesRelayStateParameterName DeletableSamlProperty = "SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME" ) // Values returns all known values for DeletableSamlProperty. 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 (DeletableSamlProperty) Values() []DeletableSamlProperty { return []DeletableSamlProperty{ "SAML_PROPERTIES_USER_ACCESS_URL", "SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME", } } type ImageType string // Enum values for ImageType const ( ImageTypeOwned ImageType = "OWNED" ImageTypeShared ImageType = "SHARED" ) // Values returns all known values for ImageType. 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 (ImageType) Values() []ImageType { return []ImageType{ "OWNED", "SHARED", } } type LogUploadEnum string // Enum values for LogUploadEnum const ( LogUploadEnumEnabled LogUploadEnum = "ENABLED" LogUploadEnumDisabled LogUploadEnum = "DISABLED" ) // Values returns all known values for LogUploadEnum. 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 (LogUploadEnum) Values() []LogUploadEnum { return []LogUploadEnum{ "ENABLED", "DISABLED", } } type ModificationResourceEnum string // Enum values for ModificationResourceEnum const ( ModificationResourceEnumRootVolume ModificationResourceEnum = "ROOT_VOLUME" ModificationResourceEnumUserVolume ModificationResourceEnum = "USER_VOLUME" ModificationResourceEnumComputeType ModificationResourceEnum = "COMPUTE_TYPE" ) // Values returns all known values for ModificationResourceEnum. 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 (ModificationResourceEnum) Values() []ModificationResourceEnum { return []ModificationResourceEnum{ "ROOT_VOLUME", "USER_VOLUME", "COMPUTE_TYPE", } } type ModificationStateEnum string // Enum values for ModificationStateEnum const ( ModificationStateEnumUpdateInitiated ModificationStateEnum = "UPDATE_INITIATED" ModificationStateEnumUpdateInProgress ModificationStateEnum = "UPDATE_IN_PROGRESS" ) // Values returns all known values for ModificationStateEnum. 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 (ModificationStateEnum) Values() []ModificationStateEnum { return []ModificationStateEnum{ "UPDATE_INITIATED", "UPDATE_IN_PROGRESS", } } type OperatingSystemType string // Enum values for OperatingSystemType const ( OperatingSystemTypeWindows OperatingSystemType = "WINDOWS" OperatingSystemTypeLinux OperatingSystemType = "LINUX" ) // Values returns all known values for OperatingSystemType. 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 (OperatingSystemType) Values() []OperatingSystemType { return []OperatingSystemType{ "WINDOWS", "LINUX", } } type Protocol string // Enum values for Protocol const ( ProtocolPcoip Protocol = "PCOIP" ProtocolWsp Protocol = "WSP" ) // Values returns all known values for Protocol. 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 (Protocol) Values() []Protocol { return []Protocol{ "PCOIP", "WSP", } } type ReconnectEnum string // Enum values for ReconnectEnum const ( ReconnectEnumEnabled ReconnectEnum = "ENABLED" ReconnectEnumDisabled ReconnectEnum = "DISABLED" ) // Values returns all known values for ReconnectEnum. 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 (ReconnectEnum) Values() []ReconnectEnum { return []ReconnectEnum{ "ENABLED", "DISABLED", } } type RunningMode string // Enum values for RunningMode const ( RunningModeAutoStop RunningMode = "AUTO_STOP" RunningModeAlwaysOn RunningMode = "ALWAYS_ON" RunningModeManual RunningMode = "MANUAL" ) // Values returns all known values for RunningMode. 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 (RunningMode) Values() []RunningMode { return []RunningMode{ "AUTO_STOP", "ALWAYS_ON", "MANUAL", } } type SamlStatusEnum string // Enum values for SamlStatusEnum const ( SamlStatusEnumDisabled SamlStatusEnum = "DISABLED" SamlStatusEnumEnabled SamlStatusEnum = "ENABLED" SamlStatusEnumEnabledWithDirectoryLoginFallback SamlStatusEnum = "ENABLED_WITH_DIRECTORY_LOGIN_FALLBACK" ) // Values returns all known values for SamlStatusEnum. 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 (SamlStatusEnum) Values() []SamlStatusEnum { return []SamlStatusEnum{ "DISABLED", "ENABLED", "ENABLED_WITH_DIRECTORY_LOGIN_FALLBACK", } } type StandbyWorkspaceRelationshipType string // Enum values for StandbyWorkspaceRelationshipType const ( StandbyWorkspaceRelationshipTypePrimary StandbyWorkspaceRelationshipType = "PRIMARY" StandbyWorkspaceRelationshipTypeStandby StandbyWorkspaceRelationshipType = "STANDBY" ) // Values returns all known values for StandbyWorkspaceRelationshipType. 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 (StandbyWorkspaceRelationshipType) Values() []StandbyWorkspaceRelationshipType { return []StandbyWorkspaceRelationshipType{ "PRIMARY", "STANDBY", } } type TargetWorkspaceState string // Enum values for TargetWorkspaceState const ( TargetWorkspaceStateAvailable TargetWorkspaceState = "AVAILABLE" TargetWorkspaceStateAdminMaintenance TargetWorkspaceState = "ADMIN_MAINTENANCE" ) // Values returns all known values for TargetWorkspaceState. 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 (TargetWorkspaceState) Values() []TargetWorkspaceState { return []TargetWorkspaceState{ "AVAILABLE", "ADMIN_MAINTENANCE", } } type Tenancy string // Enum values for Tenancy const ( TenancyDedicated Tenancy = "DEDICATED" TenancyShared Tenancy = "SHARED" ) // Values returns all known values for Tenancy. 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 (Tenancy) Values() []Tenancy { return []Tenancy{ "DEDICATED", "SHARED", } } type WorkspaceBundleState string // Enum values for WorkspaceBundleState const ( WorkspaceBundleStateAvailable WorkspaceBundleState = "AVAILABLE" WorkspaceBundleStatePending WorkspaceBundleState = "PENDING" WorkspaceBundleStateError WorkspaceBundleState = "ERROR" ) // Values returns all known values for WorkspaceBundleState. 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 (WorkspaceBundleState) Values() []WorkspaceBundleState { return []WorkspaceBundleState{ "AVAILABLE", "PENDING", "ERROR", } } type WorkspaceDirectoryState string // Enum values for WorkspaceDirectoryState const ( WorkspaceDirectoryStateRegistering WorkspaceDirectoryState = "REGISTERING" WorkspaceDirectoryStateRegistered WorkspaceDirectoryState = "REGISTERED" WorkspaceDirectoryStateDeregistering WorkspaceDirectoryState = "DEREGISTERING" WorkspaceDirectoryStateDeregistered WorkspaceDirectoryState = "DEREGISTERED" WorkspaceDirectoryStateError WorkspaceDirectoryState = "ERROR" ) // Values returns all known values for WorkspaceDirectoryState. 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 (WorkspaceDirectoryState) Values() []WorkspaceDirectoryState { return []WorkspaceDirectoryState{ "REGISTERING", "REGISTERED", "DEREGISTERING", "DEREGISTERED", "ERROR", } } type WorkspaceDirectoryType string // Enum values for WorkspaceDirectoryType const ( WorkspaceDirectoryTypeSimpleAd WorkspaceDirectoryType = "SIMPLE_AD" WorkspaceDirectoryTypeAdConnector WorkspaceDirectoryType = "AD_CONNECTOR" ) // Values returns all known values for WorkspaceDirectoryType. 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 (WorkspaceDirectoryType) Values() []WorkspaceDirectoryType { return []WorkspaceDirectoryType{ "SIMPLE_AD", "AD_CONNECTOR", } } type WorkspaceImageIngestionProcess string // Enum values for WorkspaceImageIngestionProcess const ( WorkspaceImageIngestionProcessByolRegular WorkspaceImageIngestionProcess = "BYOL_REGULAR" WorkspaceImageIngestionProcessByolGraphics WorkspaceImageIngestionProcess = "BYOL_GRAPHICS" WorkspaceImageIngestionProcessByolGraphicspro WorkspaceImageIngestionProcess = "BYOL_GRAPHICSPRO" WorkspaceImageIngestionProcessByolGraphicsG4dn WorkspaceImageIngestionProcess = "BYOL_GRAPHICS_G4DN" WorkspaceImageIngestionProcessByolRegularWsp WorkspaceImageIngestionProcess = "BYOL_REGULAR_WSP" WorkspaceImageIngestionProcessByolRegularByop WorkspaceImageIngestionProcess = "BYOL_REGULAR_BYOP" WorkspaceImageIngestionProcessByolGraphicsG4dnByop WorkspaceImageIngestionProcess = "BYOL_GRAPHICS_G4DN_BYOP" ) // Values returns all known values for WorkspaceImageIngestionProcess. 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 (WorkspaceImageIngestionProcess) Values() []WorkspaceImageIngestionProcess { return []WorkspaceImageIngestionProcess{ "BYOL_REGULAR", "BYOL_GRAPHICS", "BYOL_GRAPHICSPRO", "BYOL_GRAPHICS_G4DN", "BYOL_REGULAR_WSP", "BYOL_REGULAR_BYOP", "BYOL_GRAPHICS_G4DN_BYOP", } } type WorkspaceImageRequiredTenancy string // Enum values for WorkspaceImageRequiredTenancy const ( WorkspaceImageRequiredTenancyDefault WorkspaceImageRequiredTenancy = "DEFAULT" WorkspaceImageRequiredTenancyDedicated WorkspaceImageRequiredTenancy = "DEDICATED" ) // Values returns all known values for WorkspaceImageRequiredTenancy. 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 (WorkspaceImageRequiredTenancy) Values() []WorkspaceImageRequiredTenancy { return []WorkspaceImageRequiredTenancy{ "DEFAULT", "DEDICATED", } } type WorkspaceImageState string // Enum values for WorkspaceImageState const ( WorkspaceImageStateAvailable WorkspaceImageState = "AVAILABLE" WorkspaceImageStatePending WorkspaceImageState = "PENDING" WorkspaceImageStateError WorkspaceImageState = "ERROR" ) // Values returns all known values for WorkspaceImageState. 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 (WorkspaceImageState) Values() []WorkspaceImageState { return []WorkspaceImageState{ "AVAILABLE", "PENDING", "ERROR", } } type WorkspaceState string // Enum values for WorkspaceState const ( WorkspaceStatePending WorkspaceState = "PENDING" WorkspaceStateAvailable WorkspaceState = "AVAILABLE" WorkspaceStateImpaired WorkspaceState = "IMPAIRED" WorkspaceStateUnhealthy WorkspaceState = "UNHEALTHY" WorkspaceStateRebooting WorkspaceState = "REBOOTING" WorkspaceStateStarting WorkspaceState = "STARTING" WorkspaceStateRebuilding WorkspaceState = "REBUILDING" WorkspaceStateRestoring WorkspaceState = "RESTORING" WorkspaceStateMaintenance WorkspaceState = "MAINTENANCE" WorkspaceStateAdminMaintenance WorkspaceState = "ADMIN_MAINTENANCE" WorkspaceStateTerminating WorkspaceState = "TERMINATING" WorkspaceStateTerminated WorkspaceState = "TERMINATED" WorkspaceStateSuspended WorkspaceState = "SUSPENDED" WorkspaceStateUpdating WorkspaceState = "UPDATING" WorkspaceStateStopping WorkspaceState = "STOPPING" WorkspaceStateStopped WorkspaceState = "STOPPED" WorkspaceStateError WorkspaceState = "ERROR" ) // Values returns all known values for WorkspaceState. 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 (WorkspaceState) Values() []WorkspaceState { return []WorkspaceState{ "PENDING", "AVAILABLE", "IMPAIRED", "UNHEALTHY", "REBOOTING", "STARTING", "REBUILDING", "RESTORING", "MAINTENANCE", "ADMIN_MAINTENANCE", "TERMINATING", "TERMINATED", "SUSPENDED", "UPDATING", "STOPPING", "STOPPED", "ERROR", } }
691
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 user is not authorized to access a resource. type AccessDeniedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // One or more parameter values are not valid. type InvalidParameterValuesException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidParameterValuesException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidParameterValuesException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidParameterValuesException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidParameterValuesException" } return *e.ErrorCodeOverride } func (e *InvalidParameterValuesException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The state of the resource is not valid for this operation. type InvalidResourceStateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidResourceStateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidResourceStateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidResourceStateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidResourceStateException" } return *e.ErrorCodeOverride } func (e *InvalidResourceStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The properties of this WorkSpace are currently being modified. Try again in a // moment. type OperationInProgressException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *OperationInProgressException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *OperationInProgressException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *OperationInProgressException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "OperationInProgressException" } return *e.ErrorCodeOverride } func (e *OperationInProgressException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // This operation is not supported. type OperationNotSupportedException struct { Message *string ErrorCodeOverride *string Reason *string noSmithyDocumentSerde } func (e *OperationNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *OperationNotSupportedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *OperationNotSupportedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "OperationNotSupportedException" } return *e.ErrorCodeOverride } func (e *OperationNotSupportedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified 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 resource is associated with a directory. type ResourceAssociatedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceAssociatedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceAssociatedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceAssociatedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceAssociatedException" } return *e.ErrorCodeOverride } func (e *ResourceAssociatedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource could not be created. type ResourceCreationFailedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceCreationFailedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceCreationFailedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceCreationFailedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceCreationFailedException" } return *e.ErrorCodeOverride } func (e *ResourceCreationFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Your resource limits have been exceeded. type ResourceLimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceLimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceLimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceLimitExceededException" } return *e.ErrorCodeOverride } func (e *ResourceLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource could not be found. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string ResourceId *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 specified resource is not available. type ResourceUnavailableException struct { Message *string ErrorCodeOverride *string ResourceId *string noSmithyDocumentSerde } func (e *ResourceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceUnavailableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceUnavailableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceUnavailableException" } return *e.ErrorCodeOverride } func (e *ResourceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The configuration of this network is not supported for this operation, or your // network configuration conflicts with the Amazon WorkSpaces management network IP // range. For more information, see Configure a VPC for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-vpc.html) // . type UnsupportedNetworkConfigurationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnsupportedNetworkConfigurationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnsupportedNetworkConfigurationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnsupportedNetworkConfigurationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnsupportedNetworkConfigurationException" } return *e.ErrorCodeOverride } func (e *UnsupportedNetworkConfigurationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The configuration of this WorkSpace is not supported for this operation. For // more information, see Required Configuration and Service Components for // WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/required-service-components.html) // . type UnsupportedWorkspaceConfigurationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnsupportedWorkspaceConfigurationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnsupportedWorkspaceConfigurationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnsupportedWorkspaceConfigurationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnsupportedWorkspaceConfigurationException" } return *e.ErrorCodeOverride } func (e *UnsupportedWorkspaceConfigurationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The workspaces_DefaultRole role could not be found. If this is the first time // you are registering a directory, you will need to create the // workspaces_DefaultRole role before you can register a directory. For more // information, see Creating the workspaces_DefaultRole Role (https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html#create-default-role) // . type WorkspacesDefaultRoleNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WorkspacesDefaultRoleNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WorkspacesDefaultRoleNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WorkspacesDefaultRoleNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WorkspacesDefaultRoleNotFoundException" } return *e.ErrorCodeOverride } func (e *WorkspacesDefaultRoleNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
396
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" ) // Describes a modification to the configuration of Bring Your Own License (BYOL) // for the specified account. type AccountModification struct { // The IP address range, specified as an IPv4 CIDR block, for the management // network interface used for the account. DedicatedTenancyManagementCidrRange *string // The status of BYOL (whether BYOL is being enabled or disabled). DedicatedTenancySupport DedicatedTenancySupportResultEnum // The error code that is returned if the configuration of BYOL cannot be modified. ErrorCode *string // The text of the error message that is returned if the configuration of BYOL // cannot be modified. ErrorMessage *string // The state of the modification to the configuration of BYOL. ModificationState DedicatedTenancyModificationStateEnum // The timestamp when the modification of the BYOL configuration was started. StartTime *time.Time noSmithyDocumentSerde } // Describes the properties of the certificate-based authentication you want to // use with your WorkSpaces. type CertificateBasedAuthProperties struct { // The Amazon Resource Name (ARN) of the Amazon Web Services Certificate Manager // Private CA resource. CertificateAuthorityArn *string // The status of the certificate-based authentication properties. Status CertificateBasedAuthStatusEnum noSmithyDocumentSerde } // Describes an Amazon WorkSpaces client. type ClientProperties struct { // Specifies whether users can upload diagnostic log files of Amazon WorkSpaces // client directly to WorkSpaces to troubleshoot issues when using the WorkSpaces // client. When enabled, the log files will be sent to WorkSpaces automatically and // will be applied to all users in the specified directory. LogUploadEnabled LogUploadEnum // Specifies whether users can cache their credentials on the Amazon WorkSpaces // client. When enabled, users can choose to reconnect to their WorkSpaces without // re-entering their credentials. ReconnectEnabled ReconnectEnum noSmithyDocumentSerde } // Information about the Amazon WorkSpaces client. type ClientPropertiesResult struct { // Information about the Amazon WorkSpaces client. ClientProperties *ClientProperties // The resource identifier, in the form of a directory ID. ResourceId *string noSmithyDocumentSerde } // Describes the compute type of the bundle. type ComputeType struct { // The compute type. Name Compute noSmithyDocumentSerde } // Describes an Amazon Connect client add-in. type ConnectClientAddIn struct { // The client add-in identifier. AddInId *string // The name of the client add in. Name *string // The directory identifier for which the client add-in is configured. ResourceId *string // The endpoint URL of the client add-in. URL *string noSmithyDocumentSerde } // Describes a connection alias. Connection aliases are used for cross-Region // redirection. For more information, see Cross-Region Redirection for Amazon // WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . type ConnectionAlias struct { // The identifier of the connection alias. AliasId *string // The association status of the connection alias. Associations []ConnectionAliasAssociation // The connection string specified for the connection alias. The connection string // must be in the form of a fully qualified domain name (FQDN), such as // www.example.com . ConnectionString *string // The identifier of the Amazon Web Services account that owns the connection // alias. OwnerAccountId *string // The current state of the connection alias. State ConnectionAliasState noSmithyDocumentSerde } // Describes a connection alias association that is used for cross-Region // redirection. For more information, see Cross-Region Redirection for Amazon // WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . type ConnectionAliasAssociation struct { // The identifier of the Amazon Web Services account that associated the // connection alias with a directory. AssociatedAccountId *string // The association status of the connection alias. AssociationStatus AssociationStatus // The identifier of the connection alias association. You use the connection // identifier in the DNS TXT record when you're configuring your DNS routing // policies. ConnectionIdentifier *string // The identifier of the directory associated with a connection alias. ResourceId *string noSmithyDocumentSerde } // Describes the permissions for a connection alias. Connection aliases are used // for cross-Region redirection. For more information, see Cross-Region // Redirection for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html) // . type ConnectionAliasPermission struct { // Indicates whether the specified Amazon Web Services account is allowed to // associate the connection alias with a directory. // // This member is required. AllowAssociation *bool // The identifier of the Amazon Web Services account that the connection alias is // shared with. // // This member is required. SharedAccountId *string noSmithyDocumentSerde } // Returns default client branding attributes that were imported. These attributes // display on the client login screen. Client branding attributes are public // facing. Ensure that you don't include sensitive information. type DefaultClientBrandingAttributes struct { // The forgotten password link. This is the web address that users can go to if // they forget the password for their WorkSpace. ForgotPasswordLink *string // The login message. Specified as a key value pair, in which the key is a locale // and the value is the localized message for that locale. The only key supported // is en_US . The HTML tags supported include the following: a, b, blockquote, br, // cite, code, dd, dl, dt, div, em, i, li, ol, p, pre, q, small, span, strike, // strong, sub, sup, u, ul . LoginMessage map[string]string // The logo. The only image format accepted is a binary data object that is // converted from a .png file. LogoUrl *string // The support email. The company's customer support email address. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify one parameter for each platform type, but // not both. // - The default email is [email protected] . SupportEmail *string // The support link. The link for the company's customer support page for their // WorkSpace. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive.You can specify one parameter for each platform type, but not // both. // - The default support link is [email protected] . SupportLink *string noSmithyDocumentSerde } // The default client branding attributes to be imported. These attributes display // on the client login screen. Client branding attributes are public facing. Ensure // that you do not include sensitive information. type DefaultImportClientBrandingAttributes struct { // The forgotten password link. This is the web address that users can go to if // they forget the password for their WorkSpace. ForgotPasswordLink *string // The login message. Specified as a key value pair, in which the key is a locale // and the value is the localized message for that locale. The only key supported // is en_US . The HTML tags supported include the following: a, b, blockquote, br, // cite, code, dd, dl, dt, div, em, i, li, ol, p, pre, q, small, span, strike, // strong, sub, sup, u, ul . LoginMessage map[string]string // The logo. The only image format accepted is a binary data object that is // converted from a .png file. Logo []byte // The support email. The company's customer support email address. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify one parameter for each platform type, but // not both. // - The default email is [email protected] . SupportEmail *string // The support link. The link for the company's customer support page for their // WorkSpace. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify one parameter for each platform type, but // not both. // - The default support link is [email protected] . SupportLink *string noSmithyDocumentSerde } // Describes the default values that are used to create WorkSpaces. For more // information, see Update Directory Details for Your WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/update-directory-details.html) // . type DefaultWorkspaceCreationProperties struct { // The identifier of the default security group to apply to WorkSpaces when they // are created. For more information, see Security Groups for Your WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-security-groups.html) // . CustomSecurityGroupId *string // The organizational unit (OU) in the directory for the WorkSpace machine // accounts. DefaultOu *string // Specifies whether to automatically assign an Elastic public IP address to // WorkSpaces in this directory by default. If enabled, the Elastic public IP // address allows outbound internet access from your WorkSpaces when you’re using // an internet gateway in the Amazon VPC in which your WorkSpaces are located. If // you're using a Network Address Translation (NAT) gateway for outbound internet // access from your VPC, or if your WorkSpaces are in public subnets and you // manually assign them Elastic IP addresses, you should disable this setting. This // setting applies to new WorkSpaces that you launch or to existing WorkSpaces that // you rebuild. For more information, see Configure a VPC for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-vpc.html) // . EnableInternetAccess *bool // Specifies whether maintenance mode is enabled for WorkSpaces. For more // information, see WorkSpace Maintenance (https://docs.aws.amazon.com/workspaces/latest/adminguide/workspace-maintenance.html) // . EnableMaintenanceMode *bool // Specifies whether the directory is enabled for Amazon WorkDocs. EnableWorkDocs *bool // Specifies whether WorkSpace users are local administrators on their WorkSpaces. UserEnabledAsLocalAdministrator *bool noSmithyDocumentSerde } // Describes the standby WorkSpace that could not be created. type FailedCreateStandbyWorkspacesRequest struct { // The error code that is returned if the standby WorkSpace could not be created. ErrorCode *string // The text of the error message that is returned if the standby WorkSpace could // not be created. ErrorMessage *string // Information about the standby WorkSpace that could not be created. StandbyWorkspaceRequest *StandbyWorkspace noSmithyDocumentSerde } // Describes a WorkSpace that cannot be created. type FailedCreateWorkspaceRequest struct { // The error code that is returned if the WorkSpace cannot be created. ErrorCode *string // The text of the error message that is returned if the WorkSpace cannot be // created. ErrorMessage *string // Information about the WorkSpace. WorkspaceRequest *WorkspaceRequest noSmithyDocumentSerde } // Describes a WorkSpace that could not be rebooted. ( RebootWorkspaces ), rebuilt ( // RebuildWorkspaces ), restored ( RestoreWorkspace ), terminated ( // TerminateWorkspaces ), started ( StartWorkspaces ), or stopped ( StopWorkspaces // ). type FailedWorkspaceChangeRequest struct { // The error code that is returned if the WorkSpace cannot be rebooted. ErrorCode *string // The text of the error message that is returned if the WorkSpace cannot be // rebooted. ErrorMessage *string // The identifier of the WorkSpace. WorkspaceId *string noSmithyDocumentSerde } // Describes the Amazon Web Services accounts that have been granted permission to // use a shared image. For more information about sharing images, see Share or // Unshare a Custom WorkSpaces Image (https://docs.aws.amazon.com/workspaces/latest/adminguide/share-custom-image.html) // . type ImagePermission struct { // The identifier of the Amazon Web Services account that an image has been shared // with. SharedAccountId *string noSmithyDocumentSerde } // The client branding attributes for iOS device types. These attributes are // displayed on the iOS client login screen only. Client branding attributes are // public facing. Ensure you do not include sensitive information. type IosClientBrandingAttributes struct { // The forgotten password link. This is the web address that users can go to if // they forget the password for their WorkSpace. ForgotPasswordLink *string // The login message. Specified as a key value pair, in which the key is a locale // and the value is the localized message for that locale. The only key supported // is en_US . The HTML tags supported include the following: a, b, blockquote, br, // cite, code, dd, dl, dt, div, em, i, li, ol, p, pre, q, small, span, strike, // strong, sub, sup, u, ul . LoginMessage map[string]string // The @2x version of the logo. This is the higher resolution display that offers // a scale factor of 2.0 (or @2x). The only image format accepted is a binary data // object that is converted from a .png file. For more information about iOS image // size and resolution, see Image Size and Resolution (https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/) // in the Apple Human Interface Guidelines. Logo2xUrl *string // The @3x version of the logo. This is the higher resolution display that offers // a scale factor of 3.0 (or @3x).The only image format accepted is a binary data // object that is converted from a .png file. For more information about iOS image // size and resolution, see Image Size and Resolution (https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/) // in the Apple Human Interface Guidelines. Logo3xUrl *string // The logo. This is the standard-resolution display that has a 1:1 pixel density // (or @1x), where one pixel is equal to one point. The only image format accepted // is a binary data object that is converted from a .png file. LogoUrl *string // The support email. The company's customer support email address. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify one parameter for each platform type, but // not both. // - The default email is [email protected] . SupportEmail *string // The support link. The link for the company's customer support page for their // WorkSpace. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify one parameter for each platform type, but // not both. // - The default support link is [email protected] . SupportLink *string noSmithyDocumentSerde } // The client branding attributes to import for iOS device types. These attributes // are displayed on the iOS client login screen. Client branding attributes are // public facing. Ensure you do not include sensitive information. type IosImportClientBrandingAttributes struct { // The forgotten password link. This is the web address that users can go to if // they forget the password for their WorkSpace. ForgotPasswordLink *string // The login message. Specified as a key value pair, in which the key is a locale // and the value is the localized message for that locale. The only key supported // is en_US . The HTML tags supported include the following: a, b, blockquote, br, // cite, code, dd, dl, dt, div, em, i, li, ol, p, pre, q, small, span, strike, // strong, sub, sup, u, ul . LoginMessage map[string]string // The logo. This is the standard-resolution display that has a 1:1 pixel density // (or @1x), where one pixel is equal to one point. The only image format accepted // is a binary data object that is converted from a .png file. Logo []byte // The @2x version of the logo. This is the higher resolution display that offers // a scale factor of 2.0 (or @2x). The only image format accepted is a binary data // object that is converted from a .png file. For more information about iOS image // size and resolution, see Image Size and Resolution (https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/) // in the Apple Human Interface Guidelines. Logo2x []byte // The @3x version of the logo. This is the higher resolution display that offers // a scale factor of 3.0 (or @3x). The only image format accepted is a binary data // object that is converted from a .png file. For more information about iOS image // size and resolution, see Image Size and Resolution (https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/) // in the Apple Human Interface Guidelines. Logo3x []byte // The support email. The company's customer support email address. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify one parameter for each platform type, but // not both. // - The default email is [email protected] . SupportEmail *string // The support link. The link for the company's customer support page for their // WorkSpace. // - In each platform type, the SupportEmail and SupportLink parameters are // mutually exclusive. You can specify one parameter for each platform type, but // not both. // - The default support link is [email protected] . SupportLink *string noSmithyDocumentSerde } // Describes a rule for an IP access control group. type IpRuleItem struct { // The IP address range, in CIDR notation. IpRule *string // The description. RuleDesc *string noSmithyDocumentSerde } // Describes a WorkSpace modification. type ModificationState struct { // The resource. Resource ModificationResourceEnum // The modification state. State ModificationStateEnum noSmithyDocumentSerde } // The operating system that the image is running. type OperatingSystem struct { // The operating system. Type OperatingSystemType noSmithyDocumentSerde } // Information about the standby WorkSpace. type PendingCreateStandbyWorkspacesRequest struct { // The identifier of the directory for the standby WorkSpace. DirectoryId *string // The operational state of the standby WorkSpace. State WorkspaceState // Describes the standby WorkSpace that was created. Because this operation is // asynchronous, the identifier returned is not immediately available for use with // other operations. For example, if you call DescribeWorkspaces (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html) // before the WorkSpace is created, the information returned can be incomplete. UserName *string // The identifier of the standby WorkSpace. WorkspaceId *string noSmithyDocumentSerde } // Describes the information used to reboot a WorkSpace. type RebootRequest struct { // The identifier of the WorkSpace. // // This member is required. WorkspaceId *string noSmithyDocumentSerde } // Describes the information used to rebuild a WorkSpace. type RebuildRequest struct { // The identifier of the WorkSpace. // // This member is required. WorkspaceId *string noSmithyDocumentSerde } // Describes the related WorkSpace. The related WorkSpace could be a standby // WorkSpace or primary WorkSpace related to the specified WorkSpace. type RelatedWorkspaceProperties struct { // The Region of the related WorkSpace. Region *string // Indicates the state of the WorkSpace. State WorkspaceState // Indicates the type of WorkSpace. Type StandbyWorkspaceRelationshipType // The identifier of the related WorkSpace. WorkspaceId *string noSmithyDocumentSerde } // Describes the root volume for a WorkSpace bundle. type RootStorage struct { // The size of the root volume. Capacity *string noSmithyDocumentSerde } // Describes the enablement status, user access URL, and relay state parameter // name that are used for configuring federation with an SAML 2.0 identity // provider. type SamlProperties struct { // The relay state parameter name supported by the SAML 2.0 identity provider // (IdP). When the end user is redirected to the user access URL from the // WorkSpaces client application, this relay state parameter name is appended as a // query parameter to the URL along with the relay state endpoint to return the // user to the client application session. To use SAML 2.0 authentication with // WorkSpaces, the IdP must support IdP-initiated deep linking for the relay state // URL. Consult your IdP documentation for more information. RelayStateParameterName *string // Indicates the status of SAML 2.0 authentication. These statuses include the // following. // - If the setting is DISABLED , end users will be directed to login with their // directory credentials. // - If the setting is ENABLED , end users will be directed to login via the user // access URL. Users attempting to connect to WorkSpaces from a client application // that does not support SAML 2.0 authentication will not be able to connect. // - If the setting is ENABLED_WITH_DIRECTORY_LOGIN_FALLBACK , end users will be // directed to login via the user access URL on supported client applications, but // will not prevent clients that do not support SAML 2.0 authentication from // connecting as if SAML 2.0 authentication was disabled. Status SamlStatusEnum // The SAML 2.0 identity provider (IdP) user access URL is the URL a user would // navigate to in their web browser in order to federate from the IdP and directly // access the application, without any SAML 2.0 service provider (SP) bindings. UserAccessUrl *string noSmithyDocumentSerde } // Describes the self-service permissions for a directory. For more information, // see Enable Self-Service WorkSpace Management Capabilities for Your Users (https://docs.aws.amazon.com/workspaces/latest/adminguide/enable-user-self-service-workspace-management.html) // . type SelfservicePermissions struct { // Specifies whether users can change the compute type (bundle) for their // WorkSpace. ChangeComputeType ReconnectEnum // Specifies whether users can increase the volume size of the drives on their // WorkSpace. IncreaseVolumeSize ReconnectEnum // Specifies whether users can rebuild the operating system of a WorkSpace to its // original state. RebuildWorkspace ReconnectEnum // Specifies whether users can restart their WorkSpace. RestartWorkspace ReconnectEnum // Specifies whether users can switch the running mode of their WorkSpace. SwitchRunningMode ReconnectEnum noSmithyDocumentSerde } // Describes a snapshot. type Snapshot struct { // The time when the snapshot was created. SnapshotTime *time.Time noSmithyDocumentSerde } // Describes a standby WorkSpace. type StandbyWorkspace struct { // The identifier of the directory for the standby WorkSpace. // // This member is required. DirectoryId *string // The identifier of the standby WorkSpace. // // This member is required. PrimaryWorkspaceId *string // The tags associated with the standby WorkSpace. Tags []Tag // The volume encryption key of the standby WorkSpace. VolumeEncryptionKey *string noSmithyDocumentSerde } // Information used to start a WorkSpace. type StartRequest struct { // The identifier of the WorkSpace. WorkspaceId *string noSmithyDocumentSerde } // Describes the information used to stop a WorkSpace. type StopRequest struct { // The identifier of the WorkSpace. WorkspaceId *string noSmithyDocumentSerde } // Describes a tag. type Tag struct { // The key of the tag. // // This member is required. Key *string // The value of the tag. Value *string noSmithyDocumentSerde } // Describes the information used to terminate a WorkSpace. type TerminateRequest struct { // The identifier of the WorkSpace. // // This member is required. WorkspaceId *string noSmithyDocumentSerde } // Describes whether a WorkSpace image needs to be updated with the latest drivers // and other components required by Amazon WorkSpaces. Only Windows 10 WorkSpace // images can be programmatically updated at this time. type UpdateResult struct { // A description of whether updates for the WorkSpace image are pending or // available. Description *string // Indicates whether updated drivers or other components are available for the // specified WorkSpace image. UpdateAvailable *bool noSmithyDocumentSerde } // Describes the user volume for a WorkSpace bundle. type UserStorage struct { // The size of the user volume. Capacity *string noSmithyDocumentSerde } // Describes a WorkSpace. type Workspace struct { // The identifier of the bundle used to create the WorkSpace. BundleId *string // The name of the WorkSpace, as seen by the operating system. The format of this // name varies. For more information, see Launch a WorkSpace (https://docs.aws.amazon.com/workspaces/latest/adminguide/launch-workspaces-tutorials.html) // . ComputerName *string // The identifier of the Directory Service directory for the WorkSpace. DirectoryId *string // The error code that is returned if the WorkSpace cannot be created. ErrorCode *string // The text of the error message that is returned if the WorkSpace cannot be // created. ErrorMessage *string // The IP address of the WorkSpace. IpAddress *string // The modification states of the WorkSpace. ModificationStates []ModificationState // The standby WorkSpace or primary WorkSpace related to the specified WorkSpace. RelatedWorkspaces []RelatedWorkspaceProperties // Indicates whether the data stored on the root volume is encrypted. RootVolumeEncryptionEnabled *bool // The operational state of the WorkSpace. After a WorkSpace is terminated, the // TERMINATED state is returned only briefly before the WorkSpace directory // metadata is cleaned up, so this state is rarely returned. To confirm that a // WorkSpace is terminated, check for the WorkSpace ID by using DescribeWorkSpaces (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html) // . If the WorkSpace ID isn't returned, then the WorkSpace has been successfully // terminated. State WorkspaceState // The identifier of the subnet for the WorkSpace. SubnetId *string // The user for the WorkSpace. UserName *string // Indicates whether the data stored on the user volume is encrypted. UserVolumeEncryptionEnabled *bool // The symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon // WorkSpaces does not support asymmetric KMS keys. VolumeEncryptionKey *string // The identifier of the WorkSpace. WorkspaceId *string // The properties of the WorkSpace. WorkspaceProperties *WorkspaceProperties noSmithyDocumentSerde } // The device types and operating systems that can be used to access a WorkSpace. // For more information, see Amazon WorkSpaces Client Network Requirements (https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-network-requirements.html) // . type WorkspaceAccessProperties struct { // Indicates whether users can use Android and Android-compatible Chrome OS // devices to access their WorkSpaces. DeviceTypeAndroid AccessPropertyValue // Indicates whether users can use Chromebooks to access their WorkSpaces. DeviceTypeChromeOs AccessPropertyValue // Indicates whether users can use iOS devices to access their WorkSpaces. DeviceTypeIos AccessPropertyValue // Indicates whether users can use Linux clients to access their WorkSpaces. DeviceTypeLinux AccessPropertyValue // Indicates whether users can use macOS clients to access their WorkSpaces. DeviceTypeOsx AccessPropertyValue // Indicates whether users can access their WorkSpaces through a web browser. DeviceTypeWeb AccessPropertyValue // Indicates whether users can use Windows clients to access their WorkSpaces. DeviceTypeWindows AccessPropertyValue // Indicates whether users can use zero client devices to access their WorkSpaces. DeviceTypeZeroClient AccessPropertyValue noSmithyDocumentSerde } // Describes a WorkSpace bundle. type WorkspaceBundle struct { // The identifier of the bundle. BundleId *string // The type of WorkSpace bundle. BundleType BundleType // The compute type of the bundle. For more information, see Amazon WorkSpaces // Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles) . ComputeType *ComputeType // The time when the bundle was created. CreationTime *time.Time // The description of the bundle. Description *string // The identifier of the image that was used to create the bundle. ImageId *string // The last time that the bundle was updated. LastUpdatedTime *time.Time // The name of the bundle. Name *string // The owner of the bundle. This is the account identifier of the owner, or AMAZON // if the bundle is provided by Amazon Web Services. Owner *string // The size of the root volume. RootStorage *RootStorage // The state of the WorkSpace bundle. State WorkspaceBundleState // The size of the user volume. UserStorage *UserStorage noSmithyDocumentSerde } // Describes the connection status of a WorkSpace. type WorkspaceConnectionStatus struct { // The connection state of the WorkSpace. The connection state is unknown if the // WorkSpace is stopped. ConnectionState ConnectionState // The timestamp of the connection status check. ConnectionStateCheckTimestamp *time.Time // The timestamp of the last known user connection. LastKnownUserConnectionTimestamp *time.Time // The identifier of the WorkSpace. WorkspaceId *string noSmithyDocumentSerde } // Describes the default properties that are used for creating WorkSpaces. For // more information, see Update Directory Details for Your WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/update-directory-details.html) // . type WorkspaceCreationProperties struct { // The identifier of your custom security group. CustomSecurityGroupId *string // The default organizational unit (OU) for your WorkSpaces directories. This // string must be the full Lightweight Directory Access Protocol (LDAP) // distinguished name for the target domain and OU. It must be in the form // "OU=value,DC=value,DC=value" , where value is any string of characters, and the // number of domain components (DCs) is two or more. For example, // OU=WorkSpaces_machines,DC=machines,DC=example,DC=com . // - To avoid errors, certain characters in the distinguished name must be // escaped. For more information, see Distinguished Names (https://docs.microsoft.com/previous-versions/windows/desktop/ldap/distinguished-names) // in the Microsoft documentation. // - The API doesn't validate whether the OU exists. DefaultOu *string // Indicates whether internet access is enabled for your WorkSpaces. EnableInternetAccess *bool // Indicates whether maintenance mode is enabled for your WorkSpaces. For more // information, see WorkSpace Maintenance (https://docs.aws.amazon.com/workspaces/latest/adminguide/workspace-maintenance.html) // . EnableMaintenanceMode *bool // Indicates whether Amazon WorkDocs is enabled for your WorkSpaces. If WorkDocs // is already enabled for a WorkSpaces directory and you disable it, new WorkSpaces // launched in the directory will not have WorkDocs enabled. However, WorkDocs // remains enabled for any existing WorkSpaces, unless you either disable users' // access to WorkDocs or you delete the WorkDocs site. To disable users' access to // WorkDocs, see Disabling Users (https://docs.aws.amazon.com/workdocs/latest/adminguide/inactive-user.html) // in the Amazon WorkDocs Administration Guide. To delete a WorkDocs site, see // Deleting a Site (https://docs.aws.amazon.com/workdocs/latest/adminguide/manage-sites.html) // in the Amazon WorkDocs Administration Guide. If you enable WorkDocs on a // directory that already has existing WorkSpaces, the existing WorkSpaces and any // new WorkSpaces that are launched in the directory will have WorkDocs enabled. EnableWorkDocs *bool // Indicates whether users are local administrators of their WorkSpaces. UserEnabledAsLocalAdministrator *bool noSmithyDocumentSerde } // Describes a directory that is used with Amazon WorkSpaces. type WorkspaceDirectory struct { // The directory alias. Alias *string // The certificate-based authentication properties used to authenticate SAML 2.0 // Identity Provider (IdP) user identities to Active Directory for WorkSpaces // login. CertificateBasedAuthProperties *CertificateBasedAuthProperties // The user name for the service account. CustomerUserName *string // The directory identifier. DirectoryId *string // The name of the directory. DirectoryName *string // The directory type. DirectoryType WorkspaceDirectoryType // The IP addresses of the DNS servers for the directory. DnsIpAddresses []string // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces // to make calls to other services, such as Amazon EC2, on your behalf. IamRoleId *string // The identifiers of the IP access control groups associated with the directory. IpGroupIds []string // The registration code for the directory. This is the code that users enter in // their Amazon WorkSpaces client application to connect to the directory. RegistrationCode *string // Describes the enablement status, user access URL, and relay state parameter // name that are used for configuring federation with an SAML 2.0 identity // provider. SamlProperties *SamlProperties // The default self-service permissions for WorkSpaces in the directory. SelfservicePermissions *SelfservicePermissions // The state of the directory's registration with Amazon WorkSpaces. After a // directory is deregistered, the DEREGISTERED state is returned very briefly // before the directory metadata is cleaned up, so this state is rarely returned. // To confirm that a directory is deregistered, check for the directory ID by using // DescribeWorkspaceDirectories (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceDirectories.html) // . If the directory ID isn't returned, then the directory has been successfully // deregistered. State WorkspaceDirectoryState // The identifiers of the subnets used with the directory. SubnetIds []string // Specifies whether the directory is dedicated or shared. To use Bring Your Own // License (BYOL), this value must be set to DEDICATED . For more information, see // Bring Your Own Windows Desktop Images (https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html) // . Tenancy Tenancy // The devices and operating systems that users can use to access WorkSpaces. WorkspaceAccessProperties *WorkspaceAccessProperties // The default creation properties for all WorkSpaces in the directory. WorkspaceCreationProperties *DefaultWorkspaceCreationProperties // The identifier of the security group that is assigned to new WorkSpaces. WorkspaceSecurityGroupId *string noSmithyDocumentSerde } // Describes a WorkSpace image. type WorkspaceImage struct { // The date when the image was created. If the image has been shared, the Amazon // Web Services account that the image has been shared with sees the original // creation date of the image. Created *time.Time // The description of the image. Description *string // The error code that is returned for the image. ErrorCode *string // The text of the error message that is returned for the image. ErrorMessage *string // The identifier of the image. ImageId *string // The name of the image. Name *string // The operating system that the image is running. OperatingSystem *OperatingSystem // The identifier of the Amazon Web Services account that owns the image. OwnerAccountId *string // Specifies whether the image is running on dedicated hardware. When Bring Your // Own License (BYOL) is enabled, this value is set to DEDICATED . For more // information, see Bring Your Own Windows Desktop Images (https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html) // . RequiredTenancy WorkspaceImageRequiredTenancy // The status of the image. State WorkspaceImageState // The updates (if any) that are available for the specified image. Updates *UpdateResult noSmithyDocumentSerde } // Describes a WorkSpace. type WorkspaceProperties struct { // The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles) // . ComputeTypeName Compute // The protocol. For more information, see Protocols for Amazon WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-protocols.html) // . // - Only available for WorkSpaces created with PCoIP bundles. // - The Protocols property is case sensitive. Ensure you use PCOIP or WSP . // - Unavailable for Windows 7 WorkSpaces and WorkSpaces using GPU-based bundles // (Graphics, GraphicsPro, Graphics.g4dn, and GraphicsPro.g4dn). Protocols []Protocol // The size of the root volume. For important information about how to modify the // size of the root and user volumes, see Modify a WorkSpace (https://docs.aws.amazon.com/workspaces/latest/adminguide/modify-workspaces.html) // . RootVolumeSizeGib *int32 // The running mode. For more information, see Manage the WorkSpace Running Mode (https://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html) // . The MANUAL value is only supported by Amazon WorkSpaces Core. Contact your // account team to be allow-listed to use this value. For more information, see // Amazon WorkSpaces Core (http://aws.amazon.com/workspaces/core/) . RunningMode RunningMode // The time after a user logs off when WorkSpaces are automatically stopped. // Configured in 60-minute intervals. RunningModeAutoStopTimeoutInMinutes *int32 // The size of the user storage. For important information about how to modify the // size of the root and user volumes, see Modify a WorkSpace (https://docs.aws.amazon.com/workspaces/latest/adminguide/modify-workspaces.html) // . UserVolumeSizeGib *int32 noSmithyDocumentSerde } // Describes the information used to create a WorkSpace. type WorkspaceRequest struct { // The identifier of the bundle for the WorkSpace. You can use // DescribeWorkspaceBundles to list the available bundles. // // This member is required. BundleId *string // The identifier of the Directory Service directory for the WorkSpace. You can // use DescribeWorkspaceDirectories to list the available directories. // // This member is required. DirectoryId *string // The user name of the user for the WorkSpace. This user name must exist in the // Directory Service directory for the WorkSpace. // // This member is required. UserName *string // Indicates whether the data stored on the root volume is encrypted. RootVolumeEncryptionEnabled *bool // The tags for the WorkSpace. Tags []Tag // Indicates whether the data stored on the user volume is encrypted. UserVolumeEncryptionEnabled *bool // The symmetric KMS key used to encrypt data stored on your WorkSpace. Amazon // WorkSpaces does not support asymmetric KMS keys. VolumeEncryptionKey *string // The WorkSpace properties. WorkspaceProperties *WorkspaceProperties noSmithyDocumentSerde } // Describes an IP access control group. type WorkspacesIpGroup struct { // The description of the group. GroupDesc *string // The identifier of the group. GroupId *string // The name of the group. GroupName *string // The rules. UserRules []IpRuleItem noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
1,151
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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 = "WorkSpaces Web" const ServiceAPIVersion = "2020-07-08" // Client provides the API client to make operations call for Amazon WorkSpaces // Web. 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, "workspacesweb", 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) }
455
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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 workspacesweb 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" ) // Associates a browser settings resource with a web portal. func (c *Client) AssociateBrowserSettings(ctx context.Context, params *AssociateBrowserSettingsInput, optFns ...func(*Options)) (*AssociateBrowserSettingsOutput, error) { if params == nil { params = &AssociateBrowserSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateBrowserSettings", params, optFns, c.addOperationAssociateBrowserSettingsMiddlewares) if err != nil { return nil, err } out := result.(*AssociateBrowserSettingsOutput) out.ResultMetadata = metadata return out, nil } type AssociateBrowserSettingsInput struct { // The ARN of the browser settings. // // This member is required. BrowserSettingsArn *string // The ARN of the web portal. // // This member is required. PortalArn *string noSmithyDocumentSerde } type AssociateBrowserSettingsOutput struct { // The ARN of the browser settings. // // This member is required. BrowserSettingsArn *string // The ARN of the web portal. // // This member is required. PortalArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateBrowserSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateBrowserSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateBrowserSettings{}, 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 = addOpAssociateBrowserSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateBrowserSettings(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_opAssociateBrowserSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces-web", OperationName: "AssociateBrowserSettings", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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" ) // Associates an IP access settings resource with a web portal. func (c *Client) AssociateIpAccessSettings(ctx context.Context, params *AssociateIpAccessSettingsInput, optFns ...func(*Options)) (*AssociateIpAccessSettingsOutput, error) { if params == nil { params = &AssociateIpAccessSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateIpAccessSettings", params, optFns, c.addOperationAssociateIpAccessSettingsMiddlewares) if err != nil { return nil, err } out := result.(*AssociateIpAccessSettingsOutput) out.ResultMetadata = metadata return out, nil } type AssociateIpAccessSettingsInput struct { // The ARN of the IP access settings. // // This member is required. IpAccessSettingsArn *string // The ARN of the web portal. // // This member is required. PortalArn *string noSmithyDocumentSerde } type AssociateIpAccessSettingsOutput struct { // The ARN of the IP access settings resource. // // This member is required. IpAccessSettingsArn *string // The ARN of the web portal. // // This member is required. PortalArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateIpAccessSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateIpAccessSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateIpAccessSettings{}, 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 = addOpAssociateIpAccessSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateIpAccessSettings(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_opAssociateIpAccessSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces-web", OperationName: "AssociateIpAccessSettings", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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" ) // Associates a network settings resource with a web portal. func (c *Client) AssociateNetworkSettings(ctx context.Context, params *AssociateNetworkSettingsInput, optFns ...func(*Options)) (*AssociateNetworkSettingsOutput, error) { if params == nil { params = &AssociateNetworkSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateNetworkSettings", params, optFns, c.addOperationAssociateNetworkSettingsMiddlewares) if err != nil { return nil, err } out := result.(*AssociateNetworkSettingsOutput) out.ResultMetadata = metadata return out, nil } type AssociateNetworkSettingsInput struct { // The ARN of the network settings. // // This member is required. NetworkSettingsArn *string // The ARN of the web portal. // // This member is required. PortalArn *string noSmithyDocumentSerde } type AssociateNetworkSettingsOutput struct { // The ARN of the network settings. // // This member is required. NetworkSettingsArn *string // The ARN of the web portal. // // This member is required. PortalArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateNetworkSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateNetworkSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateNetworkSettings{}, 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 = addOpAssociateNetworkSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateNetworkSettings(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_opAssociateNetworkSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces-web", OperationName: "AssociateNetworkSettings", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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" ) // Associates a trust store with a web portal. func (c *Client) AssociateTrustStore(ctx context.Context, params *AssociateTrustStoreInput, optFns ...func(*Options)) (*AssociateTrustStoreOutput, error) { if params == nil { params = &AssociateTrustStoreInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateTrustStore", params, optFns, c.addOperationAssociateTrustStoreMiddlewares) if err != nil { return nil, err } out := result.(*AssociateTrustStoreOutput) out.ResultMetadata = metadata return out, nil } type AssociateTrustStoreInput struct { // The ARN of the web portal. // // This member is required. PortalArn *string // The ARN of the trust store. // // This member is required. TrustStoreArn *string noSmithyDocumentSerde } type AssociateTrustStoreOutput struct { // The ARN of the web portal. // // This member is required. PortalArn *string // The ARN of the trust store. // // This member is required. TrustStoreArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateTrustStoreMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateTrustStore{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateTrustStore{}, 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 = addOpAssociateTrustStoreValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTrustStore(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_opAssociateTrustStore(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces-web", OperationName: "AssociateTrustStore", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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" ) // Associates a user access logging settings resource with a web portal. func (c *Client) AssociateUserAccessLoggingSettings(ctx context.Context, params *AssociateUserAccessLoggingSettingsInput, optFns ...func(*Options)) (*AssociateUserAccessLoggingSettingsOutput, error) { if params == nil { params = &AssociateUserAccessLoggingSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateUserAccessLoggingSettings", params, optFns, c.addOperationAssociateUserAccessLoggingSettingsMiddlewares) if err != nil { return nil, err } out := result.(*AssociateUserAccessLoggingSettingsOutput) out.ResultMetadata = metadata return out, nil } type AssociateUserAccessLoggingSettingsInput struct { // The ARN of the web portal. // // This member is required. PortalArn *string // The ARN of the user access logging settings. // // This member is required. UserAccessLoggingSettingsArn *string noSmithyDocumentSerde } type AssociateUserAccessLoggingSettingsOutput struct { // The ARN of the web portal. // // This member is required. PortalArn *string // The ARN of the user access logging settings. // // This member is required. UserAccessLoggingSettingsArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateUserAccessLoggingSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateUserAccessLoggingSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateUserAccessLoggingSettings{}, 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 = addOpAssociateUserAccessLoggingSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateUserAccessLoggingSettings(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_opAssociateUserAccessLoggingSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces-web", OperationName: "AssociateUserAccessLoggingSettings", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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" ) // Associates a user settings resource with a web portal. func (c *Client) AssociateUserSettings(ctx context.Context, params *AssociateUserSettingsInput, optFns ...func(*Options)) (*AssociateUserSettingsOutput, error) { if params == nil { params = &AssociateUserSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateUserSettings", params, optFns, c.addOperationAssociateUserSettingsMiddlewares) if err != nil { return nil, err } out := result.(*AssociateUserSettingsOutput) out.ResultMetadata = metadata return out, nil } type AssociateUserSettingsInput struct { // The ARN of the web portal. // // This member is required. PortalArn *string // The ARN of the user settings. // // This member is required. UserSettingsArn *string noSmithyDocumentSerde } type AssociateUserSettingsOutput struct { // The ARN of the web portal. // // This member is required. PortalArn *string // The ARN of the user settings. // // This member is required. UserSettingsArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateUserSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateUserSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateUserSettings{}, 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 = addOpAssociateUserSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateUserSettings(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_opAssociateUserSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces-web", OperationName: "AssociateUserSettings", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package workspacesweb 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/workspacesweb/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a browser settings resource that can be associated with a web portal. // Once associated with a web portal, browser settings control how the browser will // behave once a user starts a streaming session for the web portal. func (c *Client) CreateBrowserSettings(ctx context.Context, params *CreateBrowserSettingsInput, optFns ...func(*Options)) (*CreateBrowserSettingsOutput, error) { if params == nil { params = &CreateBrowserSettingsInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateBrowserSettings", params, optFns, c.addOperationCreateBrowserSettingsMiddlewares) if err != nil { return nil, err } out := result.(*CreateBrowserSettingsOutput) out.ResultMetadata = metadata return out, nil } type CreateBrowserSettingsInput struct { // A JSON string containing Chrome Enterprise policies that will be applied to all // streaming sessions. // // This member is required. BrowserPolicy *string // Additional encryption context of the browser settings. AdditionalEncryptionContext map[string]string // A unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. Idempotency ensures that an API request completes only once. // With an idempotent request, if the original request completes successfully, // subsequent retries with the same client token returns the result from the // original successful request. If you do not specify a client token, one is // automatically generated by the AWS SDK. ClientToken *string // The custom managed key of the browser settings. CustomerManagedKey *string // The tags to add to the browser settings resource. A tag is a key-value pair. Tags []types.Tag noSmithyDocumentSerde } type CreateBrowserSettingsOutput struct { // The ARN of the browser settings. // // This member is required. BrowserSettingsArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateBrowserSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateBrowserSettings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateBrowserSettings{}, 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_opCreateBrowserSettingsMiddleware(stack, options); err != nil { return err } if err = addOpCreateBrowserSettingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBrowserSettings(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_initializeOpCreateBrowserSettings struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateBrowserSettings) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateBrowserSettings) 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.(*CreateBrowserSettingsInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateBrowserSettingsInput ") } 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_opCreateBrowserSettingsMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateBrowserSettings{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateBrowserSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "workspaces-web", OperationName: "CreateBrowserSettings", } }
184