diff --git a/.changelog/3725ffa7678b449fa005e251b305d6d9.json b/.changelog/3725ffa7678b449fa005e251b305d6d9.json new file mode 100644 index 00000000000..9fd434a448c --- /dev/null +++ b/.changelog/3725ffa7678b449fa005e251b305d6d9.json @@ -0,0 +1,8 @@ +{ + "id": "3725ffa7-678b-449f-a005-e251b305d6d9", + "type": "feature", + "description": "AWS Amplify UIBuilder is launching Codegen UI, a new feature that enables you to generate your amplify uibuilder components and forms.", + "modules": [ + "service/amplifyuibuilder" + ] +} \ No newline at end of file diff --git a/.changelog/592dfffac51c44288e815af76106291e.json b/.changelog/592dfffac51c44288e815af76106291e.json new file mode 100644 index 00000000000..d8c92fc7f82 --- /dev/null +++ b/.changelog/592dfffac51c44288e815af76106291e.json @@ -0,0 +1,8 @@ +{ + "id": "592dfffa-c51c-4428-8e81-5af76106291e", + "type": "feature", + "description": "This release adds support for improved accuracy with user vector in Amazon Rekognition Face Search. Adds new APIs: AssociateFaces, CreateUser, DeleteUser, DisassociateFaces, ListUsers, SearchUsers, SearchUsersByImage. Also adds new face metadata that can be stored: user vector.", + "modules": [ + "service/rekognition" + ] +} \ No newline at end of file diff --git a/.changelog/66e3cfc1f5ed48c5ad883143aaa8e270.json b/.changelog/66e3cfc1f5ed48c5ad883143aaa8e270.json new file mode 100644 index 00000000000..ca3d21e8c61 --- /dev/null +++ b/.changelog/66e3cfc1f5ed48c5ad883143aaa8e270.json @@ -0,0 +1,8 @@ +{ + "id": "66e3cfc1-f5ed-48c5-ad88-3143aaa8e270", + "type": "feature", + "description": "This release adds support for SkipUnavailable connection property for cross cluster search", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/76e824668f8d4a26862345b1245cdc96.json b/.changelog/76e824668f8d4a26862345b1245cdc96.json new file mode 100644 index 00000000000..0c6883b1ae3 --- /dev/null +++ b/.changelog/76e824668f8d4a26862345b1245cdc96.json @@ -0,0 +1,8 @@ +{ + "id": "76e82466-8f8d-4a26-8623-45b1245cdc96", + "type": "documentation", + "description": "Documentation updates for DynamoDB Streams", + "modules": [ + "service/dynamodbstreams" + ] +} \ No newline at end of file diff --git a/.changelog/ca0eff2f768a472189a7ff8b0cb3649e.json b/.changelog/ca0eff2f768a472189a7ff8b0cb3649e.json new file mode 100644 index 00000000000..cec84cb8228 --- /dev/null +++ b/.changelog/ca0eff2f768a472189a7ff8b0cb3649e.json @@ -0,0 +1,8 @@ +{ + "id": "ca0eff2f-768a-4721-89a7-ff8b0cb3649e", + "type": "documentation", + "description": "Documentation updates for DynamoDB", + "modules": [ + "service/dynamodb" + ] +} \ No newline at end of file diff --git a/.changelog/e3ca9c30d3984d469fdb915ac0444d78.json b/.changelog/e3ca9c30d3984d469fdb915ac0444d78.json new file mode 100644 index 00000000000..403c07ee946 --- /dev/null +++ b/.changelog/e3ca9c30d3984d469fdb915ac0444d78.json @@ -0,0 +1,8 @@ +{ + "id": "e3ca9c30-d398-4d46-9fdb-915ac0444d78", + "type": "feature", + "description": "Sagemaker Neo now supports compilation for inferentia2 (ML_INF2) and Trainium1 (ML_TRN1) as available targets. With these devices, you can run your workloads at highest performance with lowest cost. inferentia2 (ML_INF2) is available in CMH and Trainium1 (ML_TRN1) is available in IAD currently", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/e57a53ac97a44e4bb6fb38de73f73be8.json b/.changelog/e57a53ac97a44e4bb6fb38de73f73be8.json new file mode 100644 index 00000000000..921dcae809e --- /dev/null +++ b/.changelog/e57a53ac97a44e4bb6fb38de73f73be8.json @@ -0,0 +1,8 @@ +{ + "id": "e57a53ac-97a4-4e4b-b6fb-38de73f73be8", + "type": "feature", + "description": "Amazon FSx for NetApp ONTAP now supports joining a storage virtual machine (SVM) to Active Directory after the SVM has been created.", + "modules": [ + "service/fsx" + ] +} \ No newline at end of file diff --git a/service/amplifyuibuilder/api_op_CreateForm.go b/service/amplifyuibuilder/api_op_CreateForm.go index 093c32fe4cf..dcc214aff88 100644 --- a/service/amplifyuibuilder/api_op_CreateForm.go +++ b/service/amplifyuibuilder/api_op_CreateForm.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new form for an Amplify app. +// Creates a new form for an Amplify. func (c *Client) CreateForm(ctx context.Context, params *CreateFormInput, optFns ...func(*Options)) (*CreateFormOutput, error) { if params == nil { params = &CreateFormInput{} diff --git a/service/amplifyuibuilder/api_op_GetCodegenJob.go b/service/amplifyuibuilder/api_op_GetCodegenJob.go new file mode 100644 index 00000000000..f467b89fbf5 --- /dev/null +++ b/service/amplifyuibuilder/api_op_GetCodegenJob.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +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/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an existing code generation job. +func (c *Client) GetCodegenJob(ctx context.Context, params *GetCodegenJobInput, optFns ...func(*Options)) (*GetCodegenJobOutput, error) { + if params == nil { + params = &GetCodegenJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCodegenJob", params, optFns, c.addOperationGetCodegenJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCodegenJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCodegenJobInput struct { + + // The unique ID of the Amplify app associated with the code generation job. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app + // associated with the code generation job. + // + // This member is required. + EnvironmentName *string + + // The unique ID of the code generation job. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetCodegenJobOutput struct { + + // The configuration settings for the code generation job. + Job *types.CodegenJob + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCodegenJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCodegenJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCodegenJob{}, 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 = addOpGetCodegenJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCodegenJob(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_opGetCodegenJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "GetCodegenJob", + } +} diff --git a/service/amplifyuibuilder/api_op_ListCodegenJobs.go b/service/amplifyuibuilder/api_op_ListCodegenJobs.go new file mode 100644 index 00000000000..dbe45b9578f --- /dev/null +++ b/service/amplifyuibuilder/api_op_ListCodegenJobs.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +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/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of code generation jobs for a specified Amplify app and +// backend environment. +func (c *Client) ListCodegenJobs(ctx context.Context, params *ListCodegenJobsInput, optFns ...func(*Options)) (*ListCodegenJobsOutput, error) { + if params == nil { + params = &ListCodegenJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCodegenJobs", params, optFns, c.addOperationListCodegenJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCodegenJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCodegenJobsInput struct { + + // The unique ID for the Amplify app. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The maximum number of jobs to retrieve. + MaxResults *int32 + + // The token to request the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCodegenJobsOutput struct { + + // The list of code generation jobs for the Amplify app. + // + // This member is required. + Entities []types.CodegenJobSummary + + // The pagination token that's included if more results are available. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCodegenJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCodegenJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCodegenJobs{}, 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 = addOpListCodegenJobsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCodegenJobs(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 +} + +// ListCodegenJobsAPIClient is a client that implements the ListCodegenJobs +// operation. +type ListCodegenJobsAPIClient interface { + ListCodegenJobs(context.Context, *ListCodegenJobsInput, ...func(*Options)) (*ListCodegenJobsOutput, error) +} + +var _ ListCodegenJobsAPIClient = (*Client)(nil) + +// ListCodegenJobsPaginatorOptions is the paginator options for ListCodegenJobs +type ListCodegenJobsPaginatorOptions struct { + // The maximum number of jobs to retrieve. + 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 +} + +// ListCodegenJobsPaginator is a paginator for ListCodegenJobs +type ListCodegenJobsPaginator struct { + options ListCodegenJobsPaginatorOptions + client ListCodegenJobsAPIClient + params *ListCodegenJobsInput + nextToken *string + firstPage bool +} + +// NewListCodegenJobsPaginator returns a new ListCodegenJobsPaginator +func NewListCodegenJobsPaginator(client ListCodegenJobsAPIClient, params *ListCodegenJobsInput, optFns ...func(*ListCodegenJobsPaginatorOptions)) *ListCodegenJobsPaginator { + if params == nil { + params = &ListCodegenJobsInput{} + } + + options := ListCodegenJobsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCodegenJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCodegenJobsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCodegenJobs page. +func (p *ListCodegenJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCodegenJobsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListCodegenJobs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCodegenJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "ListCodegenJobs", + } +} diff --git a/service/amplifyuibuilder/api_op_StartCodegenJob.go b/service/amplifyuibuilder/api_op_StartCodegenJob.go new file mode 100644 index 00000000000..b859cf7633a --- /dev/null +++ b/service/amplifyuibuilder/api_op_StartCodegenJob.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +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/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts a code generation job for for a specified Amplify app and backend +// environment. +func (c *Client) StartCodegenJob(ctx context.Context, params *StartCodegenJobInput, optFns ...func(*Options)) (*StartCodegenJobOutput, error) { + if params == nil { + params = &StartCodegenJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartCodegenJob", params, optFns, c.addOperationStartCodegenJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartCodegenJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartCodegenJobInput struct { + + // The unique ID for the Amplify app. + // + // This member is required. + AppId *string + + // The code generation job resource configuration. + // + // This member is required. + CodegenJobToCreate *types.StartCodegenJobData + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The idempotency token used to ensure that the code generation job request + // completes only once. + ClientToken *string + + noSmithyDocumentSerde +} + +type StartCodegenJobOutput struct { + + // The code generation job for a UI component that is associated with an Amplify + // app. + Entity *types.CodegenJob + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartCodegenJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartCodegenJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartCodegenJob{}, 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_opStartCodegenJobMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartCodegenJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartCodegenJob(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_initializeOpStartCodegenJob struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartCodegenJob) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartCodegenJob) 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.(*StartCodegenJobInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartCodegenJobInput ") + } + + 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_opStartCodegenJobMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartCodegenJob{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartCodegenJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "StartCodegenJob", + } +} diff --git a/service/amplifyuibuilder/deserializers.go b/service/amplifyuibuilder/deserializers.go index a37c1abe4d4..53b96b58c99 100644 --- a/service/amplifyuibuilder/deserializers.go +++ b/service/amplifyuibuilder/deserializers.go @@ -1424,6 +1424,162 @@ func awsRestjson1_deserializeOpDocumentExportThemesOutput(v **ExportThemesOutput return nil } +type awsRestjson1_deserializeOpGetCodegenJob struct { +} + +func (*awsRestjson1_deserializeOpGetCodegenJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetCodegenJob) HandleDeserialize(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_deserializeOpErrorGetCodegenJob(response, &metadata) + } + output := &GetCodegenJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeDocumentCodegenJob(&output.Job, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetCodegenJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetCodegenJobOutput(v **GetCodegenJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetCodegenJobOutput + if *v == nil { + sv = &GetCodegenJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "job": + if err := awsRestjson1_deserializeDocumentCodegenJob(&sv.Job, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetComponent struct { } @@ -2033,14 +2189,14 @@ func awsRestjson1_deserializeOpDocumentGetThemeOutput(v **GetThemeOutput, value return nil } -type awsRestjson1_deserializeOpListComponents struct { +type awsRestjson1_deserializeOpListCodegenJobs struct { } -func (*awsRestjson1_deserializeOpListComponents) ID() string { +func (*awsRestjson1_deserializeOpListCodegenJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListComponents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCodegenJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2054,9 +2210,9 @@ func (m *awsRestjson1_deserializeOpListComponents) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListComponents(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCodegenJobs(response, &metadata) } - output := &ListComponentsOutput{} + output := &ListCodegenJobsOutput{} out.Result = output var buff [1024]byte @@ -2077,7 +2233,7 @@ func (m *awsRestjson1_deserializeOpListComponents) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListComponentsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCodegenJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2090,7 +2246,7 @@ func (m *awsRestjson1_deserializeOpListComponents) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListComponents(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCodegenJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2137,6 +2293,9 @@ func awsRestjson1_deserializeOpErrorListComponents(response *smithyhttp.Response case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2147,7 +2306,7 @@ func awsRestjson1_deserializeOpErrorListComponents(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentListComponentsOutput(v **ListComponentsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCodegenJobsOutput(v **ListCodegenJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2160,9 +2319,9 @@ func awsRestjson1_deserializeOpDocumentListComponentsOutput(v **ListComponentsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListComponentsOutput + var sv *ListCodegenJobsOutput if *v == nil { - sv = &ListComponentsOutput{} + sv = &ListCodegenJobsOutput{} } else { sv = *v } @@ -2170,7 +2329,7 @@ func awsRestjson1_deserializeOpDocumentListComponentsOutput(v **ListComponentsOu for key, value := range shape { switch key { case "entities": - if err := awsRestjson1_deserializeDocumentComponentSummaryList(&sv.Entities, value); err != nil { + if err := awsRestjson1_deserializeDocumentCodegenJobSummaryList(&sv.Entities, value); err != nil { return err } @@ -2192,14 +2351,14 @@ func awsRestjson1_deserializeOpDocumentListComponentsOutput(v **ListComponentsOu return nil } -type awsRestjson1_deserializeOpListForms struct { +type awsRestjson1_deserializeOpListComponents struct { } -func (*awsRestjson1_deserializeOpListForms) ID() string { +func (*awsRestjson1_deserializeOpListComponents) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListForms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListComponents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2213,9 +2372,9 @@ func (m *awsRestjson1_deserializeOpListForms) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListForms(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListComponents(response, &metadata) } - output := &ListFormsOutput{} + output := &ListComponentsOutput{} out.Result = output var buff [1024]byte @@ -2236,7 +2395,7 @@ func (m *awsRestjson1_deserializeOpListForms) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFormsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListComponentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2249,7 +2408,7 @@ func (m *awsRestjson1_deserializeOpListForms) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListForms(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListComponents(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2306,7 +2465,7 @@ func awsRestjson1_deserializeOpErrorListForms(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentListFormsOutput(v **ListFormsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListComponentsOutput(v **ListComponentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2319,9 +2478,9 @@ func awsRestjson1_deserializeOpDocumentListFormsOutput(v **ListFormsOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFormsOutput + var sv *ListComponentsOutput if *v == nil { - sv = &ListFormsOutput{} + sv = &ListComponentsOutput{} } else { sv = *v } @@ -2329,7 +2488,7 @@ func awsRestjson1_deserializeOpDocumentListFormsOutput(v **ListFormsOutput, valu for key, value := range shape { switch key { case "entities": - if err := awsRestjson1_deserializeDocumentFormSummaryList(&sv.Entities, value); err != nil { + if err := awsRestjson1_deserializeDocumentComponentSummaryList(&sv.Entities, value); err != nil { return err } @@ -2351,14 +2510,14 @@ func awsRestjson1_deserializeOpDocumentListFormsOutput(v **ListFormsOutput, valu return nil } -type awsRestjson1_deserializeOpListThemes struct { +type awsRestjson1_deserializeOpListForms struct { } -func (*awsRestjson1_deserializeOpListThemes) ID() string { +func (*awsRestjson1_deserializeOpListForms) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListForms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2372,9 +2531,9 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListThemes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListForms(response, &metadata) } - output := &ListThemesOutput{} + output := &ListFormsOutput{} out.Result = output var buff [1024]byte @@ -2395,7 +2554,7 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListThemesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFormsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2408,7 +2567,7 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListForms(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2465,7 +2624,7 @@ func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFormsOutput(v **ListFormsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2478,9 +2637,9 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListThemesOutput + var sv *ListFormsOutput if *v == nil { - sv = &ListThemesOutput{} + sv = &ListFormsOutput{} } else { sv = *v } @@ -2488,7 +2647,7 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va for key, value := range shape { switch key { case "entities": - if err := awsRestjson1_deserializeDocumentThemeSummaryList(&sv.Entities, value); err != nil { + if err := awsRestjson1_deserializeDocumentFormSummaryList(&sv.Entities, value); err != nil { return err } @@ -2510,14 +2669,14 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va return nil } -type awsRestjson1_deserializeOpPutMetadataFlag struct { +type awsRestjson1_deserializeOpListThemes struct { } -func (*awsRestjson1_deserializeOpPutMetadataFlag) ID() string { +func (*awsRestjson1_deserializeOpListThemes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutMetadataFlag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2531,21 +2690,43 @@ func (m *awsRestjson1_deserializeOpPutMetadataFlag) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutMetadataFlag(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListThemes(response, &metadata) } - output := &PutMetadataFlagOutput{} + output := &ListThemesOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListThemesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutMetadataFlag(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2586,12 +2767,12 @@ func awsRestjson1_deserializeOpErrorPutMetadataFlag(response *smithyhttp.Respons } switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2602,14 +2783,151 @@ func awsRestjson1_deserializeOpErrorPutMetadataFlag(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpRefreshToken struct { -} - -func (*awsRestjson1_deserializeOpRefreshToken) ID() string { - return "OperationDeserializer" -} +func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } -func (m *awsRestjson1_deserializeOpRefreshToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListThemesOutput + if *v == nil { + sv = &ListThemesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entities": + if err := awsRestjson1_deserializeDocumentThemeSummaryList(&sv.Entities, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutMetadataFlag struct { +} + +func (*awsRestjson1_deserializeOpPutMetadataFlag) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutMetadataFlag) HandleDeserialize(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_deserializeOpErrorPutMetadataFlag(response, &metadata) + } + output := &PutMetadataFlagOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutMetadataFlag(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpRefreshToken struct { +} + +func (*awsRestjson1_deserializeOpRefreshToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRefreshToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2766,14 +3084,14 @@ func awsRestjson1_deserializeOpDocumentRefreshTokenOutput(v **RefreshTokenOutput return nil } -type awsRestjson1_deserializeOpUpdateComponent struct { +type awsRestjson1_deserializeOpStartCodegenJob struct { } -func (*awsRestjson1_deserializeOpUpdateComponent) ID() string { +func (*awsRestjson1_deserializeOpStartCodegenJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartCodegenJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2787,9 +3105,9 @@ func (m *awsRestjson1_deserializeOpUpdateComponent) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateComponent(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartCodegenJob(response, &metadata) } - output := &UpdateComponentOutput{} + output := &StartCodegenJobOutput{} out.Result = output var buff [1024]byte @@ -2810,7 +3128,7 @@ func (m *awsRestjson1_deserializeOpUpdateComponent) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeDocumentComponent(&output.Entity, shape) + err = awsRestjson1_deserializeDocumentCodegenJob(&output.Entity, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2823,7 +3141,7 @@ func (m *awsRestjson1_deserializeOpUpdateComponent) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartCodegenJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2870,8 +3188,8 @@ func awsRestjson1_deserializeOpErrorUpdateComponent(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -2883,7 +3201,7 @@ func awsRestjson1_deserializeOpErrorUpdateComponent(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentUpdateComponentOutput(v **UpdateComponentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartCodegenJobOutput(v **StartCodegenJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2896,9 +3214,9 @@ func awsRestjson1_deserializeOpDocumentUpdateComponentOutput(v **UpdateComponent return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateComponentOutput + var sv *StartCodegenJobOutput if *v == nil { - sv = &UpdateComponentOutput{} + sv = &StartCodegenJobOutput{} } else { sv = *v } @@ -2906,7 +3224,7 @@ func awsRestjson1_deserializeOpDocumentUpdateComponentOutput(v **UpdateComponent for key, value := range shape { switch key { case "entity": - if err := awsRestjson1_deserializeDocumentComponent(&sv.Entity, value); err != nil { + if err := awsRestjson1_deserializeDocumentCodegenJob(&sv.Entity, value); err != nil { return err } @@ -2919,14 +3237,14 @@ func awsRestjson1_deserializeOpDocumentUpdateComponentOutput(v **UpdateComponent return nil } -type awsRestjson1_deserializeOpUpdateForm struct { +type awsRestjson1_deserializeOpUpdateComponent struct { } -func (*awsRestjson1_deserializeOpUpdateForm) ID() string { +func (*awsRestjson1_deserializeOpUpdateComponent) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2940,9 +3258,9 @@ func (m *awsRestjson1_deserializeOpUpdateForm) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateForm(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateComponent(response, &metadata) } - output := &UpdateFormOutput{} + output := &UpdateComponentOutput{} out.Result = output var buff [1024]byte @@ -2963,7 +3281,7 @@ func (m *awsRestjson1_deserializeOpUpdateForm) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeDocumentForm(&output.Entity, shape) + err = awsRestjson1_deserializeDocumentComponent(&output.Entity, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2976,7 +3294,7 @@ func (m *awsRestjson1_deserializeOpUpdateForm) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3036,7 +3354,7 @@ func awsRestjson1_deserializeOpErrorUpdateForm(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentUpdateFormOutput(v **UpdateFormOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateComponentOutput(v **UpdateComponentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3049,9 +3367,9 @@ func awsRestjson1_deserializeOpDocumentUpdateFormOutput(v **UpdateFormOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFormOutput + var sv *UpdateComponentOutput if *v == nil { - sv = &UpdateFormOutput{} + sv = &UpdateComponentOutput{} } else { sv = *v } @@ -3059,7 +3377,7 @@ func awsRestjson1_deserializeOpDocumentUpdateFormOutput(v **UpdateFormOutput, va for key, value := range shape { switch key { case "entity": - if err := awsRestjson1_deserializeDocumentForm(&sv.Entity, value); err != nil { + if err := awsRestjson1_deserializeDocumentComponent(&sv.Entity, value); err != nil { return err } @@ -3072,14 +3390,14 @@ func awsRestjson1_deserializeOpDocumentUpdateFormOutput(v **UpdateFormOutput, va return nil } -type awsRestjson1_deserializeOpUpdateTheme struct { +type awsRestjson1_deserializeOpUpdateForm struct { } -func (*awsRestjson1_deserializeOpUpdateTheme) ID() string { +func (*awsRestjson1_deserializeOpUpdateForm) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateForm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3093,9 +3411,9 @@ func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTheme(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateForm(response, &metadata) } - output := &UpdateThemeOutput{} + output := &UpdateFormOutput{} out.Result = output var buff [1024]byte @@ -3116,7 +3434,7 @@ func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeDocumentTheme(&output.Entity, shape) + err = awsRestjson1_deserializeDocumentForm(&output.Entity, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3129,7 +3447,7 @@ func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateForm(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3189,7 +3507,7 @@ func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateFormOutput(v **UpdateFormOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3202,9 +3520,9 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateThemeOutput + var sv *UpdateFormOutput if *v == nil { - sv = &UpdateThemeOutput{} + sv = &UpdateFormOutput{} } else { sv = *v } @@ -3212,7 +3530,7 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, for key, value := range shape { switch key { case "entity": - if err := awsRestjson1_deserializeDocumentTheme(&sv.Entity, value); err != nil { + if err := awsRestjson1_deserializeDocumentForm(&sv.Entity, value); err != nil { return err } @@ -3225,12 +3543,37 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, return nil } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} +type awsRestjson1_deserializeOpUpdateTheme struct { +} + +func (*awsRestjson1_deserializeOpUpdateTheme) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(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_deserializeOpErrorUpdateTheme(response, &metadata) + } + output := &UpdateThemeOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -3241,28 +3584,156 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) - + err = awsRestjson1_deserializeDocumentTheme(&output.Entity, 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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidParameterException{} +func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateThemeOutput + if *v == nil { + sv = &UpdateThemeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entity": + if err := awsRestjson1_deserializeDocumentTheme(&sv.Entity, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidParameterException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3405,6 +3876,42 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy return output } +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + 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_deserializeDocumentThrottlingException(&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_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.UnauthorizedException{} var buff [1024]byte @@ -3424,24 +3931,1062 @@ func awsRestjson1_deserializeErrorUnauthorizedException(response *smithyhttp.Res return err } - err := awsRestjson1_deserializeDocumentUnauthorizedException(&output, shape) + err := awsRestjson1_deserializeDocumentUnauthorizedException(&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_deserializeDocumentActionParameters(v **types.ActionParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ActionParameters + if *v == nil { + sv = &types.ActionParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "anchor": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Anchor, value); err != nil { + return err + } + + case "fields": + if err := awsRestjson1_deserializeDocumentComponentProperties(&sv.Fields, value); err != nil { + return err + } + + case "global": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Global, value); err != nil { + return err + } + + case "id": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Id, value); err != nil { + return err + } + + case "model": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Model = ptr.String(jtv) + } + + case "state": + if err := awsRestjson1_deserializeDocumentMutationActionSetStateParameter(&sv.State, value); err != nil { + return err + } + + case "target": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Target, value); err != nil { + return err + } + + case "type": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Type, value); err != nil { + return err + } + + case "url": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Url, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAssociatedFieldsList(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 String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenFeatureFlags(v **types.CodegenFeatureFlags, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenFeatureFlags + if *v == nil { + sv = &types.CodegenFeatureFlags{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "isNonModelSupported": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsNonModelSupported = ptr.Bool(jtv) + } + + case "isRelationshipSupported": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsRelationshipSupported = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataEnum(v **types.CodegenGenericDataEnum, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenGenericDataEnum + if *v == nil { + sv = &types.CodegenGenericDataEnum{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "values": + if err := awsRestjson1_deserializeDocumentCodegenGenericDataEnumValuesList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataEnums(v *map[string]types.CodegenGenericDataEnum, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.CodegenGenericDataEnum + if *v == nil { + mv = map[string]types.CodegenGenericDataEnum{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.CodegenGenericDataEnum + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentCodegenGenericDataEnum(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataEnumValuesList(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 String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataField(v **types.CodegenGenericDataField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenGenericDataField + if *v == nil { + sv = &types.CodegenGenericDataField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodegenGenericDataFieldDataType to be of type string, got %T instead", value) + } + sv.DataType = types.CodegenGenericDataFieldDataType(jtv) + } + + case "dataTypeValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DataTypeValue = ptr.String(jtv) + } + + case "isArray": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArray = ptr.Bool(jtv) + } + + case "readOnly": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ReadOnly = ptr.Bool(jtv) + } + + case "relationship": + if err := awsRestjson1_deserializeDocumentCodegenGenericDataRelationshipType(&sv.Relationship, value); err != nil { + return err + } + + case "required": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Required = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataFields(v *map[string]types.CodegenGenericDataField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.CodegenGenericDataField + if *v == nil { + mv = map[string]types.CodegenGenericDataField{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.CodegenGenericDataField + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentCodegenGenericDataField(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataModel(v **types.CodegenGenericDataModel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenGenericDataModel + if *v == nil { + sv = &types.CodegenGenericDataModel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fields": + if err := awsRestjson1_deserializeDocumentCodegenGenericDataFields(&sv.Fields, value); err != nil { + return err + } + + case "isJoinTable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsJoinTable = ptr.Bool(jtv) + } + + case "primaryKeys": + if err := awsRestjson1_deserializeDocumentCodegenPrimaryKeysList(&sv.PrimaryKeys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataModels(v *map[string]types.CodegenGenericDataModel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.CodegenGenericDataModel + if *v == nil { + mv = map[string]types.CodegenGenericDataModel{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.CodegenGenericDataModel + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentCodegenGenericDataModel(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataNonModel(v **types.CodegenGenericDataNonModel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenGenericDataNonModel + if *v == nil { + sv = &types.CodegenGenericDataNonModel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fields": + if err := awsRestjson1_deserializeDocumentCodegenGenericDataNonModelFields(&sv.Fields, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataNonModelFields(v *map[string]types.CodegenGenericDataField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.CodegenGenericDataField + if *v == nil { + mv = map[string]types.CodegenGenericDataField{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.CodegenGenericDataField + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentCodegenGenericDataField(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataNonModels(v *map[string]types.CodegenGenericDataNonModel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.CodegenGenericDataNonModel + if *v == nil { + mv = map[string]types.CodegenGenericDataNonModel{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.CodegenGenericDataNonModel + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentCodegenGenericDataNonModel(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenGenericDataRelationshipType(v **types.CodegenGenericDataRelationshipType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenGenericDataRelationshipType + if *v == nil { + sv = &types.CodegenGenericDataRelationshipType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "associatedFields": + if err := awsRestjson1_deserializeDocumentAssociatedFieldsList(&sv.AssociatedFields, value); err != nil { + return err + } + + case "belongsToFieldOnRelatedModel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BelongsToFieldOnRelatedModel = ptr.String(jtv) + } + + case "canUnlinkAssociatedModel": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CanUnlinkAssociatedModel = ptr.Bool(jtv) + } + + case "isHasManyIndex": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsHasManyIndex = ptr.Bool(jtv) + } + + case "relatedJoinFieldName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RelatedJoinFieldName = ptr.String(jtv) + } + + case "relatedJoinTableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RelatedJoinTableName = ptr.String(jtv) + } + + case "relatedModelFields": + if err := awsRestjson1_deserializeDocumentRelatedModelFieldsList(&sv.RelatedModelFields, value); err != nil { + return err + } + + case "relatedModelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RelatedModelName = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericDataRelationshipType to be of type string, got %T instead", value) + } + sv.Type = types.GenericDataRelationshipType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenJob(v **types.CodegenJob, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenJob + if *v == nil { + sv = &types.CodegenJob{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppId to be of type string, got %T instead", value) + } + sv.AppId = ptr.String(jtv) + } + + case "asset": + if err := awsRestjson1_deserializeDocumentCodegenJobAsset(&sv.Asset, value); err != nil { + return err + } + + case "autoGenerateForms": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AutoGenerateForms = ptr.Bool(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "features": + if err := awsRestjson1_deserializeDocumentCodegenFeatureFlags(&sv.Features, value); err != nil { + return err + } + + case "genericDataSchema": + if err := awsRestjson1_deserializeDocumentCodegenJobGenericDataSchema(&sv.GenericDataSchema, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "renderConfig": + if err := awsRestjson1_deserializeDocumentCodegenJobRenderConfig(&sv.RenderConfig, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodegenJobStatus to be of type string, got %T instead", value) + } + sv.Status = types.CodegenJobStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenJobAsset(v **types.CodegenJobAsset, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenJobAsset + if *v == nil { + sv = &types.CodegenJobAsset{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "downloadUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DownloadUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenJobGenericDataSchema(v **types.CodegenJobGenericDataSchema, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenJobGenericDataSchema + if *v == nil { + sv = &types.CodegenJobGenericDataSchema{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dataSourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodegenJobGenericDataSourceType to be of type string, got %T instead", value) + } + sv.DataSourceType = types.CodegenJobGenericDataSourceType(jtv) + } + + case "enums": + if err := awsRestjson1_deserializeDocumentCodegenGenericDataEnums(&sv.Enums, value); err != nil { + return err + } + + case "models": + if err := awsRestjson1_deserializeDocumentCodegenGenericDataModels(&sv.Models, value); err != nil { + return err + } + + case "nonModels": + if err := awsRestjson1_deserializeDocumentCodegenGenericDataNonModels(&sv.NonModels, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenJobRenderConfig(v *types.CodegenJobRenderConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.CodegenJobRenderConfig +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "react": + var mv types.ReactStartCodegenJobData + destAddr := &mv + if err := awsRestjson1_deserializeDocumentReactStartCodegenJobData(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.CodegenJobRenderConfigMemberReact{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentCodegenJobSummary(v **types.CodegenJobSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodegenJobSummary + if *v == nil { + sv = &types.CodegenJobSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppId to be of type string, got %T instead", value) + } + sv.AppId = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + default: + _, _ = key, value - if err != nil { - var snapshot 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 + *v = sv + return nil } -func awsRestjson1_deserializeDocumentActionParameters(v **types.ActionParameters, value interface{}) error { +func awsRestjson1_deserializeDocumentCodegenJobSummaryList(v *[]types.CodegenJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3449,75 +4994,65 @@ func awsRestjson1_deserializeDocumentActionParameters(v **types.ActionParameters return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ActionParameters + var cv []types.CodegenJobSummary if *v == nil { - sv = &types.ActionParameters{} + cv = []types.CodegenJobSummary{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "anchor": - if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Anchor, value); err != nil { - return err - } - - case "fields": - if err := awsRestjson1_deserializeDocumentComponentProperties(&sv.Fields, value); err != nil { - return err - } - - case "global": - if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Global, value); err != nil { - return err - } - - case "id": - if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Id, value); err != nil { - return err - } + for _, value := range shape { + var col types.CodegenJobSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentCodegenJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - case "model": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Model = ptr.String(jtv) - } + } + *v = cv + return nil +} - case "state": - if err := awsRestjson1_deserializeDocumentMutationActionSetStateParameter(&sv.State, value); err != nil { - return err - } +func awsRestjson1_deserializeDocumentCodegenPrimaryKeysList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "target": - if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Target, value); err != nil { - return err - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "type": - if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Type, value); err != nil { - return err - } + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } - case "url": - if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Url, value); err != nil { - return err + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } @@ -6610,6 +8145,118 @@ func awsRestjson1_deserializeDocumentPredicateList(v *[]types.Predicate, value i return nil } +func awsRestjson1_deserializeDocumentReactStartCodegenJobData(v **types.ReactStartCodegenJobData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ReactStartCodegenJobData + if *v == nil { + sv = &types.ReactStartCodegenJobData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inlineSourceMap": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.InlineSourceMap = jtv + } + + case "module": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JSModule to be of type string, got %T instead", value) + } + sv.Module = types.JSModule(jtv) + } + + case "renderTypeDeclarations": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.RenderTypeDeclarations = jtv + } + + case "script": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JSScript to be of type string, got %T instead", value) + } + sv.Script = types.JSScript(jtv) + } + + case "target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JSTarget to be of type string, got %T instead", value) + } + sv.Target = types.JSTarget(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRelatedModelFieldsList(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 String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentResourceConflictException(v **types.ResourceConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7372,6 +9019,46 @@ func awsRestjson1_deserializeDocumentThemeValuesList(v *[]types.ThemeValues, val return nil } +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/amplifyuibuilder/generated.json b/service/amplifyuibuilder/generated.json index ff1f0543379..6f7e2397c11 100644 --- a/service/amplifyuibuilder/generated.json +++ b/service/amplifyuibuilder/generated.json @@ -18,15 +18,18 @@ "api_op_ExportComponents.go", "api_op_ExportForms.go", "api_op_ExportThemes.go", + "api_op_GetCodegenJob.go", "api_op_GetComponent.go", "api_op_GetForm.go", "api_op_GetMetadata.go", "api_op_GetTheme.go", + "api_op_ListCodegenJobs.go", "api_op_ListComponents.go", "api_op_ListForms.go", "api_op_ListThemes.go", "api_op_PutMetadataFlag.go", "api_op_RefreshToken.go", + "api_op_StartCodegenJob.go", "api_op_UpdateComponent.go", "api_op_UpdateForm.go", "api_op_UpdateTheme.go", diff --git a/service/amplifyuibuilder/serializers.go b/service/amplifyuibuilder/serializers.go index 5a5e652f4b2..6d3c13b134c 100644 --- a/service/amplifyuibuilder/serializers.go +++ b/service/amplifyuibuilder/serializers.go @@ -823,6 +823,82 @@ func awsRestjson1_serializeOpHttpBindingsExportThemesInput(v *ExportThemesInput, return nil } +type awsRestjson1_serializeOpGetCodegenJob struct { +} + +func (*awsRestjson1_serializeOpGetCodegenJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCodegenJob) 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.(*GetCodegenJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/codegen-jobs/{id}") + 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_serializeOpHttpBindingsGetCodegenJobInput(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_serializeOpHttpBindingsGetCodegenJobInput(v *GetCodegenJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetComponent struct { } @@ -1118,6 +1194,81 @@ func awsRestjson1_serializeOpHttpBindingsGetThemeInput(v *GetThemeInput, encoder return nil } +type awsRestjson1_serializeOpListCodegenJobs struct { +} + +func (*awsRestjson1_serializeOpListCodegenJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCodegenJobs) 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.(*ListCodegenJobsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/codegen-jobs") + 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_serializeOpHttpBindingsListCodegenJobsInput(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_serializeOpHttpBindingsListCodegenJobsInput(v *ListCodegenJobsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListComponents struct { } @@ -1525,6 +1676,101 @@ func awsRestjson1_serializeOpHttpBindingsRefreshTokenInput(v *RefreshTokenInput, return nil } +type awsRestjson1_serializeOpStartCodegenJob struct { +} + +func (*awsRestjson1_serializeOpStartCodegenJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartCodegenJob) 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.(*StartCodegenJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/codegen-jobs") + 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_serializeOpHttpBindingsStartCodegenJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.CodegenJobToCreate != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentStartCodegenJobData(input.CodegenJobToCreate, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); 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_serializeOpHttpBindingsStartCodegenJobInput(v *StartCodegenJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateComponent struct { } @@ -1699,33 +1945,351 @@ func awsRestjson1_serializeOpHttpBindingsUpdateFormInput(v *UpdateFormInput, enc return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AppId == nil || len(*v.AppId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} - } - if v.AppId != nil { - if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateTheme struct { +} + +func (*awsRestjson1_serializeOpUpdateTheme) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateTheme) 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.(*UpdateThemeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/themes/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + 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_serializeOpHttpBindingsUpdateThemeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.UpdatedTheme != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentUpdateThemeData(input.UpdatedTheme, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); 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_serializeOpHttpBindingsUpdateThemeInput(v *UpdateThemeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentActionParameters(v *types.ActionParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Anchor != nil { + ok := object.Key("anchor") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Anchor, ok); err != nil { + return err + } + } + + if v.Fields != nil { + ok := object.Key("fields") + if err := awsRestjson1_serializeDocumentComponentProperties(v.Fields, ok); err != nil { + return err + } + } + + if v.Global != nil { + ok := object.Key("global") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Global, ok); err != nil { + return err + } + } + + if v.Id != nil { + ok := object.Key("id") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Id, ok); err != nil { + return err + } + } + + if v.Model != nil { + ok := object.Key("model") + ok.String(*v.Model) + } + + if v.State != nil { + ok := object.Key("state") + if err := awsRestjson1_serializeDocumentMutationActionSetStateParameter(v.State, ok); err != nil { + return err + } + } + + if v.Target != nil { + ok := object.Key("target") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Target, ok); err != nil { + return err + } + } + + if v.Type != nil { + ok := object.Key("type") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Type, ok); err != nil { + return err + } + } + + if v.Url != nil { + ok := object.Key("url") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Url, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAssociatedFieldsList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentCodegenFeatureFlags(v *types.CodegenFeatureFlags, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IsNonModelSupported != nil { + ok := object.Key("isNonModelSupported") + ok.Boolean(*v.IsNonModelSupported) + } + + if v.IsRelationshipSupported != nil { + ok := object.Key("isRelationshipSupported") + ok.Boolean(*v.IsRelationshipSupported) + } + + return nil +} + +func awsRestjson1_serializeDocumentCodegenGenericDataEnum(v *types.CodegenGenericDataEnum, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Values != nil { + ok := object.Key("values") + if err := awsRestjson1_serializeDocumentCodegenGenericDataEnumValuesList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCodegenGenericDataEnums(v map[string]types.CodegenGenericDataEnum, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentCodegenGenericDataEnum(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentCodegenGenericDataEnumValuesList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentCodegenGenericDataField(v *types.CodegenGenericDataField, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DataType) > 0 { + ok := object.Key("dataType") + ok.String(string(v.DataType)) + } + + if v.DataTypeValue != nil { + ok := object.Key("dataTypeValue") + ok.String(*v.DataTypeValue) + } + + if v.IsArray != nil { + ok := object.Key("isArray") + ok.Boolean(*v.IsArray) + } + + if v.ReadOnly != nil { + ok := object.Key("readOnly") + ok.Boolean(*v.ReadOnly) + } + + if v.Relationship != nil { + ok := object.Key("relationship") + if err := awsRestjson1_serializeDocumentCodegenGenericDataRelationshipType(v.Relationship, ok); err != nil { + return err + } + } + + if v.Required != nil { + ok := object.Key("required") + ok.Boolean(*v.Required) + } + + return nil +} + +func awsRestjson1_serializeDocumentCodegenGenericDataFields(v map[string]types.CodegenGenericDataField, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentCodegenGenericDataField(&mapVar, om); err != nil { return err } } + return nil +} - if v.ClientToken != nil { - encoder.SetQuery("clientToken").String(*v.ClientToken) - } +func awsRestjson1_serializeDocumentCodegenGenericDataModel(v *types.CodegenGenericDataModel, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} - } - if v.EnvironmentName != nil { - if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + if v.Fields != nil { + ok := object.Key("fields") + if err := awsRestjson1_serializeDocumentCodegenGenericDataFields(v.Fields, ok); err != nil { return err } } - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + if v.IsJoinTable != nil { + ok := object.Key("isJoinTable") + ok.Boolean(*v.IsJoinTable) } - if v.Id != nil { - if err := encoder.SetURI("id").String(*v.Id); err != nil { + + if v.PrimaryKeys != nil { + ok := object.Key("primaryKeys") + if err := awsRestjson1_serializeDocumentCodegenPrimaryKeysList(v.PrimaryKeys, ok); err != nil { return err } } @@ -1733,175 +2297,177 @@ func awsRestjson1_serializeOpHttpBindingsUpdateFormInput(v *UpdateFormInput, enc return nil } -type awsRestjson1_serializeOpUpdateTheme struct { -} +func awsRestjson1_serializeDocumentCodegenGenericDataModels(v map[string]types.CodegenGenericDataModel, value smithyjson.Value) error { + object := value.Object() + defer object.Close() -func (*awsRestjson1_serializeOpUpdateTheme) ID() string { - return "OperationSerializer" + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentCodegenGenericDataModel(&mapVar, om); err != nil { + return err + } + } + return nil } -func (m *awsRestjson1_serializeOpUpdateTheme) 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)} - } +func awsRestjson1_serializeDocumentCodegenGenericDataNonModel(v *types.CodegenGenericDataNonModel, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - input, ok := in.Parameters.(*UpdateThemeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + if v.Fields != nil { + ok := object.Key("fields") + if err := awsRestjson1_serializeDocumentCodegenGenericDataNonModelFields(v.Fields, ok); err != nil { + return err + } } - opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/themes/{id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PATCH" - restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } + return nil +} - if err := awsRestjson1_serializeOpHttpBindingsUpdateThemeInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } +func awsRestjson1_serializeDocumentCodegenGenericDataNonModelFields(v map[string]types.CodegenGenericDataField, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - if !restEncoder.HasHeader("Content-Type") { - ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) - restEncoder.SetHeader("Content-Type").String("application/json") + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentCodegenGenericDataField(&mapVar, om); err != nil { + return err + } } + return nil +} - if input.UpdatedTheme != nil { - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeDocumentUpdateThemeData(input.UpdatedTheme, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - payload := bytes.NewReader(jsonEncoder.Bytes()) - if request, err = request.SetStream(payload); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - } else { - jsonEncoder := smithyjson.NewEncoder() - jsonEncoder.Value.Object().Close() - payload := bytes.NewReader(jsonEncoder.Bytes()) - if request, err = request.SetStream(payload); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } +func awsRestjson1_serializeDocumentCodegenGenericDataNonModels(v map[string]types.CodegenGenericDataNonModel, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentCodegenGenericDataNonModel(&mapVar, om); err != nil { + return err + } } + return nil +} - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} +func awsRestjson1_serializeDocumentCodegenGenericDataRelationshipType(v *types.CodegenGenericDataRelationshipType, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociatedFields != nil { + ok := object.Key("associatedFields") + if err := awsRestjson1_serializeDocumentAssociatedFieldsList(v.AssociatedFields, ok); err != nil { + return err + } } - in.Request = request - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateThemeInput(v *UpdateThemeInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) + if v.BelongsToFieldOnRelatedModel != nil { + ok := object.Key("belongsToFieldOnRelatedModel") + ok.String(*v.BelongsToFieldOnRelatedModel) } - if v.AppId == nil || len(*v.AppId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + if v.CanUnlinkAssociatedModel != nil { + ok := object.Key("canUnlinkAssociatedModel") + ok.Boolean(*v.CanUnlinkAssociatedModel) } - if v.AppId != nil { - if err := encoder.SetURI("appId").String(*v.AppId); err != nil { - return err - } + + if v.IsHasManyIndex != nil { + ok := object.Key("isHasManyIndex") + ok.Boolean(*v.IsHasManyIndex) } - if v.ClientToken != nil { - encoder.SetQuery("clientToken").String(*v.ClientToken) + if v.RelatedJoinFieldName != nil { + ok := object.Key("relatedJoinFieldName") + ok.String(*v.RelatedJoinFieldName) } - if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + if v.RelatedJoinTableName != nil { + ok := object.Key("relatedJoinTableName") + ok.String(*v.RelatedJoinTableName) } - if v.EnvironmentName != nil { - if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + + if v.RelatedModelFields != nil { + ok := object.Key("relatedModelFields") + if err := awsRestjson1_serializeDocumentRelatedModelFieldsList(v.RelatedModelFields, ok); err != nil { return err } } - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + if v.RelatedModelName != nil { + ok := object.Key("relatedModelName") + ok.String(*v.RelatedModelName) } - if v.Id != nil { - if err := encoder.SetURI("id").String(*v.Id); err != nil { - return err - } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) } return nil } -func awsRestjson1_serializeDocumentActionParameters(v *types.ActionParameters, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentCodegenJobGenericDataSchema(v *types.CodegenJobGenericDataSchema, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Anchor != nil { - ok := object.Key("anchor") - if err := awsRestjson1_serializeDocumentComponentProperty(v.Anchor, ok); err != nil { - return err - } + if len(v.DataSourceType) > 0 { + ok := object.Key("dataSourceType") + ok.String(string(v.DataSourceType)) } - if v.Fields != nil { - ok := object.Key("fields") - if err := awsRestjson1_serializeDocumentComponentProperties(v.Fields, ok); err != nil { + if v.Enums != nil { + ok := object.Key("enums") + if err := awsRestjson1_serializeDocumentCodegenGenericDataEnums(v.Enums, ok); err != nil { return err } } - if v.Global != nil { - ok := object.Key("global") - if err := awsRestjson1_serializeDocumentComponentProperty(v.Global, ok); err != nil { + if v.Models != nil { + ok := object.Key("models") + if err := awsRestjson1_serializeDocumentCodegenGenericDataModels(v.Models, ok); err != nil { return err } } - if v.Id != nil { - ok := object.Key("id") - if err := awsRestjson1_serializeDocumentComponentProperty(v.Id, ok); err != nil { + if v.NonModels != nil { + ok := object.Key("nonModels") + if err := awsRestjson1_serializeDocumentCodegenGenericDataNonModels(v.NonModels, ok); err != nil { return err } } - if v.Model != nil { - ok := object.Key("model") - ok.String(*v.Model) - } + return nil +} - if v.State != nil { - ok := object.Key("state") - if err := awsRestjson1_serializeDocumentMutationActionSetStateParameter(v.State, ok); err != nil { - return err - } - } +func awsRestjson1_serializeDocumentCodegenJobRenderConfig(v types.CodegenJobRenderConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - if v.Target != nil { - ok := object.Key("target") - if err := awsRestjson1_serializeDocumentComponentProperty(v.Target, ok); err != nil { + switch uv := v.(type) { + case *types.CodegenJobRenderConfigMemberReact: + av := object.Key("react") + if err := awsRestjson1_serializeDocumentReactStartCodegenJobData(&uv.Value, av); err != nil { return err } - } - if v.Type != nil { - ok := object.Key("type") - if err := awsRestjson1_serializeDocumentComponentProperty(v.Type, ok); err != nil { - return err - } - } + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) - if v.Url != nil { - ok := object.Key("url") - if err := awsRestjson1_serializeDocumentComponentProperty(v.Url, ok); err != nil { - return err - } } + return nil +} + +func awsRestjson1_serializeDocumentCodegenPrimaryKeysList(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 } @@ -3236,6 +3802,38 @@ func awsRestjson1_serializeDocumentPutMetadataFlagBody(v *types.PutMetadataFlagB return nil } +func awsRestjson1_serializeDocumentReactStartCodegenJobData(v *types.ReactStartCodegenJobData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InlineSourceMap { + ok := object.Key("inlineSourceMap") + ok.Boolean(v.InlineSourceMap) + } + + if len(v.Module) > 0 { + ok := object.Key("module") + ok.String(string(v.Module)) + } + + if v.RenderTypeDeclarations { + ok := object.Key("renderTypeDeclarations") + ok.Boolean(v.RenderTypeDeclarations) + } + + if len(v.Script) > 0 { + ok := object.Key("script") + ok.String(string(v.Script)) + } + + if len(v.Target) > 0 { + ok := object.Key("target") + ok.String(string(v.Target)) + } + + return nil +} + func awsRestjson1_serializeDocumentRefreshTokenRequestBody(v *types.RefreshTokenRequestBody, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3253,6 +3851,17 @@ func awsRestjson1_serializeDocumentRefreshTokenRequestBody(v *types.RefreshToken return nil } +func awsRestjson1_serializeDocumentRelatedModelFieldsList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentSectionalElement(v *types.SectionalElement, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3336,6 +3945,46 @@ func awsRestjson1_serializeDocumentSortPropertyList(v []types.SortProperty, valu return nil } +func awsRestjson1_serializeDocumentStartCodegenJobData(v *types.StartCodegenJobData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutoGenerateForms != nil { + ok := object.Key("autoGenerateForms") + ok.Boolean(*v.AutoGenerateForms) + } + + if v.Features != nil { + ok := object.Key("features") + if err := awsRestjson1_serializeDocumentCodegenFeatureFlags(v.Features, ok); err != nil { + return err + } + } + + if v.GenericDataSchema != nil { + ok := object.Key("genericDataSchema") + if err := awsRestjson1_serializeDocumentCodegenJobGenericDataSchema(v.GenericDataSchema, ok); err != nil { + return err + } + } + + if v.RenderConfig != nil { + ok := object.Key("renderConfig") + if err := awsRestjson1_serializeDocumentCodegenJobRenderConfig(v.RenderConfig, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentStrValues(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/amplifyuibuilder/types/enums.go b/service/amplifyuibuilder/types/enums.go index db6acfbf149..f4d75f0200f 100644 --- a/service/amplifyuibuilder/types/enums.go +++ b/service/amplifyuibuilder/types/enums.go @@ -2,6 +2,92 @@ package types +type CodegenGenericDataFieldDataType string + +// Enum values for CodegenGenericDataFieldDataType +const ( + CodegenGenericDataFieldDataTypeId CodegenGenericDataFieldDataType = "ID" + CodegenGenericDataFieldDataTypeString CodegenGenericDataFieldDataType = "String" + CodegenGenericDataFieldDataTypeInt CodegenGenericDataFieldDataType = "Int" + CodegenGenericDataFieldDataTypeFloat CodegenGenericDataFieldDataType = "Float" + CodegenGenericDataFieldDataTypeAwsDate CodegenGenericDataFieldDataType = "AWSDate" + CodegenGenericDataFieldDataTypeAwsTime CodegenGenericDataFieldDataType = "AWSTime" + CodegenGenericDataFieldDataTypeAwsDateTime CodegenGenericDataFieldDataType = "AWSDateTime" + CodegenGenericDataFieldDataTypeAwsTimestamp CodegenGenericDataFieldDataType = "AWSTimestamp" + CodegenGenericDataFieldDataTypeAwsEmail CodegenGenericDataFieldDataType = "AWSEmail" + CodegenGenericDataFieldDataTypeAwsUrl CodegenGenericDataFieldDataType = "AWSURL" + CodegenGenericDataFieldDataTypeAwsIpAddress CodegenGenericDataFieldDataType = "AWSIPAddress" + CodegenGenericDataFieldDataTypeBoolean CodegenGenericDataFieldDataType = "Boolean" + CodegenGenericDataFieldDataTypeAwsJson CodegenGenericDataFieldDataType = "AWSJSON" + CodegenGenericDataFieldDataTypeAwsPhone CodegenGenericDataFieldDataType = "AWSPhone" + CodegenGenericDataFieldDataTypeEnum CodegenGenericDataFieldDataType = "Enum" + CodegenGenericDataFieldDataTypeModel CodegenGenericDataFieldDataType = "Model" + CodegenGenericDataFieldDataTypeNonModel CodegenGenericDataFieldDataType = "NonModel" +) + +// Values returns all known values for CodegenGenericDataFieldDataType. 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 (CodegenGenericDataFieldDataType) Values() []CodegenGenericDataFieldDataType { + return []CodegenGenericDataFieldDataType{ + "ID", + "String", + "Int", + "Float", + "AWSDate", + "AWSTime", + "AWSDateTime", + "AWSTimestamp", + "AWSEmail", + "AWSURL", + "AWSIPAddress", + "Boolean", + "AWSJSON", + "AWSPhone", + "Enum", + "Model", + "NonModel", + } +} + +type CodegenJobGenericDataSourceType string + +// Enum values for CodegenJobGenericDataSourceType +const ( + CodegenJobGenericDataSourceTypeDataStore CodegenJobGenericDataSourceType = "DataStore" +) + +// Values returns all known values for CodegenJobGenericDataSourceType. 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 (CodegenJobGenericDataSourceType) Values() []CodegenJobGenericDataSourceType { + return []CodegenJobGenericDataSourceType{ + "DataStore", + } +} + +type CodegenJobStatus string + +// Enum values for CodegenJobStatus +const ( + CodegenJobStatusInProgress CodegenJobStatus = "in_progress" + CodegenJobStatusFailed CodegenJobStatus = "failed" + CodegenJobStatusSucceeded CodegenJobStatus = "succeeded" +) + +// Values returns all known values for CodegenJobStatus. 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 (CodegenJobStatus) Values() []CodegenJobStatus { + return []CodegenJobStatus{ + "in_progress", + "failed", + "succeeded", + } +} + type FixedPosition string // Enum values for FixedPosition @@ -76,6 +162,82 @@ func (FormDataSourceType) Values() []FormDataSourceType { } } +type GenericDataRelationshipType string + +// Enum values for GenericDataRelationshipType +const ( + GenericDataRelationshipTypeHasMany GenericDataRelationshipType = "HAS_MANY" + GenericDataRelationshipTypeHasOne GenericDataRelationshipType = "HAS_ONE" + GenericDataRelationshipTypeBelongsTo GenericDataRelationshipType = "BELONGS_TO" +) + +// Values returns all known values for GenericDataRelationshipType. 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 (GenericDataRelationshipType) Values() []GenericDataRelationshipType { + return []GenericDataRelationshipType{ + "HAS_MANY", + "HAS_ONE", + "BELONGS_TO", + } +} + +type JSModule string + +// Enum values for JSModule +const ( + JSModuleEs2020 JSModule = "es2020" + JSModuleEsnext JSModule = "esnext" +) + +// Values returns all known values for JSModule. 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 (JSModule) Values() []JSModule { + return []JSModule{ + "es2020", + "esnext", + } +} + +type JSScript string + +// Enum values for JSScript +const ( + JSScriptJsx JSScript = "jsx" + JSScriptTsx JSScript = "tsx" + JSScriptJs JSScript = "js" +) + +// Values returns all known values for JSScript. 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 (JSScript) Values() []JSScript { + return []JSScript{ + "jsx", + "tsx", + "js", + } +} + +type JSTarget string + +// Enum values for JSTarget +const ( + JSTargetEs2015 JSTarget = "es2015" + JSTargetEs2020 JSTarget = "es2020" +) + +// Values returns all known values for JSTarget. 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 (JSTarget) Values() []JSTarget { + return []JSTarget{ + "es2015", + "es2020", + } +} + type LabelDecorator string // Enum values for LabelDecorator diff --git a/service/amplifyuibuilder/types/errors.go b/service/amplifyuibuilder/types/errors.go index 60df53d4a6c..228c7ae5cd5 100644 --- a/service/amplifyuibuilder/types/errors.go +++ b/service/amplifyuibuilder/types/errors.go @@ -139,6 +139,32 @@ func (e *ServiceQuotaExceededException) ErrorCode() string { } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request was denied due to request throttling. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // You don't have permission to perform this operation. type UnauthorizedException struct { Message *string diff --git a/service/amplifyuibuilder/types/types.go b/service/amplifyuibuilder/types/types.go index b8ffae0440b..d35d216de67 100644 --- a/service/amplifyuibuilder/types/types.go +++ b/service/amplifyuibuilder/types/types.go @@ -49,6 +49,266 @@ type ActionParameters struct { noSmithyDocumentSerde } +// Describes the feature flags that you can specify for a code generation job. +type CodegenFeatureFlags struct { + + // Specifies whether a code generation job supports non models. + IsNonModelSupported *bool + + // Specifes whether a code generation job supports data relationships. + IsRelationshipSupported *bool + + noSmithyDocumentSerde +} + +// Describes the enums in a generic data schema. +type CodegenGenericDataEnum struct { + + // The list of enum values in the generic data schema. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Describes a field in a generic data schema. +type CodegenGenericDataField struct { + + // The data type for the generic data field. + // + // This member is required. + DataType CodegenGenericDataFieldDataType + + // The value of the data type for the generic data field. + // + // This member is required. + DataTypeValue *string + + // Specifies whether the generic data field is an array. + // + // This member is required. + IsArray *bool + + // Specifies whether the generic data field is read-only. + // + // This member is required. + ReadOnly *bool + + // Specifies whether the generic data field is required. + // + // This member is required. + Required *bool + + // The relationship of the generic data schema. + Relationship *CodegenGenericDataRelationshipType + + noSmithyDocumentSerde +} + +// Describes a model in a generic data schema. +type CodegenGenericDataModel struct { + + // The fields in the generic data model. + // + // This member is required. + Fields map[string]CodegenGenericDataField + + // The primary keys of the generic data model. + // + // This member is required. + PrimaryKeys []string + + // Specifies whether the generic data model is a join table. + IsJoinTable *bool + + noSmithyDocumentSerde +} + +// Describes a non-model in a generic data schema. +type CodegenGenericDataNonModel struct { + + // The fields in a generic data schema non model. + // + // This member is required. + Fields map[string]CodegenGenericDataField + + noSmithyDocumentSerde +} + +// Describes the relationship between generic data models. +type CodegenGenericDataRelationshipType struct { + + // The name of the related model in the data relationship. + // + // This member is required. + RelatedModelName *string + + // The data relationship type. + // + // This member is required. + Type GenericDataRelationshipType + + // The associated fields of the data relationship. + AssociatedFields []string + + // The value of the belongsTo field on the related data model. + BelongsToFieldOnRelatedModel *string + + // Specifies whether the relationship can unlink the associated model. + CanUnlinkAssociatedModel *bool + + // Specifies whether the @index directive is supported for a hasMany data + // relationship. + IsHasManyIndex *bool + + // The name of the related join field in the data relationship. + RelatedJoinFieldName *string + + // The name of the related join table in the data relationship. + RelatedJoinTableName *string + + // The related model fields in the data relationship. + RelatedModelFields []string + + noSmithyDocumentSerde +} + +// Describes the configuration for a code generation job that is associated with +// an Amplify app. +type CodegenJob struct { + + // The ID of the Amplify app associated with the code generation job. + // + // This member is required. + AppId *string + + // The name of the backend environment associated with the code generation job. + // + // This member is required. + EnvironmentName *string + + // The unique ID for the code generation job. + // + // This member is required. + Id *string + + // The CodegenJobAsset to use for the code generation job. + Asset *CodegenJobAsset + + // Specifies whether to autogenerate forms in the code generation job. + AutoGenerateForms *bool + + // The time that the code generation job was created. + CreatedAt *time.Time + + // Describes the feature flags that you can specify for a code generation job. + Features *CodegenFeatureFlags + + // Describes the data schema for a code generation job. + GenericDataSchema *CodegenJobGenericDataSchema + + // The time that the code generation job was modified. + ModifiedAt *time.Time + + // Describes the configuration information for rendering the UI component + // associated the code generation job. + RenderConfig CodegenJobRenderConfig + + // The status of the code generation job. + Status CodegenJobStatus + + // The customized status message for the code generation job. + StatusMessage *string + + // One or more key-value pairs to use when tagging the code generation job. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Describes an asset for a code generation job. +type CodegenJobAsset struct { + + // The URL to use to access the asset. + DownloadUrl *string + + noSmithyDocumentSerde +} + +// Describes the data schema for a code generation job. +type CodegenJobGenericDataSchema struct { + + // The type of the data source for the schema. Currently, the only valid value is + // an Amplify DataStore . + // + // This member is required. + DataSourceType CodegenJobGenericDataSourceType + + // The name of a CodegenGenericDataEnum . + // + // This member is required. + Enums map[string]CodegenGenericDataEnum + + // The name of a CodegenGenericDataModel . + // + // This member is required. + Models map[string]CodegenGenericDataModel + + // The name of a CodegenGenericDataNonModel . + // + // This member is required. + NonModels map[string]CodegenGenericDataNonModel + + noSmithyDocumentSerde +} + +// Describes the configuration information for rendering the UI component +// associated the code generation job. +// +// The following types satisfy this interface: +// +// CodegenJobRenderConfigMemberReact +type CodegenJobRenderConfig interface { + isCodegenJobRenderConfig() +} + +// The name of the ReactStartCodegenJobData object. +type CodegenJobRenderConfigMemberReact struct { + Value ReactStartCodegenJobData + + noSmithyDocumentSerde +} + +func (*CodegenJobRenderConfigMemberReact) isCodegenJobRenderConfig() {} + +// A summary of the basic information about the code generation job. +type CodegenJobSummary struct { + + // The unique ID of the Amplify app associated with the code generation job. + // + // This member is required. + AppId *string + + // The name of the backend environment associated with the code generation job. + // + // This member is required. + EnvironmentName *string + + // The unique ID for the code generation job summary. + // + // This member is required. + Id *string + + // The time that the code generation job summary was created. + CreatedAt *time.Time + + // The time that the code generation job summary was modified. + ModifiedAt *time.Time + + noSmithyDocumentSerde +} + // Contains the configuration settings for a user interface (UI) element for an // Amplify app. A component is configured as a primary, stand-alone UI element. Use // ComponentChild to configure an instance of a Component . A ComponentChild @@ -1070,6 +1330,27 @@ type PutMetadataFlagBody struct { noSmithyDocumentSerde } +// Describes the code generation job configuration for a React project. +type ReactStartCodegenJobData struct { + + // Specifies whether the code generation job should render inline source maps. + InlineSourceMap bool + + // The JavaScript module type. + Module JSModule + + // Specifies whether the code generation job should render type declaration files. + RenderTypeDeclarations bool + + // The file type to use for a JavaScript project. + Script JSScript + + // The ECMAScript specification to use. + Target JSTarget + + noSmithyDocumentSerde +} + // Describes a refresh token. type RefreshTokenRequestBody struct { @@ -1132,6 +1413,29 @@ type SortProperty struct { noSmithyDocumentSerde } +// The code generation job resource configuration. +type StartCodegenJobData struct { + + // The code generation configuration for the codegen job. + // + // This member is required. + RenderConfig CodegenJobRenderConfig + + // Specifies whether to autogenerate forms in the code generation job. + AutoGenerateForms *bool + + // The feature flags for a code generation job. + Features *CodegenFeatureFlags + + // The data schema to use for a code generation job. + GenericDataSchema *CodegenJobGenericDataSchema + + // One or more key-value pairs to use when tagging the code generation job data. + Tags map[string]string + + noSmithyDocumentSerde +} + // A theme is a collection of style settings that apply globally to the components // associated with an Amplify application. type Theme struct { @@ -1368,5 +1672,6 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isFieldPosition() {} -func (*UnknownUnionMember) isFormStyleConfig() {} +func (*UnknownUnionMember) isCodegenJobRenderConfig() {} +func (*UnknownUnionMember) isFieldPosition() {} +func (*UnknownUnionMember) isFormStyleConfig() {} diff --git a/service/amplifyuibuilder/types/types_exported_test.go b/service/amplifyuibuilder/types/types_exported_test.go index bafbd130dc1..7e31d886f4c 100644 --- a/service/amplifyuibuilder/types/types_exported_test.go +++ b/service/amplifyuibuilder/types/types_exported_test.go @@ -7,6 +7,24 @@ import ( "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" ) +func ExampleCodegenJobRenderConfig_outputUsage() { + var union types.CodegenJobRenderConfig + // type switches can be used to check the union value + switch v := union.(type) { + case *types.CodegenJobRenderConfigMemberReact: + _ = v.Value // Value is types.ReactStartCodegenJobData + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.ReactStartCodegenJobData + func ExampleFieldPosition_outputUsage() { var union types.FieldPosition // type switches can be used to check the union value diff --git a/service/amplifyuibuilder/validators.go b/service/amplifyuibuilder/validators.go index bb213ce13f4..9a8b443c082 100644 --- a/service/amplifyuibuilder/validators.go +++ b/service/amplifyuibuilder/validators.go @@ -210,6 +210,26 @@ func (m *validateOpExportThemes) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpGetCodegenJob struct { +} + +func (*validateOpGetCodegenJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCodegenJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCodegenJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCodegenJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetComponent struct { } @@ -290,6 +310,26 @@ func (m *validateOpGetTheme) HandleInitialize(ctx context.Context, in middleware return next.HandleInitialize(ctx, in) } +type validateOpListCodegenJobs struct { +} + +func (*validateOpListCodegenJobs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCodegenJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCodegenJobsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCodegenJobsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListComponents struct { } @@ -390,6 +430,26 @@ func (m *validateOpRefreshToken) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpStartCodegenJob struct { +} + +func (*validateOpStartCodegenJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartCodegenJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartCodegenJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartCodegenJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateComponent struct { } @@ -490,6 +550,10 @@ func addOpExportThemesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpExportThemes{}, middleware.After) } +func addOpGetCodegenJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCodegenJob{}, middleware.After) +} + func addOpGetComponentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetComponent{}, middleware.After) } @@ -506,6 +570,10 @@ func addOpGetThemeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTheme{}, middleware.After) } +func addOpListCodegenJobsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCodegenJobs{}, middleware.After) +} + func addOpListComponentsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListComponents{}, middleware.After) } @@ -526,6 +594,10 @@ func addOpRefreshTokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRefreshToken{}, middleware.After) } +func addOpStartCodegenJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartCodegenJob{}, middleware.After) +} + func addOpUpdateComponentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateComponent{}, middleware.After) } @@ -590,6 +662,238 @@ func validateActionParameters(v *types.ActionParameters) error { } } +func validateCodegenGenericDataEnum(v *types.CodegenGenericDataEnum) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataEnum"} + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataEnums(v map[string]types.CodegenGenericDataEnum) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataEnums"} + for key := range v { + value := v[key] + if err := validateCodegenGenericDataEnum(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataField(v *types.CodegenGenericDataField) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataField"} + if len(v.DataType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DataType")) + } + if v.DataTypeValue == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataTypeValue")) + } + if v.Required == nil { + invalidParams.Add(smithy.NewErrParamRequired("Required")) + } + if v.ReadOnly == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReadOnly")) + } + if v.IsArray == nil { + invalidParams.Add(smithy.NewErrParamRequired("IsArray")) + } + if v.Relationship != nil { + if err := validateCodegenGenericDataRelationshipType(v.Relationship); err != nil { + invalidParams.AddNested("Relationship", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataFields(v map[string]types.CodegenGenericDataField) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataFields"} + for key := range v { + value := v[key] + if err := validateCodegenGenericDataField(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataModel(v *types.CodegenGenericDataModel) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataModel"} + if v.Fields == nil { + invalidParams.Add(smithy.NewErrParamRequired("Fields")) + } else if v.Fields != nil { + if err := validateCodegenGenericDataFields(v.Fields); err != nil { + invalidParams.AddNested("Fields", err.(smithy.InvalidParamsError)) + } + } + if v.PrimaryKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrimaryKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataModels(v map[string]types.CodegenGenericDataModel) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataModels"} + for key := range v { + value := v[key] + if err := validateCodegenGenericDataModel(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataNonModel(v *types.CodegenGenericDataNonModel) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataNonModel"} + if v.Fields == nil { + invalidParams.Add(smithy.NewErrParamRequired("Fields")) + } else if v.Fields != nil { + if err := validateCodegenGenericDataNonModelFields(v.Fields); err != nil { + invalidParams.AddNested("Fields", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataNonModelFields(v map[string]types.CodegenGenericDataField) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataNonModelFields"} + for key := range v { + value := v[key] + if err := validateCodegenGenericDataField(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataNonModels(v map[string]types.CodegenGenericDataNonModel) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataNonModels"} + for key := range v { + value := v[key] + if err := validateCodegenGenericDataNonModel(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenGenericDataRelationshipType(v *types.CodegenGenericDataRelationshipType) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenGenericDataRelationshipType"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.RelatedModelName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedModelName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCodegenJobGenericDataSchema(v *types.CodegenJobGenericDataSchema) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CodegenJobGenericDataSchema"} + if len(v.DataSourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DataSourceType")) + } + if v.Models == nil { + invalidParams.Add(smithy.NewErrParamRequired("Models")) + } else if v.Models != nil { + if err := validateCodegenGenericDataModels(v.Models); err != nil { + invalidParams.AddNested("Models", err.(smithy.InvalidParamsError)) + } + } + if v.Enums == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enums")) + } else if v.Enums != nil { + if err := validateCodegenGenericDataEnums(v.Enums); err != nil { + invalidParams.AddNested("Enums", err.(smithy.InvalidParamsError)) + } + } + if v.NonModels == nil { + invalidParams.Add(smithy.NewErrParamRequired("NonModels")) + } else if v.NonModels != nil { + if err := validateCodegenGenericDataNonModels(v.NonModels); err != nil { + invalidParams.AddNested("NonModels", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateComponentChild(v *types.ComponentChild) error { if v == nil { return nil @@ -1283,6 +1587,26 @@ func validateSortPropertyList(v []types.SortProperty) error { } } +func validateStartCodegenJobData(v *types.StartCodegenJobData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartCodegenJobData"} + if v.RenderConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("RenderConfig")) + } + if v.GenericDataSchema != nil { + if err := validateCodegenJobGenericDataSchema(v.GenericDataSchema); err != nil { + invalidParams.AddNested("GenericDataSchema", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateUpdateComponentData(v *types.UpdateComponentData) error { if v == nil { return nil @@ -1648,6 +1972,27 @@ func validateOpExportThemesInput(v *ExportThemesInput) error { } } +func validateOpGetCodegenJobInput(v *GetCodegenJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCodegenJobInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetComponentInput(v *GetComponentInput) error { if v == nil { return nil @@ -1729,6 +2074,24 @@ func validateOpGetThemeInput(v *GetThemeInput) error { } } +func validateOpListCodegenJobsInput(v *ListCodegenJobsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCodegenJobsInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListComponentsInput(v *ListComponentsInput) error { if v == nil { return nil @@ -1833,6 +2196,31 @@ func validateOpRefreshTokenInput(v *RefreshTokenInput) error { } } +func validateOpStartCodegenJobInput(v *StartCodegenJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartCodegenJobInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.CodegenJobToCreate == nil { + invalidParams.Add(smithy.NewErrParamRequired("CodegenJobToCreate")) + } else if v.CodegenJobToCreate != nil { + if err := validateStartCodegenJobData(v.CodegenJobToCreate); err != nil { + invalidParams.AddNested("CodegenJobToCreate", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateComponentInput(v *UpdateComponentInput) error { if v == nil { return nil diff --git a/service/dlm/internal/endpoints/endpoints.go b/service/dlm/internal/endpoints/endpoints.go index 6ff1e6f0e3a..dc2b23b94b2 100644 --- a/service/dlm/internal/endpoints/endpoints.go +++ b/service/dlm/internal/endpoints/endpoints.go @@ -280,6 +280,14 @@ var defaultPartitions = endpoints.Partitions{ }, 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", diff --git a/service/dynamodb/api_op_BatchGetItem.go b/service/dynamodb/api_op_BatchGetItem.go index e42ec45f7c5..cfeb72ac201 100644 --- a/service/dynamodb/api_op_BatchGetItem.go +++ b/service/dynamodb/api_op_BatchGetItem.go @@ -17,28 +17,28 @@ import ( // or more tables. You identify requested items by primary key. A single operation // can retrieve up to 16 MB of data, which can contain as many as 100 items. // BatchGetItem returns a partial result if the response size limit is exceeded, -// the table's provisioned throughput is exceeded, or an internal processing -// failure occurs. If a partial result is returned, the operation returns a value -// for UnprocessedKeys . You can use this value to retry the operation starting -// with the next item to get. If you request more than 100 items, BatchGetItem -// returns a ValidationException with the message "Too many items requested for -// the BatchGetItem call." For example, if you ask to retrieve 100 items, but each -// individual item is 300 KB in size, the system returns 52 items (so as not to -// exceed the 16 MB limit). It also returns an appropriate UnprocessedKeys value -// so you can get the next page of results. If desired, your application can -// include its own logic to assemble the pages of results into one dataset. If none -// of the items can be processed due to insufficient provisioned throughput on all -// of the tables in the request, then BatchGetItem returns a -// ProvisionedThroughputExceededException . If at least one of the items is -// successfully processed, then BatchGetItem completes successfully, while -// returning the keys of the unread items in UnprocessedKeys . If DynamoDB returns -// any unprocessed items, you should retry the batch operation on those items. -// However, we strongly recommend that you use an exponential backoff algorithm. If -// you retry the batch operation immediately, the underlying read or write requests -// can still fail due to throttling on the individual tables. If you delay the -// batch operation using exponential backoff, the individual requests in the batch -// are much more likely to succeed. For more information, see Batch Operations and -// Error Handling (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations) +// the table's provisioned throughput is exceeded, more than 1MB per partition is +// requested, or an internal processing failure occurs. If a partial result is +// returned, the operation returns a value for UnprocessedKeys . You can use this +// value to retry the operation starting with the next item to get. If you request +// more than 100 items, BatchGetItem returns a ValidationException with the +// message "Too many items requested for the BatchGetItem call." For example, if +// you ask to retrieve 100 items, but each individual item is 300 KB in size, the +// system returns 52 items (so as not to exceed the 16 MB limit). It also returns +// an appropriate UnprocessedKeys value so you can get the next page of results. +// If desired, your application can include its own logic to assemble the pages of +// results into one dataset. If none of the items can be processed due to +// insufficient provisioned throughput on all of the tables in the request, then +// BatchGetItem returns a ProvisionedThroughputExceededException . If at least one +// of the items is successfully processed, then BatchGetItem completes +// successfully, while returning the keys of the unread items in UnprocessedKeys . +// If DynamoDB returns any unprocessed items, you should retry the batch operation +// on those items. However, we strongly recommend that you use an exponential +// backoff algorithm. If you retry the batch operation immediately, the underlying +// read or write requests can still fail due to throttling on the individual +// tables. If you delay the batch operation using exponential backoff, the +// individual requests in the batch are much more likely to succeed. For more +// information, see Batch Operations and Error Handling (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations) // in the Amazon DynamoDB Developer Guide. By default, BatchGetItem performs // eventually consistent reads on every table in the request. If you want strongly // consistent reads instead, you can set ConsistentRead to true for any or all diff --git a/service/dynamodb/types/errors.go b/service/dynamodb/types/errors.go index c24ee60a60f..bc1a842bebd 100644 --- a/service/dynamodb/types/errors.go +++ b/service/dynamodb/types/errors.go @@ -496,7 +496,9 @@ func (e *ItemCollectionSizeLimitExceededException) ErrorFault() smithy.ErrorFaul // specifications are complex, then DynamoDB might temporarily reduce the number of // concurrent operations. When importing into DynamoDB, up to 50 simultaneous // import table operations are allowed per account. There is a soft account quota -// of 2,500 tables. +// of 2,500 tables. GetRecords was called with a value of more than 1000 for the +// limit request parameter. More than 2 processes are reading from the same streams +// shard at the same time. Exceeding this limit may result in request throttling. type LimitExceededException struct { Message *string diff --git a/service/dynamodb/types/types.go b/service/dynamodb/types/types.go index 3445ae345ee..cf91bfb734c 100644 --- a/service/dynamodb/types/types.go +++ b/service/dynamodb/types/types.go @@ -1917,7 +1917,7 @@ type ProvisionedThroughput struct { // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException . For more information, see Specifying - // Read and Write Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // Read and Write Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html) // in the Amazon DynamoDB Developer Guide. If read/write capacity mode is // PAY_PER_REQUEST the value is set to 0. // @@ -1926,7 +1926,7 @@ type ProvisionedThroughput struct { // The maximum number of writes consumed per second before DynamoDB returns a // ThrottlingException . For more information, see Specifying Read and Write - // Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html) // in the Amazon DynamoDB Developer Guide. If read/write capacity mode is // PAY_PER_REQUEST the value is set to 0. // diff --git a/service/dynamodbstreams/types/errors.go b/service/dynamodbstreams/types/errors.go index 4155bbcf917..09329a9c57a 100644 --- a/service/dynamodbstreams/types/errors.go +++ b/service/dynamodbstreams/types/errors.go @@ -70,7 +70,9 @@ func (e *InternalServerError) ErrorFault() smithy.ErrorFault { return smithy.Fau // specifications are complex, then DynamoDB might temporarily reduce the number of // concurrent operations. When importing into DynamoDB, up to 50 simultaneous // import table operations are allowed per account. There is a soft account quota -// of 2,500 tables. +// of 2,500 tables. GetRecords was called with a value of more than 1000 for the +// limit request parameter. More than 2 processes are reading from the same streams +// shard at the same time. Exceeding this limit may result in request throttling. type LimitExceededException struct { Message *string diff --git a/service/dynamodbstreams/types/types.go b/service/dynamodbstreams/types/types.go index 8d0a3ccf7cf..0e2d3522338 100644 --- a/service/dynamodbstreams/types/types.go +++ b/service/dynamodbstreams/types/types.go @@ -194,8 +194,8 @@ type Record struct { // - REMOVE - the item was deleted from the table EventName OperationType - // The AWS service from which the stream record originated. For DynamoDB Streams, - // this is aws:dynamodb . + // The Amazon Web Services service from which the stream record originated. For + // DynamoDB Streams, this is aws:dynamodb . EventSource *string // The version number of the stream record format. This number is updated whenever @@ -254,7 +254,7 @@ type Stream struct { // is not a unique identifier for the stream, because it is possible that a stream // from another table might have the same timestamp. However, the combination of // the following three elements is guaranteed to be unique: - // - the AWS customer ID. + // - the Amazon Web Services customer ID. // - the table name // - the StreamLabel StreamLabel *string @@ -293,7 +293,7 @@ type StreamDescription struct { // is not a unique identifier for the stream, because it is possible that a stream // from another table might have the same timestamp. However, the combination of // the following three elements is guaranteed to be unique: - // - the AWS customer ID. + // - the Amazon Web Services customer ID. // - the table name // - the StreamLabel StreamLabel *string @@ -327,7 +327,8 @@ type StreamDescription struct { type StreamRecord struct { // The approximate date and time when the stream record was created, in UNIX epoch - // time (http://www.epochconverter.com/) format. + // time (http://www.epochconverter.com/) format and rounded down to the closest + // second. ApproximateCreationDateTime *time.Time // The primary key attribute(s) for the DynamoDB item that was modified. diff --git a/service/fsx/api_op_CreateDataRepositoryAssociation.go b/service/fsx/api_op_CreateDataRepositoryAssociation.go index 8b59da930e4..9af55b42d13 100644 --- a/service/fsx/api_op_CreateDataRepositoryAssociation.go +++ b/service/fsx/api_op_CreateDataRepositoryAssociation.go @@ -15,13 +15,13 @@ import ( // Creates an Amazon FSx for Lustre data repository association (DRA). A data // repository association is a link between a directory on the file system and an // Amazon S3 bucket or prefix. You can have a maximum of 8 data repository -// associations on a file system. Data repository associations are supported for -// all file systems except for Scratch_1 deployment type. Each data repository -// association must have a unique Amazon FSx file system directory and a unique S3 -// bucket or prefix associated with it. You can configure a data repository -// association for automatic import only, for automatic export only, or for both. -// To learn more about linking a data repository to your file system, see Linking -// your file system to an S3 bucket (https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html) +// associations on a file system. Data repository associations are supported on all +// FSx for Lustre 2.12 and newer file systems, excluding scratch_1 deployment +// type. Each data repository association must have a unique Amazon FSx file system +// directory and a unique S3 bucket or prefix associated with it. You can configure +// a data repository association for automatic import only, for automatic export +// only, or for both. To learn more about linking a data repository to your file +// system, see Linking your file system to an S3 bucket (https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html) // . CreateDataRepositoryAssociation isn't supported on Amazon File Cache // resources. To create a DRA on Amazon File Cache, use the CreateFileCache // operation. diff --git a/service/fsx/api_op_DeleteDataRepositoryAssociation.go b/service/fsx/api_op_DeleteDataRepositoryAssociation.go index 1a87a9d10ce..dc49e7567ec 100644 --- a/service/fsx/api_op_DeleteDataRepositoryAssociation.go +++ b/service/fsx/api_op_DeleteDataRepositoryAssociation.go @@ -16,8 +16,8 @@ import ( // Deleting the data repository association unlinks the file system from the Amazon // S3 bucket. When deleting a data repository association, you have the option of // deleting the data in the file system that corresponds to the data repository -// association. Data repository associations are supported for all file systems -// except for Scratch_1 deployment type. +// association. Data repository associations are supported on all FSx for Lustre +// 2.12 and newer file systems, excluding scratch_1 deployment type. func (c *Client) DeleteDataRepositoryAssociation(ctx context.Context, params *DeleteDataRepositoryAssociationInput, optFns ...func(*Options)) (*DeleteDataRepositoryAssociationOutput, error) { if params == nil { params = &DeleteDataRepositoryAssociationInput{} diff --git a/service/fsx/api_op_DescribeDataRepositoryAssociations.go b/service/fsx/api_op_DescribeDataRepositoryAssociations.go index c4c35c41944..41425584e10 100644 --- a/service/fsx/api_op_DescribeDataRepositoryAssociations.go +++ b/service/fsx/api_op_DescribeDataRepositoryAssociations.go @@ -15,12 +15,12 @@ import ( // Returns the description of specific Amazon FSx for Lustre or Amazon File Cache // data repository associations, if one or more AssociationIds values are provided // in the request, or if filters are used in the request. Data repository -// associations are supported on Amazon File Cache resources and all Amazon FSx for -// Lustre file systems excluding Scratch_1 deployment types. You can use filters -// to narrow the response to include just data repository associations for specific -// file systems (use the file-system-id filter with the ID of the file system) or -// caches (use the file-cache-id filter with the ID of the cache), or data -// repository associations for a specific repository type (use the +// associations are supported on Amazon File Cache resources and all FSx for Lustre +// 2.12 and newer file systems, excluding scratch_1 deployment type. You can use +// filters to narrow the response to include just data repository associations for +// specific file systems (use the file-system-id filter with the ID of the file +// system) or caches (use the file-cache-id filter with the ID of the cache), or +// data repository associations for a specific repository type (use the // data-repository-type filter with a value of S3 or NFS ). If you don't use // filters, the response returns all data repository associations owned by your // Amazon Web Services account in the Amazon Web Services Region of the endpoint diff --git a/service/fsx/api_op_UpdateDataRepositoryAssociation.go b/service/fsx/api_op_UpdateDataRepositoryAssociation.go index 8d6874f72c1..4c76c95ae9a 100644 --- a/service/fsx/api_op_UpdateDataRepositoryAssociation.go +++ b/service/fsx/api_op_UpdateDataRepositoryAssociation.go @@ -13,8 +13,9 @@ import ( ) // Updates the configuration of an existing data repository association on an -// Amazon FSx for Lustre file system. Data repository associations are supported -// for all file systems except for Scratch_1 deployment type. +// Amazon FSx for Lustre file system. Data repository associations are supported on +// all FSx for Lustre 2.12 and newer file systems, excluding scratch_1 deployment +// type. func (c *Client) UpdateDataRepositoryAssociation(ctx context.Context, params *UpdateDataRepositoryAssociationInput, optFns ...func(*Options)) (*UpdateDataRepositoryAssociationOutput, error) { if params == nil { params = &UpdateDataRepositoryAssociationInput{} diff --git a/service/fsx/api_op_UpdateFileSystem.go b/service/fsx/api_op_UpdateFileSystem.go index 21c57443cb1..cd959c5825a 100644 --- a/service/fsx/api_op_UpdateFileSystem.go +++ b/service/fsx/api_op_UpdateFileSystem.go @@ -87,7 +87,7 @@ type UpdateFileSystemInput struct { // The configuration updates for an Amazon FSx for NetApp ONTAP file system. OntapConfiguration *types.UpdateFileSystemOntapConfiguration - // The configuration updates for an Amazon FSx for OpenZFS file system. + // The configuration updates for an FSx for OpenZFS file system. OpenZFSConfiguration *types.UpdateFileSystemOpenZFSConfiguration // Use this parameter to increase the storage capacity of an FSx for Windows File @@ -114,8 +114,8 @@ type UpdateFileSystemInput struct { // storage capacity value. To increase storage capacity, the file system must have // at least 16 MBps of throughput capacity. For more information, see Managing // storage capacity (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html) - // in the Amazon FSx for Windows File Server User Guide. For ONTAP file systems, - // the storage capacity target value must be at least 10 percent greater than the + // in the Amazon FSxfor Windows File Server User Guide. For ONTAP file systems, the + // storage capacity target value must be at least 10 percent greater than the // current storage capacity value. For more information, see Managing storage // capacity and provisioned IOPS (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-storage-capacity.html) // in the Amazon FSx for NetApp ONTAP User Guide. diff --git a/service/fsx/api_op_UpdateStorageVirtualMachine.go b/service/fsx/api_op_UpdateStorageVirtualMachine.go index 9d9f83b0212..0753cc74fc3 100644 --- a/service/fsx/api_op_UpdateStorageVirtualMachine.go +++ b/service/fsx/api_op_UpdateStorageVirtualMachine.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates an Amazon FSx for ONTAP storage virtual machine (SVM). +// Updates an FSx for ONTAP storage virtual machine (SVM). func (c *Client) UpdateStorageVirtualMachine(ctx context.Context, params *UpdateStorageVirtualMachineInput, optFns ...func(*Options)) (*UpdateStorageVirtualMachineOutput, error) { if params == nil { params = &UpdateStorageVirtualMachineInput{} @@ -35,8 +35,7 @@ type UpdateStorageVirtualMachineInput struct { // This member is required. StorageVirtualMachineId *string - // Updates the Microsoft Active Directory (AD) configuration for an SVM that is - // joined to an AD. + // Specifies updates to an SVM's Microsoft Active Directory (AD) configuration. ActiveDirectoryConfiguration *types.UpdateSvmActiveDirectoryConfiguration // (Optional) An idempotency token for resource creation, in a string of up to 63 @@ -44,7 +43,7 @@ type UpdateStorageVirtualMachineInput struct { // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string - // Enter a new SvmAdminPassword if you are updating it. + // Specifies a new SvmAdminPassword. SvmAdminPassword *string noSmithyDocumentSerde diff --git a/service/fsx/deserializers.go b/service/fsx/deserializers.go index 8aaeb24ea06..ad1eb8282b4 100644 --- a/service/fsx/deserializers.go +++ b/service/fsx/deserializers.go @@ -2544,6 +2544,9 @@ func awsAwsjson11_deserializeOpErrorDeleteVolume(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("ServiceLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorServiceLimitExceeded(response, errorBody) + case strings.EqualFold("VolumeNotFound", errorCode): return awsAwsjson11_deserializeErrorVolumeNotFound(response, errorBody) @@ -10657,6 +10660,15 @@ func awsAwsjson11_deserializeDocumentOntapFileSystemConfiguration(v **types.Onta return err } + case "FsxAdminPassword": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AdminPassword to be of type string, got %T instead", value) + } + sv.FsxAdminPassword = ptr.String(jtv) + } + case "PreferredSubnetId": if value != nil { jtv, ok := value.(string) diff --git a/service/fsx/serializers.go b/service/fsx/serializers.go index 1e9a9851c1f..5e499c3a764 100644 --- a/service/fsx/serializers.go +++ b/service/fsx/serializers.go @@ -3465,6 +3465,21 @@ func awsAwsjson11_serializeDocumentSelfManagedActiveDirectoryConfigurationUpdate } } + if v.DomainName != nil { + ok := object.Key("DomainName") + ok.String(*v.DomainName) + } + + if v.FileSystemAdministratorsGroup != nil { + ok := object.Key("FileSystemAdministratorsGroup") + ok.String(*v.FileSystemAdministratorsGroup) + } + + if v.OrganizationalUnitDistinguishedName != nil { + ok := object.Key("OrganizationalUnitDistinguishedName") + ok.String(*v.OrganizationalUnitDistinguishedName) + } + if v.Password != nil { ok := object.Key("Password") ok.String(*v.Password) @@ -3967,6 +3982,11 @@ func awsAwsjson11_serializeDocumentUpdateSvmActiveDirectoryConfiguration(v *type object := value.Object() defer object.Close() + if v.NetBiosName != nil { + ok := object.Key("NetBiosName") + ok.String(*v.NetBiosName) + } + if v.SelfManagedActiveDirectoryConfiguration != nil { ok := object.Key("SelfManagedActiveDirectoryConfiguration") if err := awsAwsjson11_serializeDocumentSelfManagedActiveDirectoryConfigurationUpdates(v.SelfManagedActiveDirectoryConfiguration, ok); err != nil { diff --git a/service/fsx/types/types.go b/service/fsx/types/types.go index 05e725dbf02..2b5f47cef6b 100644 --- a/service/fsx/types/types.go +++ b/service/fsx/types/types.go @@ -251,7 +251,7 @@ type Backup struct { // construct Amazon Resource Names (ARNs) for resources. OwnerId *string - // The current percent of progress of an asynchronous task. + // Displays the current percent of progress of an asynchronous task. ProgressPercent *int32 // The Amazon Resource Name (ARN) for the backup resource. @@ -590,10 +590,10 @@ type CreateFileSystemOpenZFSConfiguration struct { // configured for redundancy within a single Availability Zone in an Amazon Web // Services Region . Valid values are the following: // - SINGLE_AZ_1 - (Default) Creates file systems with throughput capacities of - // 64 - 4,096 MB/s. Single_AZ_1 is available in all Amazon Web Services Regions + // 64 - 4,096 MBps. Single_AZ_1 is available in all Amazon Web Services Regions // where Amazon FSx for OpenZFS is available, except US West (Oregon). // - SINGLE_AZ_2 - Creates file systems with throughput capacities of 160 - - // 10,240 MB/s using an NVMe L2ARC cache. Single_AZ_2 is available only in the US + // 10,240 MBps using an NVMe L2ARC cache. Single_AZ_2 is available only in the US // East (N. Virginia), US East (Ohio), US West (Oregon), and Europe (Ireland) // Amazon Web Services Regions. // For more information, see: Deployment type availability (https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/availability-durability.html#available-aws-regions) @@ -604,12 +604,12 @@ type CreateFileSystemOpenZFSConfiguration struct { DeploymentType OpenZFSDeploymentType // Specifies the throughput of an Amazon FSx for OpenZFS file system, measured in - // megabytes per second (MB/s). Valid values depend on the DeploymentType you + // megabytes per second (MBps). Valid values depend on the DeploymentType you // choose, as follows: // - For SINGLE_AZ_1 , valid values are 64, 128, 256, 512, 1024, 2048, 3072, or - // 4096 MB/s. + // 4096 MBps. // - For SINGLE_AZ_2 , valid values are 160, 320, 640, 1280, 2560, 3840, 5120, - // 7680, or 10240 MB/s. + // 7680, or 10240 MBps. // You pay for additional throughput capacity that you provision. // // This member is required. @@ -643,10 +643,11 @@ type CreateFileSystemOpenZFSConfiguration struct { DailyAutomaticBackupStartTime *string // The SSD IOPS (input/output operations per second) configuration for an Amazon - // FSx for NetApp ONTAP or Amazon FSx for OpenZFS file system. The default is 3 - // IOPS per GB of storage capacity, but you can provision additional IOPS per GB of - // storage. The configuration consists of the total number of provisioned SSD IOPS - // and how the amount was provisioned (by the customer or by the system). + // FSx for NetApp ONTAP or FSx for OpenZFS file system. By default, Amazon FSx + // automatically provisions 3 IOPS per GB of storage capacity. You can provision + // additional IOPS per GB of storage. The configuration consists of the total + // number of provisioned SSD IOPS and how it is was provisioned, or the mode (by + // the customer or by Amazon FSx). DiskIopsConfiguration *DiskIopsConfiguration // The configuration Amazon FSx uses when creating the root value of the Amazon @@ -746,11 +747,11 @@ type CreateFileSystemWindowsConfiguration struct { PreferredSubnetId *string // The configuration that Amazon FSx uses to join a FSx for Windows File Server - // file system or an ONTAP storage virtual machine (SVM) to a self-managed + // file system or an FSx for ONTAP storage virtual machine (SVM) to a self-managed // (including on-premises) Microsoft Active Directory (AD) directory. For more - // information, see Using Amazon FSx with your self-managed Microsoft Active - // Directory (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html) - // or Managing SVMs (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) + // information, see Using Amazon FSx for Windows with your self-managed Microsoft + // Active Directory (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html) + // or Managing FSx for ONTAP SVMs (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) // . SelfManagedActiveDirectoryConfiguration *SelfManagedActiveDirectoryConfiguration @@ -970,11 +971,11 @@ type CreateSvmActiveDirectoryConfiguration struct { NetBiosName *string // The configuration that Amazon FSx uses to join a FSx for Windows File Server - // file system or an ONTAP storage virtual machine (SVM) to a self-managed + // file system or an FSx for ONTAP storage virtual machine (SVM) to a self-managed // (including on-premises) Microsoft Active Directory (AD) directory. For more - // information, see Using Amazon FSx with your self-managed Microsoft Active - // Directory (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html) - // or Managing SVMs (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) + // information, see Using Amazon FSx for Windows with your self-managed Microsoft + // Active Directory (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html) + // or Managing FSx for ONTAP SVMs (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) // . SelfManagedActiveDirectoryConfiguration *SelfManagedActiveDirectoryConfiguration @@ -990,7 +991,8 @@ type CreateSvmActiveDirectoryConfiguration struct { // - DescribeDataRepositoryAssociations // // Data repository associations are supported on Amazon File Cache resources and -// all Amazon FSx for Lustre file systems excluding Scratch_1 deployment types. +// all FSx for Lustre 2.12 and newer file systems, excluding scratch_1 deployment +// type. type DataRepositoryAssociation struct { // The system-generated, unique ID of the data repository association. @@ -1485,17 +1487,18 @@ type DeleteVolumeOpenZFSConfiguration struct { } // The SSD IOPS (input/output operations per second) configuration for an Amazon -// FSx for NetApp ONTAP or Amazon FSx for OpenZFS file system. The default is 3 -// IOPS per GB of storage capacity, but you can provision additional IOPS per GB of -// storage. The configuration consists of the total number of provisioned SSD IOPS -// and how the amount was provisioned (by the customer or by the system). +// FSx for NetApp ONTAP or FSx for OpenZFS file system. By default, Amazon FSx +// automatically provisions 3 IOPS per GB of storage capacity. You can provision +// additional IOPS per GB of storage. The configuration consists of the total +// number of provisioned SSD IOPS and how it is was provisioned, or the mode (by +// the customer or by Amazon FSx). type DiskIopsConfiguration struct { // The total number of SSD IOPS provisioned for the file system. Iops *int64 - // Specifies whether the number of IOPS for the file system is using the system - // default ( AUTOMATIC ) or was provisioned by the customer ( USER_PROVISIONED ). + // Specifies whether the file system is using the AUTOMATIC setting of SSD IOPS of + // 3 IOPS per GB of storage capacity, , or if it using a USER_PROVISIONED value. Mode DiskIopsConfigurationMode noSmithyDocumentSerde @@ -1912,8 +1915,7 @@ type FileSystem struct { // or NetApp SnapMirror. They are the Management and Intercluster endpoints. type FileSystemEndpoint struct { - // The Domain Name Service (DNS) name for the file system. You can mount your file - // system using its DNS name. + // The file system's DNS name. You can mount your file system using its DNS name. DNSName *string // IP addresses of the file system endpoint. @@ -2221,6 +2223,10 @@ type OntapFileSystemConfiguration struct { // SnapMirror. Endpoints *FileSystemEndpoints + // You can use the fsxadmin user account to access the NetApp ONTAP CLI and REST + // API. The password value is always redacted in the response. + FsxAdminPassword *string + // The ID for a subnet. A subnet is a range of IP addresses in your virtual // private cloud (VPC). For more information, see VPC and subnets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) // in the Amazon VPC User Guide. @@ -2436,10 +2442,11 @@ type OpenZFSFileSystemConfiguration struct { DeploymentType OpenZFSDeploymentType // The SSD IOPS (input/output operations per second) configuration for an Amazon - // FSx for NetApp ONTAP or Amazon FSx for OpenZFS file system. The default is 3 - // IOPS per GB of storage capacity, but you can provision additional IOPS per GB of - // storage. The configuration consists of the total number of provisioned SSD IOPS - // and how the amount was provisioned (by the customer or by the system). + // FSx for NetApp ONTAP or FSx for OpenZFS file system. By default, Amazon FSx + // automatically provisions 3 IOPS per GB of storage capacity. You can provision + // additional IOPS per GB of storage. The configuration consists of the total + // number of provisioned SSD IOPS and how it is was provisioned, or the mode (by + // the customer or by Amazon FSx). DiskIopsConfiguration *DiskIopsConfiguration // The ID of the root volume of the OpenZFS file system. @@ -2638,11 +2645,11 @@ type SelfManagedActiveDirectoryAttributes struct { } // The configuration that Amazon FSx uses to join a FSx for Windows File Server -// file system or an ONTAP storage virtual machine (SVM) to a self-managed +// file system or an FSx for ONTAP storage virtual machine (SVM) to a self-managed // (including on-premises) Microsoft Active Directory (AD) directory. For more -// information, see Using Amazon FSx with your self-managed Microsoft Active -// Directory (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html) -// or Managing SVMs (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) +// information, see Using Amazon FSx for Windows with your self-managed Microsoft +// Active Directory (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html) +// or Managing FSx for ONTAP SVMs (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) // . type SelfManagedActiveDirectoryConfiguration struct { @@ -2693,22 +2700,35 @@ type SelfManagedActiveDirectoryConfiguration struct { noSmithyDocumentSerde } -// The configuration that Amazon FSx uses to join the Windows File Server instance -// to a self-managed Microsoft Active Directory (AD) directory. +// Specifies changes you are making to the self-managed Microsoft Active Directory +// (AD) configuration to which an FSx for Windows File Server file system or an FSx +// for ONTAP SVM is joined. type SelfManagedActiveDirectoryConfigurationUpdates struct { - // A list of up to three IP addresses of DNS servers or domain controllers in the - // self-managed AD directory. + // A list of up to three DNS server or domain controller IP addresses in your + // self-managed AD domain. DnsIps []string - // The password for the service account on your self-managed AD domain that Amazon - // FSx will use to join to your AD domain. + // Specifies an updated fully qualified domain name of your self-managed AD + // configuration. + DomainName *string + + // Specifies the updated name of the self-managed AD domain group whose members + // are granted administrative privileges for the Amazon FSx resource. + FileSystemAdministratorsGroup *string + + // Specifies an updated fully qualified distinguished name of the organization + // unit within your self-managed AD. + OrganizationalUnitDistinguishedName *string + + // Specifies the updated password for the service account on your self-managed AD + // domain. Amazon FSx uses this account to join to your self-managed AD domain. Password *string - // The user name for the service account on your self-managed AD domain that - // Amazon FSx will use to join to your AD domain. This account must have the - // permission to join computers to the domain in the organizational unit provided - // in OrganizationalUnitDistinguishedName . + // Specifies the updated user name for the service account on your self-managed AD + // domain. Amazon FSx uses this account to join to your self-managed AD domain. + // This account must have the permissions required to join computers to the domain + // in the organizational unit provided in OrganizationalUnitDistinguishedName . UserName *string noSmithyDocumentSerde @@ -2847,13 +2867,12 @@ type StorageVirtualMachineFilter struct { noSmithyDocumentSerde } -// Describes the configuration of the Microsoft Active Directory (AD) directory to -// which the Amazon FSx for ONTAP storage virtual machine (SVM) is joined. Pleae -// note, account credentials are not returned in the response payload. +// Describes the Microsoft Active Directory (AD) directory configuration to which +// the FSx for ONTAP storage virtual machine (SVM) is joined. Note that account +// credentials are not returned in the response payload. type SvmActiveDirectoryConfiguration struct { - // The NetBIOS name of the Active Directory computer object that is joined to your - // SVM. + // The NetBIOS name of the AD computer object to which the SVM is joined. NetBiosName *string // The configuration of the self-managed Microsoft Active Directory (AD) directory @@ -2870,8 +2889,7 @@ type SvmActiveDirectoryConfiguration struct { // Smb endpoints. type SvmEndpoint struct { - // The Domain Name Service (DNS) name for the file system. You can mount your file - // system using its DNS name. + // The file system's DNS name. You can mount your file system using its DNS name. DNSName *string // The SVM endpoint's IP addresses. @@ -3053,14 +3071,20 @@ type UpdateFileSystemOntapConfiguration struct { // specifies 5 AM daily. DailyAutomaticBackupStartTime *string - // The SSD IOPS (input/output operations per second) configuration for an Amazon + // The SSD IOPS (input output operations per second) configuration for an Amazon // FSx for NetApp ONTAP file system. The default is 3 IOPS per GB of storage // capacity, but you can provision additional IOPS per GB of storage. The // configuration consists of an IOPS mode ( AUTOMATIC or USER_PROVISIONED ), and in // the case of USER_PROVISIONED IOPS, the total number of SSD IOPS provisioned. + // For more information, see Updating SSD storage capacity and IOPS (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/increase-primary-storage.html) + // . DiskIopsConfiguration *DiskIopsConfiguration - // The ONTAP administrative password for the fsxadmin user. + // Update the password for the fsxadmin user by entering a new password. You use + // the fsxadmin user to access the NetApp ONTAP CLI and REST API to manage your + // file system resources. For more information, see Managing resources using + // NetApp Applicaton (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-resources-ontap-apps.html) + // . FsxAdminPassword *string // (Multi-AZ only) A list of IDs of existing virtual private cloud (VPC) route @@ -3069,9 +3093,11 @@ type UpdateFileSystemOntapConfiguration struct { // IDs for a file system. RemoveRouteTableIds []string - // Specifies the throughput of an FSx for NetApp ONTAP file system, measured in - // megabytes per second (MBps). Valid values are 128, 256, 512, 1024, 2048, and - // 4096 MBps. + // Enter a new value to change the amount of throughput capacity for the file + // system. Throughput capacity is measured in megabytes per second (MBps). Valid + // values are 128, 256, 512, 1024, 2048, and 4096 MBps. For more information, see + // Managing throughput capacity (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-throughput-capacity.html) + // in the FSx for ONTAP User Guide. ThroughputCapacity *int32 // A recurring weekly time, in the format D:HH:MM . D is the day of the week, for @@ -3115,10 +3141,11 @@ type UpdateFileSystemOpenZFSConfiguration struct { DailyAutomaticBackupStartTime *string // The SSD IOPS (input/output operations per second) configuration for an Amazon - // FSx for NetApp ONTAP or Amazon FSx for OpenZFS file system. The default is 3 - // IOPS per GB of storage capacity, but you can provision additional IOPS per GB of - // storage. The configuration consists of the total number of provisioned SSD IOPS - // and how the amount was provisioned (by the customer or by the system). + // FSx for NetApp ONTAP or FSx for OpenZFS file system. By default, Amazon FSx + // automatically provisions 3 IOPS per GB of storage capacity. You can provision + // additional IOPS per GB of storage. The configuration consists of the total + // number of provisioned SSD IOPS and how it is was provisioned, or the mode (by + // the customer or by Amazon FSx). DiskIopsConfiguration *DiskIopsConfiguration // The throughput of an Amazon FSx for OpenZFS file system, measured in megabytes @@ -3278,13 +3305,18 @@ type UpdateOpenZFSVolumeConfiguration struct { noSmithyDocumentSerde } -// Updates the Microsoft Active Directory (AD) configuration of an SVM joined to -// an AD. Please note, account credentials are not returned in the response -// payload. +// Specifies updates to an FSx for ONTAP storage virtual machine's (SVM) Microsoft +// Active Directory (AD) configuration. Note that account credentials are not +// returned in the response payload. type UpdateSvmActiveDirectoryConfiguration struct { - // The configuration that Amazon FSx uses to join the Windows File Server instance - // to a self-managed Microsoft Active Directory (AD) directory. + // Specifies an updated NetBIOS name of the AD computer object NetBiosName to + // which an SVM is joined. + NetBiosName *string + + // Specifies changes you are making to the self-managed Microsoft Active Directory + // (AD) configuration to which an FSx for Windows File Server file system or an FSx + // for ONTAP SVM is joined. SelfManagedActiveDirectoryConfiguration *SelfManagedActiveDirectoryConfigurationUpdates noSmithyDocumentSerde diff --git a/service/opensearch/api_op_CreateOutboundConnection.go b/service/opensearch/api_op_CreateOutboundConnection.go index 2f0fcbe77fe..b9a2f8e9c91 100644 --- a/service/opensearch/api_op_CreateOutboundConnection.go +++ b/service/opensearch/api_op_CreateOutboundConnection.go @@ -51,6 +51,9 @@ type CreateOutboundConnectionInput struct { // The connection mode. ConnectionMode types.ConnectionMode + // The ConnectionProperties for the outbound connection. + ConnectionProperties *types.ConnectionProperties + noSmithyDocumentSerde } diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index c354d7e3241..45023bb8967 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -11116,6 +11116,11 @@ func awsRestjson1_deserializeDocumentConnectionProperties(v **types.ConnectionPr for key, value := range shape { switch key { + case "CrossClusterSearch": + if err := awsRestjson1_deserializeDocumentCrossClusterSearchConnectionProperties(&sv.CrossClusterSearch, value); err != nil { + return err + } + case "Endpoint": if value != nil { jtv, ok := value.(string) @@ -11134,6 +11139,46 @@ func awsRestjson1_deserializeDocumentConnectionProperties(v **types.ConnectionPr return nil } +func awsRestjson1_deserializeDocumentCrossClusterSearchConnectionProperties(v **types.CrossClusterSearchConnectionProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CrossClusterSearchConnectionProperties + if *v == nil { + sv = &types.CrossClusterSearchConnectionProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SkipUnavailable": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SkipUnavailableStatus to be of type string, got %T instead", value) + } + sv.SkipUnavailable = types.SkipUnavailableStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDependencyFailureException(v **types.DependencyFailureException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index 5303f1d8638..300967abf03 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -617,6 +617,13 @@ func awsRestjson1_serializeOpDocumentCreateOutboundConnectionInput(v *CreateOutb ok.String(string(v.ConnectionMode)) } + if v.ConnectionProperties != nil { + ok := object.Key("ConnectionProperties") + if err := awsRestjson1_serializeDocumentConnectionProperties(v.ConnectionProperties, ok); err != nil { + return err + } + } + if v.LocalDomainInfo != nil { ok := object.Key("LocalDomainInfo") if err := awsRestjson1_serializeDocumentDomainInformationContainer(v.LocalDomainInfo, ok); err != nil { @@ -4203,6 +4210,37 @@ func awsRestjson1_serializeDocumentColdStorageOptions(v *types.ColdStorageOption return nil } +func awsRestjson1_serializeDocumentConnectionProperties(v *types.ConnectionProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CrossClusterSearch != nil { + ok := object.Key("CrossClusterSearch") + if err := awsRestjson1_serializeDocumentCrossClusterSearchConnectionProperties(v.CrossClusterSearch, ok); err != nil { + return err + } + } + + if v.Endpoint != nil { + ok := object.Key("Endpoint") + ok.String(*v.Endpoint) + } + + return nil +} + +func awsRestjson1_serializeDocumentCrossClusterSearchConnectionProperties(v *types.CrossClusterSearchConnectionProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SkipUnavailable) > 0 { + ok := object.Key("SkipUnavailable") + ok.String(string(v.SkipUnavailable)) + } + + return nil +} + func awsRestjson1_serializeDocumentDescribePackagesFilter(v *types.DescribePackagesFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 2c51111ebfd..84a3ba39cff 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -891,6 +891,24 @@ func (ScheduledBy) Values() []ScheduledBy { } } +type SkipUnavailableStatus string + +// Enum values for SkipUnavailableStatus +const ( + SkipUnavailableStatusEnabled SkipUnavailableStatus = "ENABLED" + SkipUnavailableStatusDisabled SkipUnavailableStatus = "DISABLED" +) + +// Values returns all known values for SkipUnavailableStatus. 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 (SkipUnavailableStatus) Values() []SkipUnavailableStatus { + return []SkipUnavailableStatus{ + "ENABLED", + "DISABLED", + } +} + type TimeUnit string // Enum values for TimeUnit diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index b51157f0a9a..e93f30b27bb 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -565,12 +565,25 @@ type CompatibleVersionsMap struct { // The connection properties of an outbound connection. type ConnectionProperties struct { - // The endpoint of the remote domain. + // The connection properties for cross cluster search. + CrossClusterSearch *CrossClusterSearchConnectionProperties + + // The Endpoint attribute cannot be modified. The endpoint of the remote domain. + // Applicable for VPC_ENDPOINT connection mode. Endpoint *string noSmithyDocumentSerde } +// Cross cluster search specific connection properties. +type CrossClusterSearchConnectionProperties struct { + + // Status of SkipUnavailable param for outbound connection. + SkipUnavailable SkipUnavailableStatus + + noSmithyDocumentSerde +} + // A filter to apply to the DescribePackage response. type DescribePackagesFilter struct { diff --git a/service/rekognition/api_client.go b/service/rekognition/api_client.go index c9d410d73c6..bd784f88156 100644 --- a/service/rekognition/api_client.go +++ b/service/rekognition/api_client.go @@ -4,6 +4,7 @@ package rekognition 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" @@ -15,6 +16,7 @@ import ( 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" @@ -47,6 +49,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) + resolveIdempotencyTokenProvider(&options) + for _, fn := range optFns { fn(&options) } @@ -83,6 +87,10 @@ type Options struct { // 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 @@ -377,6 +385,13 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +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, @@ -415,6 +430,11 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/rekognition/api_op_AssociateFaces.go b/service/rekognition/api_op_AssociateFaces.go new file mode 100644 index 00000000000..df1dac88550 --- /dev/null +++ b/service/rekognition/api_op_AssociateFaces.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rekognition + +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/rekognition/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates one or more faces with an existing UserID. Takes an array of FaceIds +// . Each FaceId that are present in the FaceIds list is associated with the +// provided UserID. The maximum number of total FaceIds per UserID is 100. The +// UserMatchThreshold parameter specifies the minimum user match confidence +// required for the face to be associated with a UserID that has at least one +// FaceID already associated. This ensures that the FaceIds are associated with +// the right UserID. The value ranges from 0-100 and default value is 75. If +// successful, an array of AssociatedFace objects containing the associated FaceIds +// is returned. If a given face is already associated with the given UserID , it +// will be ignored and will not be returned in the response. If a given face is +// already associated to a different UserID , isn't found in the collection, +// doesn’t meet the UserMatchThreshold , or there are already 100 faces associated +// with the UserID , it will be returned as part of an array of +// UnsuccessfulFaceAssociations. The UserStatus reflects the status of an +// operation which updates a UserID representation with a list of given faces. The +// UserStatus can be: +// - ACTIVE - All associations or disassociations of FaceID(s) for a UserID are +// complete. +// - CREATED - A UserID has been created, but has no FaceID(s) associated with +// it. +// - UPDATING - A UserID is being updated and there are current associations or +// disassociations of FaceID(s) taking place. +func (c *Client) AssociateFaces(ctx context.Context, params *AssociateFacesInput, optFns ...func(*Options)) (*AssociateFacesOutput, error) { + if params == nil { + params = &AssociateFacesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateFaces", params, optFns, c.addOperationAssociateFacesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateFacesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateFacesInput struct { + + // The ID of an existing collection containing the UserID. + // + // This member is required. + CollectionId *string + + // An array of FaceIDs to associate with the UserID. + // + // This member is required. + FaceIds []string + + // The ID for the existing UserID. + // + // This member is required. + UserId *string + + // Idempotent token used to identify the request to AssociateFaces . If you use the + // same token with multiple AssociateFaces requests, the same response is + // returned. Use ClientRequestToken to prevent the same request from being + // processed more than once. + ClientRequestToken *string + + // An optional value specifying the minimum confidence in the UserID match to + // return. The default value is 75. + UserMatchThreshold *float32 + + noSmithyDocumentSerde +} + +type AssociateFacesOutput struct { + + // An array of AssociatedFace objects containing FaceIDs that are successfully + // associated with the UserID is returned. Returned if the AssociateFaces action is + // successful. + AssociatedFaces []types.AssociatedFace + + // An array of UnsuccessfulAssociation objects containing FaceIDs that are not + // successfully associated along with the reasons. Returned if the AssociateFaces + // action is successful. + UnsuccessfulFaceAssociations []types.UnsuccessfulFaceAssociation + + // The status of an update made to a UserID. Reflects if the UserID has been + // updated for every requested change. + UserStatus types.UserStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateFacesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateFaces{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateFaces{}, 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_opAssociateFacesMiddleware(stack, options); err != nil { + return err + } + if err = addOpAssociateFacesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateFaces(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_initializeOpAssociateFaces struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpAssociateFaces) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpAssociateFaces) 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.(*AssociateFacesInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateFacesInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opAssociateFacesMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateFaces{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opAssociateFaces(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rekognition", + OperationName: "AssociateFaces", + } +} diff --git a/service/rekognition/api_op_CreateUser.go b/service/rekognition/api_op_CreateUser.go new file mode 100644 index 00000000000..3a707130087 --- /dev/null +++ b/service/rekognition/api_op_CreateUser.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rekognition + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new User within a collection specified by CollectionId . Takes UserId +// as a parameter, which is a user provided ID which should be unique within the +// collection. The provided UserId will alias the system generated UUID to make +// the UserId more user friendly. Uses a ClientToken , an idempotency token that +// ensures a call to CreateUser completes only once. If the value is not supplied, +// the AWS SDK generates an idempotency token for the requests. This prevents +// retries after a network error results from making multiple CreateUser calls. +func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns ...func(*Options)) (*CreateUserOutput, error) { + if params == nil { + params = &CreateUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateUser", params, optFns, c.addOperationCreateUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateUserInput struct { + + // The ID of an existing collection to which the new UserID needs to be created. + // + // This member is required. + CollectionId *string + + // ID for the UserID to be created. This ID needs to be unique within the + // collection. + // + // This member is required. + UserId *string + + // Idempotent token used to identify the request to CreateUser . If you use the + // same token with multiple CreateUser requests, the same response is returned. + // Use ClientRequestToken to prevent the same request from being processed more + // than once. + ClientRequestToken *string + + noSmithyDocumentSerde +} + +type CreateUserOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUser{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateUserMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUser(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateUser struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateUser) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateUser) 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.(*CreateUserInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateUserInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateUserMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateUser{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rekognition", + OperationName: "CreateUser", + } +} diff --git a/service/rekognition/api_op_DeleteFaces.go b/service/rekognition/api_op_DeleteFaces.go index 634d77de224..cba5e099495 100644 --- a/service/rekognition/api_op_DeleteFaces.go +++ b/service/rekognition/api_op_DeleteFaces.go @@ -6,6 +6,7 @@ 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/rekognition/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -48,6 +49,9 @@ type DeleteFacesOutput struct { // An array of strings (face IDs) of the faces that were deleted. DeletedFaces []string + // An array of any faces that weren't deleted. + UnsuccessfulFaceDeletions []types.UnsuccessfulFaceDeletion + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/rekognition/api_op_DeleteUser.go b/service/rekognition/api_op_DeleteUser.go new file mode 100644 index 00000000000..d2e85603376 --- /dev/null +++ b/service/rekognition/api_op_DeleteUser.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rekognition + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified UserID within the collection. Faces that are associated +// with the UserID are disassociated from the UserID before deleting the specified +// UserID. If the specified Collection or UserID is already deleted or not found, +// a ResourceNotFoundException will be thrown. If the action is successful with a +// 200 response, an empty HTTP body is returned. +func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns ...func(*Options)) (*DeleteUserOutput, error) { + if params == nil { + params = &DeleteUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteUser", params, optFns, c.addOperationDeleteUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteUserInput struct { + + // The ID of an existing collection from which the UserID needs to be deleted. + // + // This member is required. + CollectionId *string + + // ID for the UserID to be deleted. + // + // This member is required. + UserId *string + + // Idempotent token used to identify the request to DeleteUser . If you use the + // same token with multiple DeleteUser requests, the same response is returned. + // Use ClientRequestToken to prevent the same request from being processed more + // than once. + ClientRequestToken *string + + noSmithyDocumentSerde +} + +type DeleteUserOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteUser{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteUserMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUser(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpDeleteUser struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteUser) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteUser) 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.(*DeleteUserInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteUserInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteUserMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteUser{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rekognition", + OperationName: "DeleteUser", + } +} diff --git a/service/rekognition/api_op_DescribeCollection.go b/service/rekognition/api_op_DescribeCollection.go index ca5cc3f078f..501b65f38b3 100644 --- a/service/rekognition/api_op_DescribeCollection.go +++ b/service/rekognition/api_op_DescribeCollection.go @@ -60,6 +60,9 @@ type DescribeCollectionOutput struct { // Guide. FaceModelVersion *string + // The number of UserIDs assigned to the specified colleciton. + UserCount *int64 + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/rekognition/api_op_DisassociateFaces.go b/service/rekognition/api_op_DisassociateFaces.go new file mode 100644 index 00000000000..002281ec85c --- /dev/null +++ b/service/rekognition/api_op_DisassociateFaces.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rekognition + +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/rekognition/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the association between a Face supplied in an array of FaceIds and the +// User. If the User is not present already, then a ResourceNotFound exception is +// thrown. If successful, an array of faces that are disassociated from the User is +// returned. If a given face is already disassociated from the given UserID, it +// will be ignored and not be returned in the response. If a given face is already +// associated with a different User or not found in the collection it will be +// returned as part of UnsuccessfulDisassociations . You can remove 1 - 100 face +// IDs from a user at one time. +func (c *Client) DisassociateFaces(ctx context.Context, params *DisassociateFacesInput, optFns ...func(*Options)) (*DisassociateFacesOutput, error) { + if params == nil { + params = &DisassociateFacesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateFaces", params, optFns, c.addOperationDisassociateFacesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateFacesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateFacesInput struct { + + // The ID of an existing collection containing the UserID. + // + // This member is required. + CollectionId *string + + // An array of face IDs to disassociate from the UserID. + // + // This member is required. + FaceIds []string + + // ID for the existing UserID. + // + // This member is required. + UserId *string + + // Idempotent token used to identify the request to DisassociateFaces . If you use + // the same token with multiple DisassociateFaces requests, the same response is + // returned. Use ClientRequestToken to prevent the same request from being + // processed more than once. + ClientRequestToken *string + + noSmithyDocumentSerde +} + +type DisassociateFacesOutput struct { + + // An array of DissociatedFace objects containing FaceIds that are successfully + // disassociated with the UserID is returned. Returned if the DisassociatedFaces + // action is successful. + DisassociatedFaces []types.DisassociatedFace + + // An array of UnsuccessfulDisassociation objects containing FaceIds that are not + // successfully associated, along with the reasons for the failure to associate. + // Returned if the DisassociateFaces action is successful. + UnsuccessfulFaceDisassociations []types.UnsuccessfulFaceDisassociation + + // The status of an update made to a User. Reflects if the User has been updated + // for every requested change. + UserStatus types.UserStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateFacesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateFaces{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateFaces{}, 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_opDisassociateFacesMiddleware(stack, options); err != nil { + return err + } + if err = addOpDisassociateFacesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateFaces(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_initializeOpDisassociateFaces struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDisassociateFaces) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDisassociateFaces) 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.(*DisassociateFacesInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DisassociateFacesInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDisassociateFacesMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDisassociateFaces{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDisassociateFaces(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rekognition", + OperationName: "DisassociateFaces", + } +} diff --git a/service/rekognition/api_op_ListFaces.go b/service/rekognition/api_op_ListFaces.go index 08ed8da71e6..3b591d0d54d 100644 --- a/service/rekognition/api_op_ListFaces.go +++ b/service/rekognition/api_op_ListFaces.go @@ -39,6 +39,9 @@ type ListFacesInput struct { // This member is required. CollectionId *string + // An array of face IDs to match when listing faces in a collection. + FaceIds []string + // Maximum number of faces to return. MaxResults *int32 @@ -47,6 +50,9 @@ type ListFacesInput struct { // can use this pagination token to retrieve the next set of faces. NextToken *string + // An array of user IDs to match when listing faces in a collection. + UserId *string + noSmithyDocumentSerde } diff --git a/service/rekognition/api_op_ListUsers.go b/service/rekognition/api_op_ListUsers.go new file mode 100644 index 00000000000..4dc28150dc1 --- /dev/null +++ b/service/rekognition/api_op_ListUsers.go @@ -0,0 +1,228 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rekognition + +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/rekognition/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns metadata of the User such as UserID in the specified collection. +// Anonymous User (to reserve faces without any identity) is not returned as part +// of this request. The results are sorted by system generated primary key ID. If +// the response is truncated, NextToken is returned in the response that can be +// used in the subsequent request to retrieve the next set of identities. +func (c *Client) ListUsers(ctx context.Context, params *ListUsersInput, optFns ...func(*Options)) (*ListUsersOutput, error) { + if params == nil { + params = &ListUsersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListUsers", params, optFns, c.addOperationListUsersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListUsersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListUsersInput struct { + + // The ID of an existing collection. + // + // This member is required. + CollectionId *string + + // Maximum number of UsersID to return. + MaxResults *int32 + + // Pagingation token to receive the next set of UsersID. + NextToken *string + + noSmithyDocumentSerde +} + +type ListUsersOutput struct { + + // A pagination token to be used with the subsequent request if the response is + // truncated. + NextToken *string + + // List of UsersID associated with the specified collection. + Users []types.User + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListUsers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListUsers{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListUsersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + +// ListUsersPaginatorOptions is the paginator options for ListUsers +type ListUsersPaginatorOptions struct { + // Maximum number of UsersID 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 +} + +// ListUsersPaginator is a paginator for ListUsers +type ListUsersPaginator struct { + options ListUsersPaginatorOptions + client ListUsersAPIClient + params *ListUsersInput + nextToken *string + firstPage bool +} + +// NewListUsersPaginator returns a new ListUsersPaginator +func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, optFns ...func(*ListUsersPaginatorOptions)) *ListUsersPaginator { + if params == nil { + params = &ListUsersInput{} + } + + options := ListUsersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUsersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUsersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListUsers page. +func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUsersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListUsers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rekognition", + OperationName: "ListUsers", + } +} diff --git a/service/rekognition/api_op_SearchUsers.go b/service/rekognition/api_op_SearchUsers.go new file mode 100644 index 00000000000..7aad25c00aa --- /dev/null +++ b/service/rekognition/api_op_SearchUsers.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rekognition + +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/rekognition/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches for UserIDs within a collection based on a FaceId or UserId . This API +// can be used to find the closest UserID (with a highest similarity) to associate +// a face. The request must be provided with either FaceId or UserId . The +// operation returns an array of UserID that match the FaceId or UserId , ordered +// by similarity score with the highest similarity first. +func (c *Client) SearchUsers(ctx context.Context, params *SearchUsersInput, optFns ...func(*Options)) (*SearchUsersOutput, error) { + if params == nil { + params = &SearchUsersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchUsers", params, optFns, c.addOperationSearchUsersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchUsersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchUsersInput struct { + + // The ID of an existing collection containing the UserID, used with a UserId or + // FaceId. If a FaceId is provided, UserId isn’t required to be present in the + // Collection. + // + // This member is required. + CollectionId *string + + // ID for the existing face. + FaceId *string + + // Maximum number of identities to return. + MaxUsers *int32 + + // ID for the existing User. + UserId *string + + // Optional value that specifies the minimum confidence in the matched UserID to + // return. Default value of 80. + UserMatchThreshold *float32 + + noSmithyDocumentSerde +} + +type SearchUsersOutput struct { + + // Version number of the face detection model associated with the input + // CollectionId. + FaceModelVersion *string + + // Contains the ID of a face that was used to search for matches in a collection. + SearchedFace *types.SearchedFace + + // Contains the ID of the UserID that was used to search for matches in a + // collection. + SearchedUser *types.SearchedUser + + // An array of UserMatch objects that matched the input face along with the + // confidence in the match. Array will be empty if there are no matches. + UserMatches []types.UserMatch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchUsersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSearchUsers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSearchUsers{}, 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 = addOpSearchUsersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchUsers(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_opSearchUsers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rekognition", + OperationName: "SearchUsers", + } +} diff --git a/service/rekognition/api_op_SearchUsersByImage.go b/service/rekognition/api_op_SearchUsersByImage.go new file mode 100644 index 00000000000..077a3f54a81 --- /dev/null +++ b/service/rekognition/api_op_SearchUsersByImage.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rekognition + +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/rekognition/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches for UserIDs using a supplied image. It first detects the largest face +// in the image, and then searches a specified collection for matching UserIDs. The +// operation returns an array of UserIDs that match the face in the supplied image, +// ordered by similarity score with the highest similarity first. It also returns a +// bounding box for the face found in the input image. Information about faces +// detected in the supplied image, but not used for the search, is returned in an +// array of UnsearchedFace objects. If no valid face is detected in the image, the +// response will contain an empty UserMatches list and no SearchedFace object. +func (c *Client) SearchUsersByImage(ctx context.Context, params *SearchUsersByImageInput, optFns ...func(*Options)) (*SearchUsersByImageOutput, error) { + if params == nil { + params = &SearchUsersByImageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchUsersByImage", params, optFns, c.addOperationSearchUsersByImageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchUsersByImageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchUsersByImageInput struct { + + // The ID of an existing collection containing the UserID. + // + // This member is required. + CollectionId *string + + // Provides the input image either as bytes or an S3 object. You pass image bytes + // to an Amazon Rekognition API operation by using the Bytes property. For + // example, you would use the Bytes property to pass an image loaded from a local + // file system. Image bytes passed by using the Bytes property must be + // base64-encoded. Your code may not need to encode image bytes if you are using an + // AWS SDK to call Amazon Rekognition API operations. For more information, see + // Analyzing an Image Loaded from a Local File System in the Amazon Rekognition + // Developer Guide. You pass images stored in an S3 bucket to an Amazon Rekognition + // API operation by using the S3Object property. Images stored in an S3 bucket do + // not need to be base64-encoded. The region for the S3 bucket containing the S3 + // object must match the region you use for Amazon Rekognition operations. If you + // use the AWS CLI to call Amazon Rekognition operations, passing image bytes using + // the Bytes property is not supported. You must first upload the image to an + // Amazon S3 bucket and then call the operation using the S3Object property. For + // Amazon Rekognition to process an S3 object, the user must have permission to + // access the S3 object. For more information, see How Amazon Rekognition works + // with IAM in the Amazon Rekognition Developer Guide. + // + // This member is required. + Image *types.Image + + // Maximum number of UserIDs to return. + MaxUsers *int32 + + // A filter that specifies a quality bar for how much filtering is done to + // identify faces. Filtered faces aren't searched for in the collection. The + // default value is NONE. + QualityFilter types.QualityFilter + + // Specifies the minimum confidence in the UserID match to return. Default value + // is 80. + UserMatchThreshold *float32 + + noSmithyDocumentSerde +} + +type SearchUsersByImageOutput struct { + + // Version number of the face detection model associated with the input collection + // CollectionId. + FaceModelVersion *string + + // A list of FaceDetail objects containing the BoundingBox for the largest face in + // image, as well as the confidence in the bounding box, that was searched for + // matches. If no valid face is detected in the image the response will contain no + // SearchedFace object. + SearchedFace *types.SearchedFaceDetails + + // List of UnsearchedFace objects. Contains the face details infered from the + // specified image but not used for search. Contains reasons that describe why a + // face wasn't used for Search. + UnsearchedFaces []types.UnsearchedFace + + // An array of UserID objects that matched the input face, along with the + // confidence in the match. The returned structure will be empty if there are no + // matches. Returned if the SearchUsersByImageResponse action is successful. + UserMatches []types.UserMatch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchUsersByImageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSearchUsersByImage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSearchUsersByImage{}, 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 = addOpSearchUsersByImageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchUsersByImage(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_opSearchUsersByImage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rekognition", + OperationName: "SearchUsersByImage", + } +} diff --git a/service/rekognition/deserializers.go b/service/rekognition/deserializers.go index 16b0ae8e599..40a612cac62 100644 --- a/service/rekognition/deserializers.go +++ b/service/rekognition/deserializers.go @@ -21,6 +21,141 @@ import ( "strings" ) +type awsAwsjson11_deserializeOpAssociateFaces struct { +} + +func (*awsAwsjson11_deserializeOpAssociateFaces) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAssociateFaces) HandleDeserialize(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_deserializeOpErrorAssociateFaces(response, &metadata) + } + output := &AssociateFacesOutput{} + 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_deserializeOpDocumentAssociateFacesOutput(&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_deserializeOpErrorAssociateFaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCompareFaces struct { } @@ -1071,6 +1206,141 @@ func awsAwsjson11_deserializeOpErrorCreateStreamProcessor(response *smithyhttp.R } } +type awsAwsjson11_deserializeOpCreateUser struct { +} + +func (*awsAwsjson11_deserializeOpCreateUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateUser(response, &metadata) + } + output := &CreateUserOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateUserOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDeleteCollection struct { } @@ -1971,14 +2241,14 @@ func awsAwsjson11_deserializeOpErrorDeleteStreamProcessor(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpDescribeCollection struct { +type awsAwsjson11_deserializeOpDeleteUser struct { } -func (*awsAwsjson11_deserializeOpDescribeCollection) ID() string { +func (*awsAwsjson11_deserializeOpDeleteUser) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1992,7 +2262,139 @@ func (m *awsAwsjson11_deserializeOpDescribeCollection) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCollection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteUser(response, &metadata) + } + output := &DeleteUserOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteUserOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeCollection struct { +} + +func (*awsAwsjson11_deserializeOpDescribeCollection) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeCollection) HandleDeserialize(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_deserializeOpErrorDescribeCollection(response, &metadata) } output := &DescribeCollectionOutput{} out.Result = output @@ -3408,6 +3810,138 @@ func awsAwsjson11_deserializeOpErrorDetectText(response *smithyhttp.Response, me } } +type awsAwsjson11_deserializeOpDisassociateFaces struct { +} + +func (*awsAwsjson11_deserializeOpDisassociateFaces) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDisassociateFaces) HandleDeserialize(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_deserializeOpErrorDisassociateFaces(response, &metadata) + } + output := &DisassociateFacesOutput{} + 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_deserializeOpDocumentDisassociateFacesOutput(&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_deserializeOpErrorDisassociateFaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDistributeDatasetEntries struct { } @@ -5868,14 +6402,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpPutProjectPolicy struct { +type awsAwsjson11_deserializeOpListUsers struct { } -func (*awsAwsjson11_deserializeOpPutProjectPolicy) ID() string { +func (*awsAwsjson11_deserializeOpListUsers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutProjectPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5889,9 +6423,9 @@ func (m *awsAwsjson11_deserializeOpPutProjectPolicy) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutProjectPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListUsers(response, &metadata) } - output := &PutProjectPolicyOutput{} + output := &ListUsersOutput{} out.Result = output var buff [1024]byte @@ -5911,7 +6445,136 @@ func (m *awsAwsjson11_deserializeOpPutProjectPolicy) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutProjectPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListUsersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidPaginationTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidPaginationTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutProjectPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutProjectPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutProjectPolicy) HandleDeserialize(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_deserializeOpErrorPutProjectPolicy(response, &metadata) + } + output := &PutProjectPolicyOutput{} + 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_deserializeOpDocumentPutProjectPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6402,14 +7065,14 @@ func awsAwsjson11_deserializeOpErrorSearchFacesByImage(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpStartCelebrityRecognition struct { +type awsAwsjson11_deserializeOpSearchUsers struct { } -func (*awsAwsjson11_deserializeOpStartCelebrityRecognition) ID() string { +func (*awsAwsjson11_deserializeOpSearchUsers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartCelebrityRecognition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSearchUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6423,9 +7086,9 @@ func (m *awsAwsjson11_deserializeOpStartCelebrityRecognition) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartCelebrityRecognition(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSearchUsers(response, &metadata) } - output := &StartCelebrityRecognitionOutput{} + output := &SearchUsersOutput{} out.Result = output var buff [1024]byte @@ -6445,7 +7108,7 @@ func (m *awsAwsjson11_deserializeOpStartCelebrityRecognition) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartCelebrityRecognitionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSearchUsersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6459,7 +7122,7 @@ func (m *awsAwsjson11_deserializeOpStartCelebrityRecognition) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartCelebrityRecognition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSearchUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6503,30 +7166,21 @@ func awsAwsjson11_deserializeOpErrorStartCelebrityRecognition(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("IdempotentParameterMismatchException", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidS3ObjectException", errorCode): - return awsAwsjson11_deserializeErrorInvalidS3ObjectException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("VideoTooLargeException", errorCode): - return awsAwsjson11_deserializeErrorVideoTooLargeException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6537,14 +7191,14 @@ func awsAwsjson11_deserializeOpErrorStartCelebrityRecognition(response *smithyht } } -type awsAwsjson11_deserializeOpStartContentModeration struct { +type awsAwsjson11_deserializeOpSearchUsersByImage struct { } -func (*awsAwsjson11_deserializeOpStartContentModeration) ID() string { +func (*awsAwsjson11_deserializeOpSearchUsersByImage) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartContentModeration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSearchUsersByImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6558,9 +7212,9 @@ func (m *awsAwsjson11_deserializeOpStartContentModeration) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartContentModeration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSearchUsersByImage(response, &metadata) } - output := &StartContentModerationOutput{} + output := &SearchUsersByImageOutput{} out.Result = output var buff [1024]byte @@ -6580,7 +7234,7 @@ func (m *awsAwsjson11_deserializeOpStartContentModeration) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartContentModerationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSearchUsersByImageOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6594,7 +7248,7 @@ func (m *awsAwsjson11_deserializeOpStartContentModeration) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartContentModeration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSearchUsersByImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6638,30 +7292,30 @@ func awsAwsjson11_deserializeOpErrorStartContentModeration(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("IdempotentParameterMismatchException", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + case strings.EqualFold("ImageTooLargeException", errorCode): + return awsAwsjson11_deserializeErrorImageTooLargeException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidImageFormatException", errorCode): + return awsAwsjson11_deserializeErrorInvalidImageFormatException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidS3ObjectException", errorCode): return awsAwsjson11_deserializeErrorInvalidS3ObjectException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("VideoTooLargeException", errorCode): - return awsAwsjson11_deserializeErrorVideoTooLargeException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6672,14 +7326,14 @@ func awsAwsjson11_deserializeOpErrorStartContentModeration(response *smithyhttp. } } -type awsAwsjson11_deserializeOpStartFaceDetection struct { +type awsAwsjson11_deserializeOpStartCelebrityRecognition struct { } -func (*awsAwsjson11_deserializeOpStartFaceDetection) ID() string { +func (*awsAwsjson11_deserializeOpStartCelebrityRecognition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartFaceDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartCelebrityRecognition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6693,9 +7347,9 @@ func (m *awsAwsjson11_deserializeOpStartFaceDetection) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartFaceDetection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartCelebrityRecognition(response, &metadata) } - output := &StartFaceDetectionOutput{} + output := &StartCelebrityRecognitionOutput{} out.Result = output var buff [1024]byte @@ -6715,7 +7369,7 @@ func (m *awsAwsjson11_deserializeOpStartFaceDetection) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartFaceDetectionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartCelebrityRecognitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6729,7 +7383,7 @@ func (m *awsAwsjson11_deserializeOpStartFaceDetection) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartFaceDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartCelebrityRecognition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6807,14 +7461,14 @@ func awsAwsjson11_deserializeOpErrorStartFaceDetection(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpStartFaceSearch struct { +type awsAwsjson11_deserializeOpStartContentModeration struct { } -func (*awsAwsjson11_deserializeOpStartFaceSearch) ID() string { +func (*awsAwsjson11_deserializeOpStartContentModeration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartFaceSearch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartContentModeration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6828,9 +7482,9 @@ func (m *awsAwsjson11_deserializeOpStartFaceSearch) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartFaceSearch(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartContentModeration(response, &metadata) } - output := &StartFaceSearchOutput{} + output := &StartContentModerationOutput{} out.Result = output var buff [1024]byte @@ -6850,7 +7504,7 @@ func (m *awsAwsjson11_deserializeOpStartFaceSearch) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartFaceSearchOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartContentModerationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6864,7 +7518,7 @@ func (m *awsAwsjson11_deserializeOpStartFaceSearch) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartFaceSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartContentModeration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6926,9 +7580,6 @@ func awsAwsjson11_deserializeOpErrorStartFaceSearch(response *smithyhttp.Respons case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) @@ -6945,14 +7596,14 @@ func awsAwsjson11_deserializeOpErrorStartFaceSearch(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpStartLabelDetection struct { +type awsAwsjson11_deserializeOpStartFaceDetection struct { } -func (*awsAwsjson11_deserializeOpStartLabelDetection) ID() string { +func (*awsAwsjson11_deserializeOpStartFaceDetection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartLabelDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartFaceDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6966,9 +7617,9 @@ func (m *awsAwsjson11_deserializeOpStartLabelDetection) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartLabelDetection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartFaceDetection(response, &metadata) } - output := &StartLabelDetectionOutput{} + output := &StartFaceDetectionOutput{} out.Result = output var buff [1024]byte @@ -6988,7 +7639,7 @@ func (m *awsAwsjson11_deserializeOpStartLabelDetection) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartLabelDetectionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartFaceDetectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7002,7 +7653,7 @@ func (m *awsAwsjson11_deserializeOpStartLabelDetection) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartLabelDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartFaceDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7080,14 +7731,14 @@ func awsAwsjson11_deserializeOpErrorStartLabelDetection(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpStartPersonTracking struct { +type awsAwsjson11_deserializeOpStartFaceSearch struct { } -func (*awsAwsjson11_deserializeOpStartPersonTracking) ID() string { +func (*awsAwsjson11_deserializeOpStartFaceSearch) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartPersonTracking) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartFaceSearch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7101,9 +7752,9 @@ func (m *awsAwsjson11_deserializeOpStartPersonTracking) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartPersonTracking(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartFaceSearch(response, &metadata) } - output := &StartPersonTrackingOutput{} + output := &StartFaceSearchOutput{} out.Result = output var buff [1024]byte @@ -7123,7 +7774,7 @@ func (m *awsAwsjson11_deserializeOpStartPersonTracking) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartPersonTrackingOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartFaceSearchOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7137,7 +7788,7 @@ func (m *awsAwsjson11_deserializeOpStartPersonTracking) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartPersonTracking(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartFaceSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7199,6 +7850,9 @@ func awsAwsjson11_deserializeOpErrorStartPersonTracking(response *smithyhttp.Res case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) @@ -7215,14 +7869,14 @@ func awsAwsjson11_deserializeOpErrorStartPersonTracking(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpStartProjectVersion struct { +type awsAwsjson11_deserializeOpStartLabelDetection struct { } -func (*awsAwsjson11_deserializeOpStartProjectVersion) ID() string { +func (*awsAwsjson11_deserializeOpStartLabelDetection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartProjectVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartLabelDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7236,9 +7890,9 @@ func (m *awsAwsjson11_deserializeOpStartProjectVersion) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartProjectVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartLabelDetection(response, &metadata) } - output := &StartProjectVersionOutput{} + output := &StartLabelDetectionOutput{} out.Result = output var buff [1024]byte @@ -7258,7 +7912,7 @@ func (m *awsAwsjson11_deserializeOpStartProjectVersion) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartProjectVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartLabelDetectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7272,7 +7926,7 @@ func (m *awsAwsjson11_deserializeOpStartProjectVersion) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartProjectVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartLabelDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7316,27 +7970,30 @@ func awsAwsjson11_deserializeOpErrorStartProjectVersion(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidS3ObjectException", errorCode): + return awsAwsjson11_deserializeErrorInvalidS3ObjectException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("VideoTooLargeException", errorCode): + return awsAwsjson11_deserializeErrorVideoTooLargeException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7347,14 +8004,14 @@ func awsAwsjson11_deserializeOpErrorStartProjectVersion(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpStartSegmentDetection struct { +type awsAwsjson11_deserializeOpStartPersonTracking struct { } -func (*awsAwsjson11_deserializeOpStartSegmentDetection) ID() string { +func (*awsAwsjson11_deserializeOpStartPersonTracking) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartSegmentDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartPersonTracking) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7368,9 +8025,9 @@ func (m *awsAwsjson11_deserializeOpStartSegmentDetection) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartSegmentDetection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartPersonTracking(response, &metadata) } - output := &StartSegmentDetectionOutput{} + output := &StartPersonTrackingOutput{} out.Result = output var buff [1024]byte @@ -7390,7 +8047,7 @@ func (m *awsAwsjson11_deserializeOpStartSegmentDetection) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartSegmentDetectionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartPersonTrackingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7404,7 +8061,7 @@ func (m *awsAwsjson11_deserializeOpStartSegmentDetection) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartSegmentDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartPersonTracking(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7482,14 +8139,14 @@ func awsAwsjson11_deserializeOpErrorStartSegmentDetection(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpStartStreamProcessor struct { +type awsAwsjson11_deserializeOpStartProjectVersion struct { } -func (*awsAwsjson11_deserializeOpStartStreamProcessor) ID() string { +func (*awsAwsjson11_deserializeOpStartProjectVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartStreamProcessor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartProjectVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7503,9 +8160,9 @@ func (m *awsAwsjson11_deserializeOpStartStreamProcessor) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartStreamProcessor(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartProjectVersion(response, &metadata) } - output := &StartStreamProcessorOutput{} + output := &StartProjectVersionOutput{} out.Result = output var buff [1024]byte @@ -7525,7 +8182,7 @@ func (m *awsAwsjson11_deserializeOpStartStreamProcessor) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartStreamProcessorOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartProjectVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7539,7 +8196,7 @@ func (m *awsAwsjson11_deserializeOpStartStreamProcessor) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartStreamProcessor(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartProjectVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7589,6 +8246,9 @@ func awsAwsjson11_deserializeOpErrorStartStreamProcessor(response *smithyhttp.Re case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) @@ -7611,14 +8271,14 @@ func awsAwsjson11_deserializeOpErrorStartStreamProcessor(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpStartTextDetection struct { +type awsAwsjson11_deserializeOpStartSegmentDetection struct { } -func (*awsAwsjson11_deserializeOpStartTextDetection) ID() string { +func (*awsAwsjson11_deserializeOpStartSegmentDetection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartTextDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartSegmentDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7632,9 +8292,9 @@ func (m *awsAwsjson11_deserializeOpStartTextDetection) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartTextDetection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartSegmentDetection(response, &metadata) } - output := &StartTextDetectionOutput{} + output := &StartSegmentDetectionOutput{} out.Result = output var buff [1024]byte @@ -7654,7 +8314,7 @@ func (m *awsAwsjson11_deserializeOpStartTextDetection) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartTextDetectionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartSegmentDetectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7668,7 +8328,7 @@ func (m *awsAwsjson11_deserializeOpStartTextDetection) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartTextDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartSegmentDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7746,14 +8406,14 @@ func awsAwsjson11_deserializeOpErrorStartTextDetection(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpStopProjectVersion struct { +type awsAwsjson11_deserializeOpStartStreamProcessor struct { } -func (*awsAwsjson11_deserializeOpStopProjectVersion) ID() string { +func (*awsAwsjson11_deserializeOpStartStreamProcessor) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopProjectVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartStreamProcessor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7767,9 +8427,9 @@ func (m *awsAwsjson11_deserializeOpStopProjectVersion) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopProjectVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartStreamProcessor(response, &metadata) } - output := &StopProjectVersionOutput{} + output := &StartStreamProcessorOutput{} out.Result = output var buff [1024]byte @@ -7789,7 +8449,7 @@ func (m *awsAwsjson11_deserializeOpStopProjectVersion) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopProjectVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartStreamProcessorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7803,7 +8463,7 @@ func (m *awsAwsjson11_deserializeOpStopProjectVersion) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopProjectVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartStreamProcessor(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7875,14 +8535,14 @@ func awsAwsjson11_deserializeOpErrorStopProjectVersion(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpStopStreamProcessor struct { +type awsAwsjson11_deserializeOpStartTextDetection struct { } -func (*awsAwsjson11_deserializeOpStopStreamProcessor) ID() string { +func (*awsAwsjson11_deserializeOpStartTextDetection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopStreamProcessor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartTextDetection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7896,9 +8556,9 @@ func (m *awsAwsjson11_deserializeOpStopStreamProcessor) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopStreamProcessor(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartTextDetection(response, &metadata) } - output := &StopStreamProcessorOutput{} + output := &StartTextDetectionOutput{} out.Result = output var buff [1024]byte @@ -7918,7 +8578,7 @@ func (m *awsAwsjson11_deserializeOpStopStreamProcessor) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopStreamProcessorOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartTextDetectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7932,7 +8592,7 @@ func (m *awsAwsjson11_deserializeOpStopStreamProcessor) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopStreamProcessor(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartTextDetection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7976,24 +8636,30 @@ func awsAwsjson11_deserializeOpErrorStopStreamProcessor(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): - return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + case strings.EqualFold("InvalidS3ObjectException", errorCode): + return awsAwsjson11_deserializeErrorInvalidS3ObjectException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("VideoTooLargeException", errorCode): + return awsAwsjson11_deserializeErrorVideoTooLargeException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8004,14 +8670,14 @@ func awsAwsjson11_deserializeOpErrorStopStreamProcessor(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpTagResource struct { +type awsAwsjson11_deserializeOpStopProjectVersion struct { } -func (*awsAwsjson11_deserializeOpTagResource) ID() string { +func (*awsAwsjson11_deserializeOpStopProjectVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopProjectVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8025,9 +8691,9 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopProjectVersion(response, &metadata) } - output := &TagResourceOutput{} + output := &StopProjectVersionOutput{} out.Result = output var buff [1024]byte @@ -8047,7 +8713,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopProjectVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8061,7 +8727,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopProjectVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8114,12 +8780,12 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) @@ -8133,14 +8799,14 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUntagResource struct { +type awsAwsjson11_deserializeOpStopStreamProcessor struct { } -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { +func (*awsAwsjson11_deserializeOpStopStreamProcessor) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopStreamProcessor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8154,9 +8820,9 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopStreamProcessor(response, &metadata) } - output := &UntagResourceOutput{} + output := &StopStreamProcessorOutput{} out.Result = output var buff [1024]byte @@ -8176,7 +8842,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopStreamProcessorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8190,7 +8856,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopStreamProcessor(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8243,6 +8909,9 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -8259,14 +8928,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateDatasetEntries struct { +type awsAwsjson11_deserializeOpTagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateDatasetEntries) ID() string { +func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDatasetEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8280,9 +8949,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDatasetEntries) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDatasetEntries(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateDatasetEntriesOutput{} + output := &TagResourceOutput{} out.Result = output var buff [1024]byte @@ -8302,7 +8971,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDatasetEntries) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDatasetEntriesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8316,7 +8985,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDatasetEntries) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDatasetEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8366,18 +9035,15 @@ func awsAwsjson11_deserializeOpErrorUpdateDatasetEntries(response *smithyhttp.Re case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) @@ -8391,14 +9057,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDatasetEntries(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpUpdateStreamProcessor struct { +type awsAwsjson11_deserializeOpUntagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateStreamProcessor) ID() string { +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateStreamProcessor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8412,9 +9078,9 @@ func (m *awsAwsjson11_deserializeOpUpdateStreamProcessor) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateStreamProcessor(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateStreamProcessorOutput{} + output := &UntagResourceOutput{} out.Result = output var buff [1024]byte @@ -8434,7 +9100,7 @@ func (m *awsAwsjson11_deserializeOpUpdateStreamProcessor) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateStreamProcessorOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8448,7 +9114,7 @@ func (m *awsAwsjson11_deserializeOpUpdateStreamProcessor) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateStreamProcessor(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8501,9 +9167,6 @@ func awsAwsjson11_deserializeOpErrorUpdateStreamProcessor(response *smithyhttp.R case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -8520,11 +9183,36 @@ func awsAwsjson11_deserializeOpErrorUpdateStreamProcessor(response *smithyhttp.R } } -func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpUpdateDatasetEntries struct { +} + +func (*awsAwsjson11_deserializeOpUpdateDatasetEntries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateDatasetEntries) HandleDeserialize(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_deserializeOpErrorUpdateDatasetEntries(response, &metadata) + } + output := &UpdateDatasetEntriesOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -8535,12 +9223,10 @@ func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.AccessDeniedException{} - err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdateDatasetEntriesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8548,34 +9234,34 @@ func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorHumanLoopQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdateDatasetEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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() - 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.HumanLoopQuotaExceededException{} - err := awsAwsjson11_deserializeDocumentHumanLoopQuotaExceededException(&output, shape) - + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8587,14 +9273,78 @@ func awsAwsjson11_deserializeErrorHumanLoopQuotaExceededException(response *smit } errorBody.Seek(0, io.SeekStart) - return output -} + 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("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateStreamProcessor struct { +} + +func (*awsAwsjson11_deserializeOpUpdateStreamProcessor) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateStreamProcessor) HandleDeserialize(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_deserializeOpErrorUpdateStreamProcessor(response, &metadata) + } + output := &UpdateStreamProcessorOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -8605,12 +9355,45 @@ func awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.IdempotentParameterMismatchException{} - err := awsAwsjson11_deserializeDocumentIdempotentParameterMismatchException(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateStreamProcessorOutput(&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_deserializeOpErrorUpdateStreamProcessor(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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) @@ -8622,10 +9405,46 @@ func awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response } errorBody.Seek(0, io.SeekStart) - return output + 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("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsAwsjson11_deserializeErrorImageTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8643,8 +9462,8 @@ func awsAwsjson11_deserializeErrorImageTooLargeException(response *smithyhttp.Re return err } - output := &types.ImageTooLargeException{} - err := awsAwsjson11_deserializeDocumentImageTooLargeException(&output, shape) + output := &types.AccessDeniedException{} + err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8660,7 +9479,7 @@ func awsAwsjson11_deserializeErrorImageTooLargeException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorInternalServerError(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8678,8 +9497,8 @@ func awsAwsjson11_deserializeErrorInternalServerError(response *smithyhttp.Respo return err } - output := &types.InternalServerError{} - err := awsAwsjson11_deserializeDocumentInternalServerError(&output, shape) + output := &types.ConflictException{} + err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8695,7 +9514,7 @@ func awsAwsjson11_deserializeErrorInternalServerError(response *smithyhttp.Respo return output } -func awsAwsjson11_deserializeErrorInvalidImageFormatException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorHumanLoopQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8713,8 +9532,8 @@ func awsAwsjson11_deserializeErrorInvalidImageFormatException(response *smithyht return err } - output := &types.InvalidImageFormatException{} - err := awsAwsjson11_deserializeDocumentInvalidImageFormatException(&output, shape) + output := &types.HumanLoopQuotaExceededException{} + err := awsAwsjson11_deserializeDocumentHumanLoopQuotaExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8730,7 +9549,7 @@ func awsAwsjson11_deserializeErrorInvalidImageFormatException(response *smithyht return output } -func awsAwsjson11_deserializeErrorInvalidPaginationTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8748,8 +9567,8 @@ func awsAwsjson11_deserializeErrorInvalidPaginationTokenException(response *smit return err } - output := &types.InvalidPaginationTokenException{} - err := awsAwsjson11_deserializeDocumentInvalidPaginationTokenException(&output, shape) + output := &types.IdempotentParameterMismatchException{} + err := awsAwsjson11_deserializeDocumentIdempotentParameterMismatchException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8765,7 +9584,7 @@ func awsAwsjson11_deserializeErrorInvalidPaginationTokenException(response *smit return output } -func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorImageTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8783,8 +9602,8 @@ func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp return err } - output := &types.InvalidParameterException{} - err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) + output := &types.ImageTooLargeException{} + err := awsAwsjson11_deserializeDocumentImageTooLargeException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8800,7 +9619,7 @@ func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorInvalidPolicyRevisionIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInternalServerError(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8818,8 +9637,8 @@ func awsAwsjson11_deserializeErrorInvalidPolicyRevisionIdException(response *smi return err } - output := &types.InvalidPolicyRevisionIdException{} - err := awsAwsjson11_deserializeDocumentInvalidPolicyRevisionIdException(&output, shape) + output := &types.InternalServerError{} + err := awsAwsjson11_deserializeDocumentInternalServerError(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8835,7 +9654,7 @@ func awsAwsjson11_deserializeErrorInvalidPolicyRevisionIdException(response *smi return output } -func awsAwsjson11_deserializeErrorInvalidS3ObjectException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidImageFormatException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8853,8 +9672,8 @@ func awsAwsjson11_deserializeErrorInvalidS3ObjectException(response *smithyhttp. return err } - output := &types.InvalidS3ObjectException{} - err := awsAwsjson11_deserializeDocumentInvalidS3ObjectException(&output, shape) + output := &types.InvalidImageFormatException{} + err := awsAwsjson11_deserializeDocumentInvalidImageFormatException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8870,7 +9689,7 @@ func awsAwsjson11_deserializeErrorInvalidS3ObjectException(response *smithyhttp. return output } -func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidPaginationTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8888,8 +9707,8 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re return err } - output := &types.LimitExceededException{} - err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) + output := &types.InvalidPaginationTokenException{} + err := awsAwsjson11_deserializeDocumentInvalidPaginationTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8905,7 +9724,7 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8923,8 +9742,8 @@ func awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response *smi return err } - output := &types.MalformedPolicyDocumentException{} - err := awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(&output, shape) + output := &types.InvalidParameterException{} + err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8940,7 +9759,7 @@ func awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response *smi return output } -func awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidPolicyRevisionIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8958,8 +9777,8 @@ func awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(respons return err } - output := &types.ProvisionedThroughputExceededException{} - err := awsAwsjson11_deserializeDocumentProvisionedThroughputExceededException(&output, shape) + output := &types.InvalidPolicyRevisionIdException{} + err := awsAwsjson11_deserializeDocumentInvalidPolicyRevisionIdException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8975,7 +9794,7 @@ func awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(respons return output } -func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidS3ObjectException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8993,8 +9812,8 @@ func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smith return err } - output := &types.ResourceAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) + output := &types.InvalidS3ObjectException{} + err := awsAwsjson11_deserializeDocumentInvalidS3ObjectException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9010,7 +9829,7 @@ func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smith return output } -func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9028,8 +9847,8 @@ func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Re return err } - output := &types.ResourceInUseException{} - err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) + output := &types.LimitExceededException{} + err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9045,7 +9864,7 @@ func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9063,8 +9882,8 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - output := &types.ResourceNotFoundException{} - err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + output := &types.MalformedPolicyDocumentException{} + err := awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9080,7 +9899,7 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorResourceNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9098,8 +9917,8 @@ func awsAwsjson11_deserializeErrorResourceNotReadyException(response *smithyhttp return err } - output := &types.ResourceNotReadyException{} - err := awsAwsjson11_deserializeDocumentResourceNotReadyException(&output, shape) + output := &types.ProvisionedThroughputExceededException{} + err := awsAwsjson11_deserializeDocumentProvisionedThroughputExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9115,7 +9934,7 @@ func awsAwsjson11_deserializeErrorResourceNotReadyException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9133,8 +9952,8 @@ func awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithy return err } - output := &types.ServiceQuotaExceededException{} - err := awsAwsjson11_deserializeDocumentServiceQuotaExceededException(&output, shape) + output := &types.ResourceAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9150,7 +9969,7 @@ func awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithy return output } -func awsAwsjson11_deserializeErrorSessionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9168,8 +9987,8 @@ func awsAwsjson11_deserializeErrorSessionNotFoundException(response *smithyhttp. return err } - output := &types.SessionNotFoundException{} - err := awsAwsjson11_deserializeDocumentSessionNotFoundException(&output, shape) + output := &types.ResourceInUseException{} + err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9185,7 +10004,7 @@ func awsAwsjson11_deserializeErrorSessionNotFoundException(response *smithyhttp. return output } -func awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9203,8 +10022,8 @@ func awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Respo return err } - output := &types.ThrottlingException{} - err := awsAwsjson11_deserializeDocumentThrottlingException(&output, shape) + output := &types.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9220,7 +10039,7 @@ func awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Respo return output } -func awsAwsjson11_deserializeErrorVideoTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorResourceNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9238,8 +10057,8 @@ func awsAwsjson11_deserializeErrorVideoTooLargeException(response *smithyhttp.Re return err } - output := &types.VideoTooLargeException{} - err := awsAwsjson11_deserializeDocumentVideoTooLargeException(&output, shape) + output := &types.ResourceNotReadyException{} + err := awsAwsjson11_deserializeDocumentResourceNotReadyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9255,15 +10074,155 @@ func awsAwsjson11_deserializeErrorVideoTooLargeException(response *smithyhttp.Re 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 - } +func awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - shape, ok := value.(map[string]interface{}) + 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.ServiceQuotaExceededException{} + err := awsAwsjson11_deserializeDocumentServiceQuotaExceededException(&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_deserializeErrorSessionNotFoundException(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.SessionNotFoundException{} + err := awsAwsjson11_deserializeDocumentSessionNotFoundException(&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_deserializeErrorThrottlingException(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.ThrottlingException{} + err := awsAwsjson11_deserializeDocumentThrottlingException(&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_deserializeErrorVideoTooLargeException(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.VideoTooLargeException{} + err := awsAwsjson11_deserializeDocumentVideoTooLargeException(&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) } @@ -9440,6 +10399,80 @@ func awsAwsjson11_deserializeDocumentAssets(v *[]types.Asset, value interface{}) return nil } +func awsAwsjson11_deserializeDocumentAssociatedFace(v **types.AssociatedFace, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AssociatedFace + if *v == nil { + sv = &types.AssociatedFace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FaceId to be of type string, got %T instead", value) + } + sv.FaceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociatedFacesList(v *[]types.AssociatedFace, 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.AssociatedFace + if *v == nil { + cv = []types.AssociatedFace{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociatedFace + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAssociatedFace(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentAudioMetadata(v **types.AudioMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10607,43 +11640,7 @@ func awsAwsjson11_deserializeDocumentCompareFacesUnmatchList(v *[]types.Compared return nil } -func awsAwsjson11_deserializeDocumentConnectedHomeLabels(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 ConnectedHomeLabel to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentConnectedHomeSettings(v **types.ConnectedHomeSettings, value interface{}) error { +func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10656,21 +11653,115 @@ func awsAwsjson11_deserializeDocumentConnectedHomeSettings(v **types.ConnectedHo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConnectedHomeSettings + var sv *types.ConflictException if *v == nil { - sv = &types.ConnectedHomeSettings{} + sv = &types.ConflictException{} } else { sv = *v } for key, value := range shape { switch key { - case "Labels": - if err := awsAwsjson11_deserializeDocumentConnectedHomeLabels(&sv.Labels, value); err != nil { - return err - } - - case "MinConfidence": + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + + case "Logref": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Logref = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentConnectedHomeLabels(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 ConnectedHomeLabel to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentConnectedHomeSettings(v **types.ConnectedHomeSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ConnectedHomeSettings + if *v == nil { + sv = &types.ConnectedHomeSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Labels": + if err := awsAwsjson11_deserializeDocumentConnectedHomeLabels(&sv.Labels, value); err != nil { + return err + } + + case "MinConfidence": if value != nil { switch jtv := value.(type) { case json.Number: @@ -11764,6 +12855,80 @@ func awsAwsjson11_deserializeDocumentDetectLabelsImageQuality(v **types.DetectLa return nil } +func awsAwsjson11_deserializeDocumentDisassociatedFace(v **types.DisassociatedFace, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.DisassociatedFace + if *v == nil { + sv = &types.DisassociatedFace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FaceId to be of type string, got %T instead", value) + } + sv.FaceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDisassociatedFacesList(v *[]types.DisassociatedFace, 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.DisassociatedFace + if *v == nil { + cv = []types.DisassociatedFace{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DisassociatedFace + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDisassociatedFace(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentDominantColor(v **types.DominantColor, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12603,6 +13768,15 @@ func awsAwsjson11_deserializeDocumentFace(v **types.Face, value interface{}) err sv.IndexFacesModelVersion = ptr.String(jtv) } + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + default: _, _ = key, value @@ -15179,6 +16353,55 @@ func awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(v **types. return nil } +func awsAwsjson11_deserializeDocumentMatchedUser(v **types.MatchedUser, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MatchedUser + if *v == nil { + sv = &types.MatchedUser{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + case "UserStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserStatus to be of type string, got %T instead", value) + } + sv.UserStatus = types.UserStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentModerationLabel(v **types.ModerationLabel, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17296,7 +18519,7 @@ func awsAwsjson11_deserializeDocumentS3Object(v **types.S3Object, value interfac return nil } -func awsAwsjson11_deserializeDocumentSegmentDetection(v **types.SegmentDetection, value interface{}) error { +func awsAwsjson11_deserializeDocumentSearchedFace(v **types.SearchedFace, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17309,52 +18532,168 @@ func awsAwsjson11_deserializeDocumentSegmentDetection(v **types.SegmentDetection return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SegmentDetection + var sv *types.SearchedFace if *v == nil { - sv = &types.SegmentDetection{} + sv = &types.SearchedFace{} } else { sv = *v } for key, value := range shape { switch key { - case "DurationFrames": + case "FaceId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected FaceId to be of type string, got %T instead", value) } - sv.DurationFrames = ptr.Int64(i64) + sv.FaceId = ptr.String(jtv) } - case "DurationMillis": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.DurationMillis = ptr.Int64(i64) - } + default: + _, _ = key, value - case "DurationSMPTE": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timecode to be of type string, got %T instead", value) - } - sv.DurationSMPTE = ptr.String(jtv) - } + } + } + *v = sv + return nil +} - case "EndFrameNumber": - if value != nil { +func awsAwsjson11_deserializeDocumentSearchedFaceDetails(v **types.SearchedFaceDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SearchedFaceDetails + if *v == nil { + sv = &types.SearchedFaceDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceDetail": + if err := awsAwsjson11_deserializeDocumentFaceDetail(&sv.FaceDetail, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSearchedUser(v **types.SearchedUser, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SearchedUser + if *v == nil { + sv = &types.SearchedUser{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSegmentDetection(v **types.SegmentDetection, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SegmentDetection + if *v == nil { + sv = &types.SegmentDetection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DurationFrames": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationFrames = ptr.Int64(i64) + } + + case "DurationMillis": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationMillis = ptr.Int64(i64) + } + + case "DurationSMPTE": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timecode to be of type string, got %T instead", value) + } + sv.DurationSMPTE = ptr.String(jtv) + } + + case "EndFrameNumber": + if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) @@ -18874,7 +20213,48 @@ func awsAwsjson11_deserializeDocumentUnindexedFaces(v *[]types.UnindexedFace, va return nil } -func awsAwsjson11_deserializeDocumentUrls(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsearchedFace(v **types.UnsearchedFace, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.UnsearchedFace + if *v == nil { + sv = &types.UnsearchedFace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceDetails": + if err := awsAwsjson11_deserializeDocumentFaceDetail(&sv.FaceDetails, value); err != nil { + return err + } + + case "Reasons": + if err := awsAwsjson11_deserializeDocumentUnsearchedFaceReasons(&sv.Reasons, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsearchedFaceReasons(v *[]types.UnsearchedFaceReason, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18887,21 +20267,21 @@ func awsAwsjson11_deserializeDocumentUrls(v *[]string, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.UnsearchedFaceReason if *v == nil { - cv = []string{} + cv = []types.UnsearchedFaceReason{} } else { cv = *v } for _, value := range shape { - var col string + var col types.UnsearchedFaceReason if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Url to be of type string, got %T instead", value) + return fmt.Errorf("expected UnsearchedFaceReason to be of type string, got %T instead", value) } - col = jtv + col = types.UnsearchedFaceReason(jtv) } cv = append(cv, col) @@ -18910,7 +20290,7 @@ func awsAwsjson11_deserializeDocumentUrls(v *[]string, value interface{}) error return nil } -func awsAwsjson11_deserializeDocumentValidationData(v **types.ValidationData, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsearchedFacesList(v *[]types.UnsearchedFace, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18918,35 +20298,33 @@ func awsAwsjson11_deserializeDocumentValidationData(v **types.ValidationData, va return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ValidationData + var cv []types.UnsearchedFace if *v == nil { - sv = &types.ValidationData{} + cv = []types.UnsearchedFace{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Assets": - if err := awsAwsjson11_deserializeDocumentAssets(&sv.Assets, value); err != nil { - return err - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.UnsearchedFace + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUnsearchedFace(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentVideo(v **types.Video, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceAssociation(v **types.UnsuccessfulFaceAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18959,20 +20337,72 @@ func awsAwsjson11_deserializeDocumentVideo(v **types.Video, value interface{}) e return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Video + var sv *types.UnsuccessfulFaceAssociation if *v == nil { - sv = &types.Video{} + sv = &types.UnsuccessfulFaceAssociation{} } else { sv = *v } for key, value := range shape { switch key { - case "S3Object": - if err := awsAwsjson11_deserializeDocumentS3Object(&sv.S3Object, value); err != nil { + case "Confidence": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Confidence = ptr.Float32(float32(f64)) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Confidence = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected Percent to be a JSON Number, got %T instead", value) + + } + } + + case "FaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FaceId to be of type string, got %T instead", value) + } + sv.FaceId = ptr.String(jtv) + } + + case "Reasons": + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceAssociationReasons(&sv.Reasons, value); err != nil { return err } + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + default: _, _ = key, value @@ -18982,7 +20412,7 @@ func awsAwsjson11_deserializeDocumentVideo(v **types.Video, value interface{}) e return nil } -func awsAwsjson11_deserializeDocumentVideoMetadata(v **types.VideoMetadata, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceAssociationList(v *[]types.UnsuccessfulFaceAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18990,19 +20420,632 @@ func awsAwsjson11_deserializeDocumentVideoMetadata(v **types.VideoMetadata, valu return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.VideoMetadata + var cv []types.UnsuccessfulFaceAssociation if *v == nil { - sv = &types.VideoMetadata{} + cv = []types.UnsuccessfulFaceAssociation{} } else { - sv = *v + cv = *v } - for key, value := range shape { + for _, value := range shape { + var col types.UnsuccessfulFaceAssociation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceAssociation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceAssociationReasons(v *[]types.UnsuccessfulFaceAssociationReason, 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.UnsuccessfulFaceAssociationReason + if *v == nil { + cv = []types.UnsuccessfulFaceAssociationReason{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UnsuccessfulFaceAssociationReason + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UnsuccessfulFaceAssociationReason to be of type string, got %T instead", value) + } + col = types.UnsuccessfulFaceAssociationReason(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceDeletion(v **types.UnsuccessfulFaceDeletion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.UnsuccessfulFaceDeletion + if *v == nil { + sv = &types.UnsuccessfulFaceDeletion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FaceId to be of type string, got %T instead", value) + } + sv.FaceId = ptr.String(jtv) + } + + case "Reasons": + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceDeletionReasons(&sv.Reasons, value); err != nil { + return err + } + + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceDeletionReasons(v *[]types.UnsuccessfulFaceDeletionReason, 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.UnsuccessfulFaceDeletionReason + if *v == nil { + cv = []types.UnsuccessfulFaceDeletionReason{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UnsuccessfulFaceDeletionReason + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UnsuccessfulFaceDeletionReason to be of type string, got %T instead", value) + } + col = types.UnsuccessfulFaceDeletionReason(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceDeletionsList(v *[]types.UnsuccessfulFaceDeletion, 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.UnsuccessfulFaceDeletion + if *v == nil { + cv = []types.UnsuccessfulFaceDeletion{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UnsuccessfulFaceDeletion + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceDeletion(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceDisassociation(v **types.UnsuccessfulFaceDisassociation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.UnsuccessfulFaceDisassociation + if *v == nil { + sv = &types.UnsuccessfulFaceDisassociation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FaceId to be of type string, got %T instead", value) + } + sv.FaceId = ptr.String(jtv) + } + + case "Reasons": + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceDisassociationReasons(&sv.Reasons, value); err != nil { + return err + } + + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceDisassociationList(v *[]types.UnsuccessfulFaceDisassociation, 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.UnsuccessfulFaceDisassociation + if *v == nil { + cv = []types.UnsuccessfulFaceDisassociation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UnsuccessfulFaceDisassociation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceDisassociation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsuccessfulFaceDisassociationReasons(v *[]types.UnsuccessfulFaceDisassociationReason, 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.UnsuccessfulFaceDisassociationReason + if *v == nil { + cv = []types.UnsuccessfulFaceDisassociationReason{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UnsuccessfulFaceDisassociationReason + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UnsuccessfulFaceDisassociationReason to be of type string, got %T instead", value) + } + col = types.UnsuccessfulFaceDisassociationReason(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUrls(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 Url to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.User + if *v == nil { + sv = &types.User{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserId to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + case "UserStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserStatus to be of type string, got %T instead", value) + } + sv.UserStatus = types.UserStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUserList(v *[]types.User, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.User + if *v == nil { + cv = []types.User{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.User + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUser(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUserMatch(v **types.UserMatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.UserMatch + if *v == nil { + sv = &types.UserMatch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Similarity": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Similarity = ptr.Float32(float32(f64)) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Similarity = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected Percent to be a JSON Number, got %T instead", value) + + } + } + + case "User": + if err := awsAwsjson11_deserializeDocumentMatchedUser(&sv.User, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUserMatchList(v *[]types.UserMatch, 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.UserMatch + if *v == nil { + cv = []types.UserMatch{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UserMatch + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUserMatch(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentValidationData(v **types.ValidationData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ValidationData + if *v == nil { + sv = &types.ValidationData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Assets": + if err := awsAwsjson11_deserializeDocumentAssets(&sv.Assets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentVideo(v **types.Video, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Video + if *v == nil { + sv = &types.Video{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Object": + if err := awsAwsjson11_deserializeDocumentS3Object(&sv.S3Object, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentVideoMetadata(v **types.VideoMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.VideoMetadata + if *v == nil { + sv = &types.VideoMetadata{} + } else { + sv = *v + } + + for key, value := range shape { switch key { case "Codec": if value != nil { @@ -19178,22 +21221,72 @@ func awsAwsjson11_deserializeDocumentVideoTooLargeException(v **types.VideoTooLa sv.Code = ptr.String(jtv) } - case "Logref": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Logref = ptr.String(jtv) + case "Logref": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Logref = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentAssociateFacesOutput(v **AssociateFacesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AssociateFacesOutput + if *v == nil { + sv = &AssociateFacesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociatedFaces": + if err := awsAwsjson11_deserializeDocumentAssociatedFacesList(&sv.AssociatedFaces, value); err != nil { + return err + } + + case "UnsuccessfulFaceAssociations": + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceAssociationList(&sv.UnsuccessfulFaceAssociations, value); err != nil { + return err } - case "Message": + case "UserStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected UserStatus to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.UserStatus = types.UserStatus(jtv) } default: @@ -19571,6 +21664,37 @@ func awsAwsjson11_deserializeOpDocumentCreateStreamProcessorOutput(v **CreateStr return nil } +func awsAwsjson11_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateUserOutput + if *v == nil { + sv = &CreateUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDeleteCollectionOutput(v **DeleteCollectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19673,6 +21797,11 @@ func awsAwsjson11_deserializeOpDocumentDeleteFacesOutput(v **DeleteFacesOutput, return err } + case "UnsuccessfulFaceDeletions": + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceDeletionsList(&sv.UnsuccessfulFaceDeletions, value); err != nil { + return err + } + default: _, _ = key, value @@ -19824,6 +21953,37 @@ func awsAwsjson11_deserializeOpDocumentDeleteStreamProcessorOutput(v **DeleteStr return nil } +func awsAwsjson11_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteUserOutput + if *v == nil { + sv = &DeleteUserOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeCollectionOutput(v **DescribeCollectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19893,6 +22053,19 @@ func awsAwsjson11_deserializeOpDocumentDescribeCollectionOutput(v **DescribeColl sv.FaceModelVersion = ptr.String(jtv) } + case "UserCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ULong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UserCount = ptr.Int64(i64) + } + default: _, _ = key, value @@ -20460,6 +22633,56 @@ func awsAwsjson11_deserializeOpDocumentDetectTextOutput(v **DetectTextOutput, va return nil } +func awsAwsjson11_deserializeOpDocumentDisassociateFacesOutput(v **DisassociateFacesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisassociateFacesOutput + if *v == nil { + sv = &DisassociateFacesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DisassociatedFaces": + if err := awsAwsjson11_deserializeDocumentDisassociatedFacesList(&sv.DisassociatedFaces, value); err != nil { + return err + } + + case "UnsuccessfulFaceDisassociations": + if err := awsAwsjson11_deserializeDocumentUnsuccessfulFaceDisassociationList(&sv.UnsuccessfulFaceDisassociations, value); err != nil { + return err + } + + case "UserStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserStatus to be of type string, got %T instead", value) + } + sv.UserStatus = types.UserStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDistributeDatasetEntriesOutput(v **DistributeDatasetEntriesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21788,6 +24011,51 @@ func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } +func awsAwsjson11_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListUsersOutput + if *v == nil { + sv = &ListUsersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Users": + if err := awsAwsjson11_deserializeDocumentUserList(&sv.Users, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentPutProjectPolicyOutput(v **PutProjectPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -22016,6 +24284,116 @@ func awsAwsjson11_deserializeOpDocumentSearchFacesOutput(v **SearchFacesOutput, return nil } +func awsAwsjson11_deserializeOpDocumentSearchUsersByImageOutput(v **SearchUsersByImageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SearchUsersByImageOutput + if *v == nil { + sv = &SearchUsersByImageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceModelVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FaceModelVersion = ptr.String(jtv) + } + + case "SearchedFace": + if err := awsAwsjson11_deserializeDocumentSearchedFaceDetails(&sv.SearchedFace, value); err != nil { + return err + } + + case "UnsearchedFaces": + if err := awsAwsjson11_deserializeDocumentUnsearchedFacesList(&sv.UnsearchedFaces, value); err != nil { + return err + } + + case "UserMatches": + if err := awsAwsjson11_deserializeDocumentUserMatchList(&sv.UserMatches, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentSearchUsersOutput(v **SearchUsersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SearchUsersOutput + if *v == nil { + sv = &SearchUsersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FaceModelVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FaceModelVersion = ptr.String(jtv) + } + + case "SearchedFace": + if err := awsAwsjson11_deserializeDocumentSearchedFace(&sv.SearchedFace, value); err != nil { + return err + } + + case "SearchedUser": + if err := awsAwsjson11_deserializeDocumentSearchedUser(&sv.SearchedUser, value); err != nil { + return err + } + + case "UserMatches": + if err := awsAwsjson11_deserializeDocumentUserMatchList(&sv.UserMatches, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentStartCelebrityRecognitionOutput(v **StartCelebrityRecognitionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/rekognition/doc.go b/service/rekognition/doc.go index ea1842c553e..0d440614d06 100644 --- a/service/rekognition/doc.go +++ b/service/rekognition/doc.go @@ -9,23 +9,30 @@ // , Amazon Rekognition Streaming Video (https://docs.aws.amazon.com/rekognition/latest/dg/streaming-video.html) // . It provides descriptions of actions, data types, common parameters, and common // errors. Amazon Rekognition Image +// - AssociateFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_AssociateFaces.html) // - CompareFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CompareFaces.html) // - CreateCollection (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateCollection.html) +// - CreateUser (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateUser.html) // - DeleteCollection (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DeleteCollection.html) // - DeleteFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DeleteFaces.html) +// - DeleteUser (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DeleteUser.html) // - DescribeCollection (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DescribeCollection.html) // - DetectFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectFaces.html) // - DetectLabels (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectLabels.html) // - DetectModerationLabels (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectModerationLabels.html) // - DetectProtectiveEquipment (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectProtectiveEquipment.html) // - DetectText (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectText.html) +// - DisassociateFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DisassociateFaces.html) // - GetCelebrityInfo (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetCelebrityInfo.html) // - IndexFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html) // - ListCollections (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListCollections.html) // - ListFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html) +// - ListUsers (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html) // - RecognizeCelebrities (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_RecognizeCelebrities.html) // - SearchFaces (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFaces.html) // - SearchFacesByImage (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFacesByImage.html) +// - SearchUsers (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsers.html) +// - SearchUsersByImage (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html) // // Amazon Rekognition Custom Labels // - CopyProjectVersion (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CopyProjectVersion.html) diff --git a/service/rekognition/generated.json b/service/rekognition/generated.json index f76426529e3..1735d8d4c42 100644 --- a/service/rekognition/generated.json +++ b/service/rekognition/generated.json @@ -9,6 +9,7 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AssociateFaces.go", "api_op_CompareFaces.go", "api_op_CopyProjectVersion.go", "api_op_CreateCollection.go", @@ -17,6 +18,7 @@ "api_op_CreateProject.go", "api_op_CreateProjectVersion.go", "api_op_CreateStreamProcessor.go", + "api_op_CreateUser.go", "api_op_DeleteCollection.go", "api_op_DeleteDataset.go", "api_op_DeleteFaces.go", @@ -24,6 +26,7 @@ "api_op_DeleteProjectPolicy.go", "api_op_DeleteProjectVersion.go", "api_op_DeleteStreamProcessor.go", + "api_op_DeleteUser.go", "api_op_DescribeCollection.go", "api_op_DescribeDataset.go", "api_op_DescribeProjectVersions.go", @@ -35,6 +38,7 @@ "api_op_DetectModerationLabels.go", "api_op_DetectProtectiveEquipment.go", "api_op_DetectText.go", + "api_op_DisassociateFaces.go", "api_op_DistributeDatasetEntries.go", "api_op_GetCelebrityInfo.go", "api_op_GetCelebrityRecognition.go", @@ -54,10 +58,13 @@ "api_op_ListProjectPolicies.go", "api_op_ListStreamProcessors.go", "api_op_ListTagsForResource.go", + "api_op_ListUsers.go", "api_op_PutProjectPolicy.go", "api_op_RecognizeCelebrities.go", "api_op_SearchFaces.go", "api_op_SearchFacesByImage.go", + "api_op_SearchUsers.go", + "api_op_SearchUsersByImage.go", "api_op_StartCelebrityRecognition.go", "api_op_StartContentModeration.go", "api_op_StartFaceDetection.go", diff --git a/service/rekognition/serializers.go b/service/rekognition/serializers.go index 47dccc0acd0..7d12bf79411 100644 --- a/service/rekognition/serializers.go +++ b/service/rekognition/serializers.go @@ -16,6 +16,61 @@ import ( "path" ) +type awsAwsjson11_serializeOpAssociateFaces struct { +} + +func (*awsAwsjson11_serializeOpAssociateFaces) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAssociateFaces) 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.(*AssociateFacesInput) + _ = 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("RekognitionService.AssociateFaces") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAssociateFacesInput(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_serializeOpCompareFaces struct { } @@ -456,6 +511,61 @@ func (m *awsAwsjson11_serializeOpCreateStreamProcessor) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateUser struct { +} + +func (*awsAwsjson11_serializeOpCreateUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.CreateUser") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateUserInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteCollection struct { } @@ -841,6 +951,61 @@ func (m *awsAwsjson11_serializeOpDeleteStreamProcessor) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteUser struct { +} + +func (*awsAwsjson11_serializeOpDeleteUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteUserInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.DeleteUser") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteUserInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeCollection struct { } @@ -1446,6 +1611,61 @@ func (m *awsAwsjson11_serializeOpDetectText) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDisassociateFaces struct { +} + +func (*awsAwsjson11_serializeOpDisassociateFaces) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDisassociateFaces) 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.(*DisassociateFacesInput) + _ = 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("RekognitionService.DisassociateFaces") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDisassociateFacesInput(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_serializeOpDistributeDatasetEntries struct { } @@ -2420,7 +2640,172 @@ func (m *awsAwsjson11_serializeOpListStreamProcessors) HandleSerialize(ctx conte httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.ListStreamProcessors") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListStreamProcessorsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListStreamProcessorsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.ListTagsForResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListUsers struct { +} + +func (*awsAwsjson11_serializeOpListUsers) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListUsersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.ListUsers") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListUsersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutProjectPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutProjectPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutProjectPolicy) 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.(*PutProjectPolicyInput) + _ = 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("RekognitionService.PutProjectPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutProjectPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2436,14 +2821,14 @@ func (m *awsAwsjson11_serializeOpListStreamProcessors) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListTagsForResource struct { +type awsAwsjson11_serializeOpRecognizeCelebrities struct { } -func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_serializeOpRecognizeCelebrities) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpRecognizeCelebrities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2451,7 +2836,7 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*RecognizeCelebritiesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2472,10 +2857,10 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.ListTagsForResource") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.RecognizeCelebrities") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentRecognizeCelebritiesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2491,14 +2876,14 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpPutProjectPolicy struct { +type awsAwsjson11_serializeOpSearchFaces struct { } -func (*awsAwsjson11_serializeOpPutProjectPolicy) ID() string { +func (*awsAwsjson11_serializeOpSearchFaces) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpPutProjectPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpSearchFaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2506,7 +2891,7 @@ func (m *awsAwsjson11_serializeOpPutProjectPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*PutProjectPolicyInput) + input, ok := in.Parameters.(*SearchFacesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2527,10 +2912,10 @@ func (m *awsAwsjson11_serializeOpPutProjectPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.PutProjectPolicy") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.SearchFaces") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentPutProjectPolicyInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentSearchFacesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2546,14 +2931,14 @@ func (m *awsAwsjson11_serializeOpPutProjectPolicy) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpRecognizeCelebrities struct { +type awsAwsjson11_serializeOpSearchFacesByImage struct { } -func (*awsAwsjson11_serializeOpRecognizeCelebrities) ID() string { +func (*awsAwsjson11_serializeOpSearchFacesByImage) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpRecognizeCelebrities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpSearchFacesByImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2561,7 +2946,7 @@ func (m *awsAwsjson11_serializeOpRecognizeCelebrities) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RecognizeCelebritiesInput) + input, ok := in.Parameters.(*SearchFacesByImageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2582,10 +2967,10 @@ func (m *awsAwsjson11_serializeOpRecognizeCelebrities) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.RecognizeCelebrities") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.SearchFacesByImage") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentRecognizeCelebritiesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentSearchFacesByImageInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2601,14 +2986,14 @@ func (m *awsAwsjson11_serializeOpRecognizeCelebrities) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpSearchFaces struct { +type awsAwsjson11_serializeOpSearchUsers struct { } -func (*awsAwsjson11_serializeOpSearchFaces) ID() string { +func (*awsAwsjson11_serializeOpSearchUsers) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpSearchFaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpSearchUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2616,7 +3001,7 @@ func (m *awsAwsjson11_serializeOpSearchFaces) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchFacesInput) + input, ok := in.Parameters.(*SearchUsersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2637,10 +3022,10 @@ func (m *awsAwsjson11_serializeOpSearchFaces) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.SearchFaces") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.SearchUsers") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentSearchFacesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentSearchUsersInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2656,14 +3041,14 @@ func (m *awsAwsjson11_serializeOpSearchFaces) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpSearchFacesByImage struct { +type awsAwsjson11_serializeOpSearchUsersByImage struct { } -func (*awsAwsjson11_serializeOpSearchFacesByImage) ID() string { +func (*awsAwsjson11_serializeOpSearchUsersByImage) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpSearchFacesByImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpSearchUsersByImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2671,7 +3056,7 @@ func (m *awsAwsjson11_serializeOpSearchFacesByImage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchFacesByImageInput) + input, ok := in.Parameters.(*SearchUsersByImageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2692,10 +3077,10 @@ func (m *awsAwsjson11_serializeOpSearchFacesByImage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.SearchFacesByImage") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RekognitionService.SearchUsersByImage") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentSearchFacesByImageInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentSearchUsersByImageInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4802,6 +5187,17 @@ func awsAwsjson11_serializeDocumentTrainingData(v *types.TrainingData, value smi return nil } +func awsAwsjson11_serializeDocumentUserFaceIdList(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_serializeDocumentVersionNames(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4827,6 +5223,53 @@ func awsAwsjson11_serializeDocumentVideo(v *types.Video, value smithyjson.Value) return nil } +func awsAwsjson11_serializeOpDocumentAssociateFacesInput(v *AssociateFacesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.CollectionId != nil { + ok := object.Key("CollectionId") + ok.String(*v.CollectionId) + } + + if v.FaceIds != nil { + ok := object.Key("FaceIds") + if err := awsAwsjson11_serializeDocumentUserFaceIdList(v.FaceIds, ok); err != nil { + return err + } + } + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + if v.UserMatchThreshold != nil { + ok := object.Key("UserMatchThreshold") + switch { + case math.IsNaN(float64(*v.UserMatchThreshold)): + ok.String("NaN") + + case math.IsInf(float64(*v.UserMatchThreshold), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.UserMatchThreshold), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.UserMatchThreshold) + + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCompareFacesInput(v *CompareFacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5117,6 +5560,28 @@ func awsAwsjson11_serializeOpDocumentCreateStreamProcessorInput(v *CreateStreamP return nil } +func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.CollectionId != nil { + ok := object.Key("CollectionId") + ok.String(*v.CollectionId) + } + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteCollectionInput(v *DeleteCollectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5218,6 +5683,28 @@ func awsAwsjson11_serializeOpDocumentDeleteStreamProcessorInput(v *DeleteStreamP return nil } +func awsAwsjson11_serializeOpDocumentDeleteUserInput(v *DeleteUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.CollectionId != nil { + ok := object.Key("CollectionId") + ok.String(*v.CollectionId) + } + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeCollectionInput(v *DescribeCollectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5502,6 +5989,35 @@ func awsAwsjson11_serializeOpDocumentDetectTextInput(v *DetectTextInput, value s return nil } +func awsAwsjson11_serializeOpDocumentDisassociateFacesInput(v *DisassociateFacesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.CollectionId != nil { + ok := object.Key("CollectionId") + ok.String(*v.CollectionId) + } + + if v.FaceIds != nil { + ok := object.Key("FaceIds") + if err := awsAwsjson11_serializeDocumentUserFaceIdList(v.FaceIds, ok); err != nil { + return err + } + } + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDistributeDatasetEntriesInput(v *DistributeDatasetEntriesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5884,6 +6400,13 @@ func awsAwsjson11_serializeOpDocumentListFacesInput(v *ListFacesInput, value smi ok.String(*v.CollectionId) } + if v.FaceIds != nil { + ok := object.Key("FaceIds") + if err := awsAwsjson11_serializeDocumentFaceIdList(v.FaceIds, ok); err != nil { + return err + } + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -5894,6 +6417,11 @@ func awsAwsjson11_serializeOpDocumentListFacesInput(v *ListFacesInput, value smi ok.String(*v.NextToken) } + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + return nil } @@ -5948,6 +6476,28 @@ func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForReso return nil } +func awsAwsjson11_serializeOpDocumentListUsersInput(v *ListUsersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CollectionId != nil { + ok := object.Key("CollectionId") + ok.String(*v.CollectionId) + } + + 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_serializeOpDocumentPutProjectPolicyInput(v *PutProjectPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6076,6 +6626,98 @@ func awsAwsjson11_serializeOpDocumentSearchFacesInput(v *SearchFacesInput, value return nil } +func awsAwsjson11_serializeOpDocumentSearchUsersByImageInput(v *SearchUsersByImageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CollectionId != nil { + ok := object.Key("CollectionId") + ok.String(*v.CollectionId) + } + + if v.Image != nil { + ok := object.Key("Image") + if err := awsAwsjson11_serializeDocumentImage(v.Image, ok); err != nil { + return err + } + } + + if v.MaxUsers != nil { + ok := object.Key("MaxUsers") + ok.Integer(*v.MaxUsers) + } + + if len(v.QualityFilter) > 0 { + ok := object.Key("QualityFilter") + ok.String(string(v.QualityFilter)) + } + + if v.UserMatchThreshold != nil { + ok := object.Key("UserMatchThreshold") + switch { + case math.IsNaN(float64(*v.UserMatchThreshold)): + ok.String("NaN") + + case math.IsInf(float64(*v.UserMatchThreshold), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.UserMatchThreshold), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.UserMatchThreshold) + + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentSearchUsersInput(v *SearchUsersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CollectionId != nil { + ok := object.Key("CollectionId") + ok.String(*v.CollectionId) + } + + if v.FaceId != nil { + ok := object.Key("FaceId") + ok.String(*v.FaceId) + } + + if v.MaxUsers != nil { + ok := object.Key("MaxUsers") + ok.Integer(*v.MaxUsers) + } + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + if v.UserMatchThreshold != nil { + ok := object.Key("UserMatchThreshold") + switch { + case math.IsNaN(float64(*v.UserMatchThreshold)): + ok.String("NaN") + + case math.IsInf(float64(*v.UserMatchThreshold), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.UserMatchThreshold), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.UserMatchThreshold) + + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentStartCelebrityRecognitionInput(v *StartCelebrityRecognitionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/rekognition/types/enums.go b/service/rekognition/types/enums.go index 6294d2bedfd..06644515942 100644 --- a/service/rekognition/types/enums.go +++ b/service/rekognition/types/enums.go @@ -760,6 +760,117 @@ func (TextTypes) Values() []TextTypes { } } +type UnsearchedFaceReason string + +// Enum values for UnsearchedFaceReason +const ( + UnsearchedFaceReasonFaceNotLargest UnsearchedFaceReason = "FACE_NOT_LARGEST" + UnsearchedFaceReasonExceedsMaxFaces UnsearchedFaceReason = "EXCEEDS_MAX_FACES" + UnsearchedFaceReasonExtremePose UnsearchedFaceReason = "EXTREME_POSE" + UnsearchedFaceReasonLowBrightness UnsearchedFaceReason = "LOW_BRIGHTNESS" + UnsearchedFaceReasonLowSharpness UnsearchedFaceReason = "LOW_SHARPNESS" + UnsearchedFaceReasonLowConfidence UnsearchedFaceReason = "LOW_CONFIDENCE" + UnsearchedFaceReasonSmallBoundingBox UnsearchedFaceReason = "SMALL_BOUNDING_BOX" + UnsearchedFaceReasonLowFaceQuality UnsearchedFaceReason = "LOW_FACE_QUALITY" +) + +// Values returns all known values for UnsearchedFaceReason. 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 (UnsearchedFaceReason) Values() []UnsearchedFaceReason { + return []UnsearchedFaceReason{ + "FACE_NOT_LARGEST", + "EXCEEDS_MAX_FACES", + "EXTREME_POSE", + "LOW_BRIGHTNESS", + "LOW_SHARPNESS", + "LOW_CONFIDENCE", + "SMALL_BOUNDING_BOX", + "LOW_FACE_QUALITY", + } +} + +type UnsuccessfulFaceAssociationReason string + +// Enum values for UnsuccessfulFaceAssociationReason +const ( + UnsuccessfulFaceAssociationReasonFaceNotFound UnsuccessfulFaceAssociationReason = "FACE_NOT_FOUND" + UnsuccessfulFaceAssociationReasonAssociatedToADifferentUser UnsuccessfulFaceAssociationReason = "ASSOCIATED_TO_A_DIFFERENT_USER" + UnsuccessfulFaceAssociationReasonLowMatchConfidence UnsuccessfulFaceAssociationReason = "LOW_MATCH_CONFIDENCE" +) + +// Values returns all known values for UnsuccessfulFaceAssociationReason. 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 (UnsuccessfulFaceAssociationReason) Values() []UnsuccessfulFaceAssociationReason { + return []UnsuccessfulFaceAssociationReason{ + "FACE_NOT_FOUND", + "ASSOCIATED_TO_A_DIFFERENT_USER", + "LOW_MATCH_CONFIDENCE", + } +} + +type UnsuccessfulFaceDeletionReason string + +// Enum values for UnsuccessfulFaceDeletionReason +const ( + UnsuccessfulFaceDeletionReasonAssociatedToAnExistingUser UnsuccessfulFaceDeletionReason = "ASSOCIATED_TO_AN_EXISTING_USER" + UnsuccessfulFaceDeletionReasonFaceNotFound UnsuccessfulFaceDeletionReason = "FACE_NOT_FOUND" +) + +// Values returns all known values for UnsuccessfulFaceDeletionReason. 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 (UnsuccessfulFaceDeletionReason) Values() []UnsuccessfulFaceDeletionReason { + return []UnsuccessfulFaceDeletionReason{ + "ASSOCIATED_TO_AN_EXISTING_USER", + "FACE_NOT_FOUND", + } +} + +type UnsuccessfulFaceDisassociationReason string + +// Enum values for UnsuccessfulFaceDisassociationReason +const ( + UnsuccessfulFaceDisassociationReasonFaceNotFound UnsuccessfulFaceDisassociationReason = "FACE_NOT_FOUND" + UnsuccessfulFaceDisassociationReasonAssociatedToADifferentUser UnsuccessfulFaceDisassociationReason = "ASSOCIATED_TO_A_DIFFERENT_USER" +) + +// Values returns all known values for UnsuccessfulFaceDisassociationReason. 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 (UnsuccessfulFaceDisassociationReason) Values() []UnsuccessfulFaceDisassociationReason { + return []UnsuccessfulFaceDisassociationReason{ + "FACE_NOT_FOUND", + "ASSOCIATED_TO_A_DIFFERENT_USER", + } +} + +type UserStatus string + +// Enum values for UserStatus +const ( + UserStatusActive UserStatus = "ACTIVE" + UserStatusUpdating UserStatus = "UPDATING" + UserStatusCreating UserStatus = "CREATING" + UserStatusCreated UserStatus = "CREATED" +) + +// Values returns all known values for UserStatus. 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 (UserStatus) Values() []UserStatus { + return []UserStatus{ + "ACTIVE", + "UPDATING", + "CREATING", + "CREATED", + } +} + type VideoColorRange string // Enum values for VideoColorRange diff --git a/service/rekognition/types/errors.go b/service/rekognition/types/errors.go index b17e12472b7..3b5b07070d8 100644 --- a/service/rekognition/types/errors.go +++ b/service/rekognition/types/errors.go @@ -36,6 +36,36 @@ func (e *AccessDeniedException) ErrorCode() string { } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// A User with the same Id already exists within the collection, or the update or +// deletion of the User caused an inconsistent state. ** +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + Code *string + Logref *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The number of in-progress human reviews you have has exceeded the number // allowed. type HumanLoopQuotaExceededException struct { diff --git a/service/rekognition/types/types.go b/service/rekognition/types/types.go index 2fce567ea35..bebaabe621f 100644 --- a/service/rekognition/types/types.go +++ b/service/rekognition/types/types.go @@ -35,6 +35,15 @@ type Asset struct { noSmithyDocumentSerde } +// Provides face metadata for the faces that are associated to a specific UserID. +type AssociatedFace struct { + + // Unique identifier assigned to the face. + FaceId *string + + noSmithyDocumentSerde +} + // Metadata information about an audio stream. An array of AudioMetadata objects // for the audio streams found in a stored video is returned by GetSegmentDetection // . @@ -695,6 +704,16 @@ type DetectTextFilters struct { noSmithyDocumentSerde } +// Provides face metadata for the faces that are disassociated from a specific +// UserID. +type DisassociatedFace struct { + + // Unique identifier assigned to the face. + FaceId *string + + noSmithyDocumentSerde +} + // A training dataset or a test dataset used in a dataset distribution operation. // For more information, see DistributeDatasetEntries . type DistributeDataset struct { @@ -851,6 +870,9 @@ type Face struct { // the face vector. IndexFacesModelVersion *string + // Unique identifier assigned to the user. + UserId *string + noSmithyDocumentSerde } @@ -1416,6 +1438,18 @@ type LivenessOutputConfig struct { noSmithyDocumentSerde } +// Contains metadata for a UserID matched with a given face. +type MatchedUser struct { + + // A provided ID for the UserID. Unique within the collection. + UserId *string + + // The status of the user matched to a provided FaceID. + UserStatus UserStatus + + noSmithyDocumentSerde +} + // Provides information about a single type of inappropriate, unwanted, or // offensive content found in an image or video. Each type of moderated content has // a label within a hierarchical taxonomy. For more information, see Content @@ -1865,6 +1899,49 @@ type S3Object struct { noSmithyDocumentSerde } +// Provides face metadata such as FaceId, BoundingBox, Confidence of the input +// face used for search. +type SearchedFace struct { + + // Unique identifier assigned to the face. + FaceId *string + + noSmithyDocumentSerde +} + +// Contains data regarding the input face used for a search. +type SearchedFaceDetails struct { + + // Structure containing attributes of the face that the algorithm detected. A + // FaceDetail object contains either the default facial attributes or all facial + // attributes. The default attributes are BoundingBox , Confidence , Landmarks , + // Pose , and Quality . GetFaceDetection is the only Amazon Rekognition Video + // stored video operation that can return a FaceDetail object with all attributes. + // To specify which attributes to return, use the FaceAttributes input parameter + // for StartFaceDetection . The following Amazon Rekognition Video operations + // return only the default attributes. The corresponding Start operations don't + // have a FaceAttributes input parameter: + // - GetCelebrityRecognition + // - GetPersonTracking + // - GetFaceSearch + // The Amazon Rekognition Image DetectFaces and IndexFaces operations can return + // all facial attributes. To specify which attributes to return, use the Attributes + // input parameter for DetectFaces . For IndexFaces , use the DetectAttributes + // input parameter. + FaceDetail *FaceDetail + + noSmithyDocumentSerde +} + +// Contains metadata about a User searched for within a collection. +type SearchedUser struct { + + // A provided ID for the UserID. Unique within the collection. + UserId *string + + noSmithyDocumentSerde +} + // A technical cue or shot detection segment detected in a video. An array of // SegmentDetection objects containing all segments detected in a stored video is // returned by GetSegmentDetection . @@ -2337,6 +2414,112 @@ type UnindexedFace struct { noSmithyDocumentSerde } +// Face details inferred from the image but not used for search. The response +// attribute contains reasons for why a face wasn't used for Search. +type UnsearchedFace struct { + + // Structure containing attributes of the face that the algorithm detected. A + // FaceDetail object contains either the default facial attributes or all facial + // attributes. The default attributes are BoundingBox , Confidence , Landmarks , + // Pose , and Quality . GetFaceDetection is the only Amazon Rekognition Video + // stored video operation that can return a FaceDetail object with all attributes. + // To specify which attributes to return, use the FaceAttributes input parameter + // for StartFaceDetection . The following Amazon Rekognition Video operations + // return only the default attributes. The corresponding Start operations don't + // have a FaceAttributes input parameter: + // - GetCelebrityRecognition + // - GetPersonTracking + // - GetFaceSearch + // The Amazon Rekognition Image DetectFaces and IndexFaces operations can return + // all facial attributes. To specify which attributes to return, use the Attributes + // input parameter for DetectFaces . For IndexFaces , use the DetectAttributes + // input parameter. + FaceDetails *FaceDetail + + // Reasons why a face wasn't used for Search. + Reasons []UnsearchedFaceReason + + noSmithyDocumentSerde +} + +// Contains metadata like FaceId, UserID, and Reasons, for a face that was +// unsuccessfully associated. +type UnsuccessfulFaceAssociation struct { + + // Match confidence with the UserID, provides information regarding if a face + // association was unsuccessful because it didn't meet UserMatchThreshold. + Confidence *float32 + + // A unique identifier assigned to the face. + FaceId *string + + // The reason why the association was unsuccessful. + Reasons []UnsuccessfulFaceAssociationReason + + // A provided ID for the UserID. Unique within the collection. + UserId *string + + noSmithyDocumentSerde +} + +// Contains metadata like FaceId, UserID, and Reasons, for a face that was +// unsuccessfully deleted. +type UnsuccessfulFaceDeletion struct { + + // A unique identifier assigned to the face. + FaceId *string + + // The reason why the deletion was unsuccessful. + Reasons []UnsuccessfulFaceDeletionReason + + // A provided ID for the UserID. Unique within the collection. + UserId *string + + noSmithyDocumentSerde +} + +// Contains metadata like FaceId, UserID, and Reasons, for a face that was +// unsuccessfully disassociated. +type UnsuccessfulFaceDisassociation struct { + + // A unique identifier assigned to the face. + FaceId *string + + // The reason why the deletion was unsuccessful. + Reasons []UnsuccessfulFaceDisassociationReason + + // A provided ID for the UserID. Unique within the collection. + UserId *string + + noSmithyDocumentSerde +} + +// Metadata of the user stored in a collection. +type User struct { + + // A provided ID for the User. Unique within the collection. + UserId *string + + // Communicates if the UserID has been updated with latest set of faces to be + // associated with the UserID. + UserStatus UserStatus + + noSmithyDocumentSerde +} + +// Provides UserID metadata along with the confidence in the match of this UserID +// with the input face. +type UserMatch struct { + + // Describes the UserID metadata. + Similarity *float32 + + // Confidence in the match of this UserID with the input face. + User *MatchedUser + + noSmithyDocumentSerde +} + // Contains the Amazon S3 bucket location of the validation data for a model // training job. The validation data includes error information for individual JSON // Lines in the dataset. For more information, see Debugging a Failed Model diff --git a/service/rekognition/validators.go b/service/rekognition/validators.go index 0e8b72c8536..8b85bd81131 100644 --- a/service/rekognition/validators.go +++ b/service/rekognition/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAssociateFaces struct { +} + +func (*validateOpAssociateFaces) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateFaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateFacesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateFacesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCompareFaces struct { } @@ -170,6 +190,26 @@ func (m *validateOpCreateStreamProcessor) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateUser struct { +} + +func (*validateOpCreateUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteCollection struct { } @@ -310,6 +350,26 @@ func (m *validateOpDeleteStreamProcessor) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteUser struct { +} + +func (*validateOpDeleteUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeCollection struct { } @@ -510,6 +570,26 @@ func (m *validateOpDetectText) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpDisassociateFaces struct { +} + +func (*validateOpDisassociateFaces) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateFaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateFacesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateFacesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDistributeDatasetEntries struct { } @@ -850,6 +930,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListUsers struct { +} + +func (*validateOpListUsers) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListUsersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListUsersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutProjectPolicy struct { } @@ -930,6 +1030,46 @@ func (m *validateOpSearchFaces) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpSearchUsersByImage struct { +} + +func (*validateOpSearchUsersByImage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchUsersByImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchUsersByImageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchUsersByImageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSearchUsers struct { +} + +func (*validateOpSearchUsers) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchUsersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchUsersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartCelebrityRecognition struct { } @@ -1250,6 +1390,10 @@ func (m *validateOpUpdateStreamProcessor) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +func addOpAssociateFacesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateFaces{}, middleware.After) +} + func addOpCompareFacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCompareFaces{}, middleware.After) } @@ -1282,6 +1426,10 @@ func addOpCreateStreamProcessorValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpCreateStreamProcessor{}, middleware.After) } +func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) +} + func addOpDeleteCollectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteCollection{}, middleware.After) } @@ -1310,6 +1458,10 @@ func addOpDeleteStreamProcessorValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDeleteStreamProcessor{}, middleware.After) } +func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) +} + func addOpDescribeCollectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeCollection{}, middleware.After) } @@ -1350,6 +1502,10 @@ func addOpDetectTextValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDetectText{}, middleware.After) } +func addOpDisassociateFacesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateFaces{}, middleware.After) +} + func addOpDistributeDatasetEntriesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDistributeDatasetEntries{}, middleware.After) } @@ -1418,6 +1574,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) +} + func addOpPutProjectPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutProjectPolicy{}, middleware.After) } @@ -1434,6 +1594,14 @@ func addOpSearchFacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchFaces{}, middleware.After) } +func addOpSearchUsersByImageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchUsersByImage{}, middleware.After) +} + +func addOpSearchUsersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchUsers{}, middleware.After) +} + func addOpStartCelebrityRecognitionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartCelebrityRecognition{}, middleware.After) } @@ -1690,6 +1858,27 @@ func validateStreamProcessorSettings(v *types.StreamProcessorSettings) error { } } +func validateOpAssociateFacesInput(v *AssociateFacesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateFacesInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) + } + if v.FaceIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("FaceIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCompareFacesInput(v *CompareFacesInput) error { if v == nil { return nil @@ -1862,6 +2051,24 @@ func validateOpCreateStreamProcessorInput(v *CreateStreamProcessorInput) error { } } +func validateOpCreateUserInput(v *CreateUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteCollectionInput(v *DeleteCollectionInput) error { if v == nil { return nil @@ -1973,6 +2180,24 @@ func validateOpDeleteStreamProcessorInput(v *DeleteStreamProcessorInput) error { } } +func validateOpDeleteUserInput(v *DeleteUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteUserInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeCollectionInput(v *DescribeCollectionInput) error { if v == nil { return nil @@ -2136,6 +2361,27 @@ func validateOpDetectTextInput(v *DetectTextInput) error { } } +func validateOpDisassociateFacesInput(v *DisassociateFacesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateFacesInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) + } + if v.FaceIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("FaceIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDistributeDatasetEntriesInput(v *DistributeDatasetEntriesInput) error { if v == nil { return nil @@ -2398,6 +2644,21 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpListUsersInput(v *ListUsersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListUsersInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutProjectPolicyInput(v *PutProjectPolicyInput) error { if v == nil { return nil @@ -2470,6 +2731,39 @@ func validateOpSearchFacesInput(v *SearchFacesInput) error { } } +func validateOpSearchUsersByImageInput(v *SearchUsersByImageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchUsersByImageInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if v.Image == nil { + invalidParams.Add(smithy.NewErrParamRequired("Image")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSearchUsersInput(v *SearchUsersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchUsersInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartCelebrityRecognitionInput(v *StartCelebrityRecognitionInput) error { if v == nil { return nil diff --git a/service/sagemaker/api_op_DescribePipeline.go b/service/sagemaker/api_op_DescribePipeline.go index 52039e189db..803f8abe2d6 100644 --- a/service/sagemaker/api_op_DescribePipeline.go +++ b/service/sagemaker/api_op_DescribePipeline.go @@ -30,7 +30,7 @@ func (c *Client) DescribePipeline(ctx context.Context, params *DescribePipelineI type DescribePipelineInput struct { - // The name of the pipeline to describe. + // The name or Amazon Resource Name (ARN) of the pipeline to describe. // // This member is required. PipelineName *string diff --git a/service/sagemaker/api_op_ListAppImageConfigs.go b/service/sagemaker/api_op_ListAppImageConfigs.go index de6651ee8f5..aff46807d3c 100644 --- a/service/sagemaker/api_op_ListAppImageConfigs.go +++ b/service/sagemaker/api_op_ListAppImageConfigs.go @@ -41,8 +41,10 @@ type ListAppImageConfigsInput struct { // time. CreationTimeBefore *time.Time - // The maximum number of AppImageConfigs to return in the response. The default - // value is 10. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. MaxResults *int32 // A filter that returns only AppImageConfigs modified on or after the specified @@ -159,8 +161,10 @@ var _ ListAppImageConfigsAPIClient = (*Client)(nil) // ListAppImageConfigsPaginatorOptions is the paginator options for // ListAppImageConfigs type ListAppImageConfigsPaginatorOptions struct { - // The maximum number of AppImageConfigs to return in the response. The default - // value is 10. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/sagemaker/api_op_ListApps.go b/service/sagemaker/api_op_ListApps.go index 78b372fc614..d6ecb7fd995 100644 --- a/service/sagemaker/api_op_ListApps.go +++ b/service/sagemaker/api_op_ListApps.go @@ -33,7 +33,10 @@ type ListAppsInput struct { // A parameter to search for the domain ID. DomainIdEquals *string - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. MaxResults *int32 // If the previous response was truncated, you will receive this token. Use it in @@ -144,7 +147,10 @@ var _ ListAppsAPIClient = (*Client)(nil) // ListAppsPaginatorOptions is the paginator options for ListApps type ListAppsPaginatorOptions struct { - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/sagemaker/api_op_ListDomains.go b/service/sagemaker/api_op_ListDomains.go index 6523fdc95ba..4df0094a980 100644 --- a/service/sagemaker/api_op_ListDomains.go +++ b/service/sagemaker/api_op_ListDomains.go @@ -30,7 +30,10 @@ func (c *Client) ListDomains(ctx context.Context, params *ListDomainsInput, optF type ListDomainsInput struct { - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. MaxResults *int32 // If the previous response was truncated, you will receive this token. Use it in @@ -127,7 +130,10 @@ var _ ListDomainsAPIClient = (*Client)(nil) // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/sagemaker/api_op_ListPipelineExecutions.go b/service/sagemaker/api_op_ListPipelineExecutions.go index 8978d31028f..08b9b5afe7c 100644 --- a/service/sagemaker/api_op_ListPipelineExecutions.go +++ b/service/sagemaker/api_op_ListPipelineExecutions.go @@ -31,7 +31,7 @@ func (c *Client) ListPipelineExecutions(ctx context.Context, params *ListPipelin type ListPipelineExecutionsInput struct { - // The name of the pipeline. + // The name or Amazon Resource Name (ARN) of the pipeline. // // This member is required. PipelineName *string diff --git a/service/sagemaker/api_op_ListSpaces.go b/service/sagemaker/api_op_ListSpaces.go index b60ff3a74af..004de2b7772 100644 --- a/service/sagemaker/api_op_ListSpaces.go +++ b/service/sagemaker/api_op_ListSpaces.go @@ -33,7 +33,10 @@ type ListSpacesInput struct { // A parameter to search for the Domain ID. DomainIdEquals *string - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. MaxResults *int32 // If the previous response was truncated, you will receive this token. Use it in @@ -139,7 +142,10 @@ var _ ListSpacesAPIClient = (*Client)(nil) // ListSpacesPaginatorOptions is the paginator options for ListSpaces type ListSpacesPaginatorOptions struct { - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/sagemaker/api_op_ListStudioLifecycleConfigs.go b/service/sagemaker/api_op_ListStudioLifecycleConfigs.go index 2ee4bccc494..40758a374f1 100644 --- a/service/sagemaker/api_op_ListStudioLifecycleConfigs.go +++ b/service/sagemaker/api_op_ListStudioLifecycleConfigs.go @@ -43,8 +43,10 @@ type ListStudioLifecycleConfigsInput struct { // specified time. CreationTimeBefore *time.Time - // The maximum number of Studio Lifecycle Configurations to return in the - // response. The default value is 10. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. MaxResults *int32 // A filter that returns only Lifecycle Configurations modified after the @@ -75,7 +77,8 @@ type ListStudioLifecycleConfigsInput struct { type ListStudioLifecycleConfigsOutput struct { - // A token for getting the next set of actions, if there are any. + // If the previous response was truncated, you will receive this token. Use it in + // your next request to receive the next set of results. NextToken *string // A list of Lifecycle Configurations and their properties. @@ -161,8 +164,10 @@ var _ ListStudioLifecycleConfigsAPIClient = (*Client)(nil) // ListStudioLifecycleConfigsPaginatorOptions is the paginator options for // ListStudioLifecycleConfigs type ListStudioLifecycleConfigsPaginatorOptions struct { - // The maximum number of Studio Lifecycle Configurations to return in the - // response. The default value is 10. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/sagemaker/api_op_ListUserProfiles.go b/service/sagemaker/api_op_ListUserProfiles.go index aed9d1a40f9..9fd9371b1b8 100644 --- a/service/sagemaker/api_op_ListUserProfiles.go +++ b/service/sagemaker/api_op_ListUserProfiles.go @@ -33,7 +33,10 @@ type ListUserProfilesInput struct { // A parameter by which to filter the results. DomainIdEquals *string - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. MaxResults *int32 // If the previous response was truncated, you will receive this token. Use it in @@ -140,7 +143,10 @@ var _ ListUserProfilesAPIClient = (*Client)(nil) // ListUserProfilesPaginatorOptions is the paginator options for ListUserProfiles type ListUserProfilesPaginatorOptions struct { - // Returns a list up to a specified limit. + // The total number of items to return in the response. If the total number of + // items available is more than the value specified, a NextToken is provided in + // the response. To resume pagination, provide the NextToken value in the as part + // of a subsequent call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/sagemaker/api_op_StartPipelineExecution.go b/service/sagemaker/api_op_StartPipelineExecution.go index ceac043d34c..d0192107be2 100644 --- a/service/sagemaker/api_op_StartPipelineExecution.go +++ b/service/sagemaker/api_op_StartPipelineExecution.go @@ -36,7 +36,7 @@ type StartPipelineExecutionInput struct { // This member is required. ClientRequestToken *string - // The name of the pipeline. + // The name or Amazon Resource Name (ARN) of the pipeline. // // This member is required. PipelineName *string diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index fc90f897f82..20bf9b32308 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -5227,6 +5227,8 @@ const ( TargetDeviceMlP3 TargetDevice = "ml_p3" TargetDeviceMlG4dn TargetDevice = "ml_g4dn" TargetDeviceMlInf1 TargetDevice = "ml_inf1" + TargetDeviceMlInf2 TargetDevice = "ml_inf2" + TargetDeviceMlTrn1 TargetDevice = "ml_trn1" TargetDeviceMlEia2 TargetDevice = "ml_eia2" TargetDeviceJetsonTx1 TargetDevice = "jetson_tx1" TargetDeviceJetsonTx2 TargetDevice = "jetson_tx2" @@ -5266,6 +5268,8 @@ func (TargetDevice) Values() []TargetDevice { "ml_p3", "ml_g4dn", "ml_inf1", + "ml_inf2", + "ml_trn1", "ml_eia2", "jetson_tx1", "jetson_tx2", diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 94a9c65f240..c69cb5c250a 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -1358,8 +1358,11 @@ type AutoMLJobChannel struct { // The content type of the data from the input source. The following are the // allowed content types for different problems: - // - ImageClassification: image/png , image/jpeg , image/* - // - TextClassification: text/csv;header=present + // - ImageClassification: image/png , image/jpeg , or image/* . The default value + // is image/* . + // - TextClassification: text/csv;header=present or + // x-application/vnd.amazon+parquet . The default value is + // text/csv;header=present . ContentType *string // The data source for an AutoML channel. @@ -5955,8 +5958,8 @@ type HyperParameterTrainingJobSummary struct { type HyperParameterTuningInstanceConfig struct { // The number of instances of the type specified by InstanceType . Choose an - // instance count larger than 1 for distributed training algorithms. See SageMaker - // distributed training jobs (https://docs.aws.amazon.com/data-parallel-use-api.html) + // instance count larger than 1 for distributed training algorithms. See Step 2: + // Launch a SageMaker Distributed Training Job Using the SageMaker Python SDK (https://docs.aws.amazon.com/sagemaker/latest/dg/data-parallel-use-api.html) // for more information. // // This member is required. @@ -6315,7 +6318,7 @@ type HyperParameterTuningResourceConfig struct { InstanceCount int32 // The instance type used to run hyperparameter optimization tuning jobs. See - // descriptions of instance types (https://docs.aws.amazon.com/notebooks-available-instance-types.html) + // descriptions of instance types (https://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-instance-types.html) // for more information. InstanceType TrainingInstanceType diff --git a/service/sagemakermetrics/internal/endpoints/endpoints.go b/service/sagemakermetrics/internal/endpoints/endpoints.go index 0770df4bd4f..23e79712f43 100644 --- a/service/sagemakermetrics/internal/endpoints/endpoints.go +++ b/service/sagemakermetrics/internal/endpoints/endpoints.go @@ -194,6 +194,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{},