diff --git a/.changelog/20b733c3c9d04190ba1a1720bab04eb1.json b/.changelog/20b733c3c9d04190ba1a1720bab04eb1.json new file mode 100644 index 00000000000..ff6dbc65900 --- /dev/null +++ b/.changelog/20b733c3c9d04190ba1a1720bab04eb1.json @@ -0,0 +1,8 @@ +{ + "id": "20b733c3-c9d0-4190-ba1a-1720bab04eb1", + "type": "documentation", + "description": "Documentation updates for AWS Transfer Family", + "modules": [ + "service/transfer" + ] +} \ No newline at end of file diff --git a/.changelog/2d7cb646eb094079a09a4c2261bc8aa8.json b/.changelog/2d7cb646eb094079a09a4c2261bc8aa8.json new file mode 100644 index 00000000000..92c5881ede5 --- /dev/null +++ b/.changelog/2d7cb646eb094079a09a4c2261bc8aa8.json @@ -0,0 +1,8 @@ +{ + "id": "2d7cb646-eb09-4079-a09a-4c2261bc8aa8", + "type": "feature", + "description": "This releases enhances GetTraceSummaries API to support new TimeRangeType Service to query trace summaries by segment end time.", + "modules": [ + "service/xray" + ] +} \ No newline at end of file diff --git a/.changelog/3448052dee6f4e5e8ee9dd6e9318cf45.json b/.changelog/3448052dee6f4e5e8ee9dd6e9318cf45.json new file mode 100644 index 00000000000..3248b233fbf --- /dev/null +++ b/.changelog/3448052dee6f4e5e8ee9dd6e9318cf45.json @@ -0,0 +1,8 @@ +{ + "id": "3448052d-ee6f-4e5e-8ee9-dd6e9318cf45", + "type": "feature", + "description": "This release provides enhanced visibility into your SES identity verification status. This will offer you more actionable insights, enabling you to promptly address any verification-related issues.", + "modules": [ + "service/sesv2" + ] +} \ No newline at end of file diff --git a/.changelog/362764790f8d497ba0a018587bebec9e.json b/.changelog/362764790f8d497ba0a018587bebec9e.json new file mode 100644 index 00000000000..037818ee7e3 --- /dev/null +++ b/.changelog/362764790f8d497ba0a018587bebec9e.json @@ -0,0 +1,8 @@ +{ + "id": "36276479-0f8d-497b-a0a0-18587bebec9e", + "type": "feature", + "description": "Updated exsiting API to allow AWS Elastic Disaster Recovery support of launching recovery into existing EC2 instances.", + "modules": [ + "service/drs" + ] +} \ No newline at end of file diff --git a/.changelog/8723962eba854e5080543a7a8427ca4b.json b/.changelog/8723962eba854e5080543a7a8427ca4b.json new file mode 100644 index 00000000000..dc154bfa24b --- /dev/null +++ b/.changelog/8723962eba854e5080543a7a8427ca4b.json @@ -0,0 +1,8 @@ +{ + "id": "8723962e-ba85-4e50-8054-3a7a8427ca4b", + "type": "feature", + "description": "This release introduces two new APIs: GetAssetContract and ListAssetContracts. This release also adds support for Bitcoin Testnet.", + "modules": [ + "service/managedblockchainquery" + ] +} \ No newline at end of file diff --git a/.changelog/ae7bbfec95fd4c4c8690c1e83a3090a4.json b/.changelog/ae7bbfec95fd4c4c8690c1e83a3090a4.json new file mode 100644 index 00000000000..a4256d47358 --- /dev/null +++ b/.changelog/ae7bbfec95fd4c4c8690c1e83a3090a4.json @@ -0,0 +1,8 @@ +{ + "id": "ae7bbfec-95fd-4c4c-8690-c1e83a3090a4", + "type": "feature", + "description": "SDK and documentation updates for UpdateReplacePolicy", + "modules": [ + "service/cloudformation" + ] +} \ No newline at end of file diff --git a/.changelog/b3274a2f89634826b7cff1f7e30e5f0b.json b/.changelog/b3274a2f89634826b7cff1f7e30e5f0b.json new file mode 100644 index 00000000000..0f79bfec9a9 --- /dev/null +++ b/.changelog/b3274a2f89634826b7cff1f7e30e5f0b.json @@ -0,0 +1,8 @@ +{ + "id": "b3274a2f-8963-4826-b7cf-f1f7e30e5f0b", + "type": "feature", + "description": "This launch expands our matching techniques to include provider-based matching to help customer match, link, and enhance records with minimal data movement. With data service providers, we have removed the need for customers to build bespoke integrations,.", + "modules": [ + "service/entityresolution" + ] +} \ No newline at end of file diff --git a/.changelog/b7d0eebf2f83458382b78083e9e681d9.json b/.changelog/b7d0eebf2f83458382b78083e9e681d9.json new file mode 100644 index 00000000000..50fbff7e1f5 --- /dev/null +++ b/.changelog/b7d0eebf2f83458382b78083e9e681d9.json @@ -0,0 +1,8 @@ +{ + "id": "b7d0eebf-2f83-4583-82b7-8083e9e681d9", + "type": "feature", + "description": "Added support for managing credentials of provisioned cluster admin using AWS Secrets Manager.", + "modules": [ + "service/redshift" + ] +} \ No newline at end of file diff --git a/.changelog/bd9535cf5ab84fd4b7e490796d520ee7.json b/.changelog/bd9535cf5ab84fd4b7e490796d520ee7.json new file mode 100644 index 00000000000..4e8065e56a8 --- /dev/null +++ b/.changelog/bd9535cf5ab84fd4b7e490796d520ee7.json @@ -0,0 +1,8 @@ +{ + "id": "bd9535cf-5ab8-4fd4-b7e4-90796d520ee7", + "type": "feature", + "description": "This release allows customers to list and associate optional plugin packages with compatible Amazon OpenSearch Service clusters for enhanced functionality.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/ccb757fb87c746848362f8d31e5e2526.json b/.changelog/ccb757fb87c746848362f8d31e5e2526.json new file mode 100644 index 00000000000..c9435347205 --- /dev/null +++ b/.changelog/ccb757fb87c746848362f8d31e5e2526.json @@ -0,0 +1,8 @@ +{ + "id": "ccb757fb-87c7-4684-8362-f8d31e5e2526", + "type": "feature", + "description": "Added support for managing credentials of serverless namespace admin using AWS Secrets Manager.", + "modules": [ + "service/redshiftserverless" + ] +} \ No newline at end of file diff --git a/.changelog/dcd01bd6d35c4193a6f2ca9f642a5cfa.json b/.changelog/dcd01bd6d35c4193a6f2ca9f642a5cfa.json new file mode 100644 index 00000000000..a04638c93fa --- /dev/null +++ b/.changelog/dcd01bd6d35c4193a6f2ca9f642a5cfa.json @@ -0,0 +1,8 @@ +{ + "id": "dcd01bd6-d35c-4193-a6f2-ca9f642a5cfa", + "type": "feature", + "description": "This release allows customers to manage MediaPackage v2 resource using CloudFormation.", + "modules": [ + "service/mediapackagev2" + ] +} \ No newline at end of file diff --git a/service/cloudformation/types/enums.go b/service/cloudformation/types/enums.go index f51d2311906..c959df264d8 100644 --- a/service/cloudformation/types/enums.go +++ b/service/cloudformation/types/enums.go @@ -720,12 +720,13 @@ type ResourceAttribute string // Enum values for ResourceAttribute const ( - ResourceAttributeProperties ResourceAttribute = "Properties" - ResourceAttributeMetadata ResourceAttribute = "Metadata" - ResourceAttributeCreationPolicy ResourceAttribute = "CreationPolicy" - ResourceAttributeUpdatePolicy ResourceAttribute = "UpdatePolicy" - ResourceAttributeDeletionPolicy ResourceAttribute = "DeletionPolicy" - ResourceAttributeTags ResourceAttribute = "Tags" + ResourceAttributeProperties ResourceAttribute = "Properties" + ResourceAttributeMetadata ResourceAttribute = "Metadata" + ResourceAttributeCreationPolicy ResourceAttribute = "CreationPolicy" + ResourceAttributeUpdatePolicy ResourceAttribute = "UpdatePolicy" + ResourceAttributeDeletionPolicy ResourceAttribute = "DeletionPolicy" + ResourceAttributeUpdateReplacePolicy ResourceAttribute = "UpdateReplacePolicy" + ResourceAttributeTags ResourceAttribute = "Tags" ) // Values returns all known values for ResourceAttribute. Note that this can be @@ -738,6 +739,7 @@ func (ResourceAttribute) Values() []ResourceAttribute { "CreationPolicy", "UpdatePolicy", "DeletionPolicy", + "UpdateReplacePolicy", "Tags", } } diff --git a/service/drs/api_op_CreateLaunchConfigurationTemplate.go b/service/drs/api_op_CreateLaunchConfigurationTemplate.go index 3a94f156a0f..99627aa8383 100644 --- a/service/drs/api_op_CreateLaunchConfigurationTemplate.go +++ b/service/drs/api_op_CreateLaunchConfigurationTemplate.go @@ -46,6 +46,11 @@ type CreateLaunchConfigurationTemplateInput struct { // Launch disposition. LaunchDisposition types.LaunchDisposition + // DRS will set the 'launch into instance ID' of any source server when performing + // a drill, recovery or failback to the previous region or availability zone, using + // the instance ID of the source instance. + LaunchIntoSourceInstance *bool + // Licensing. Licensing *types.Licensing diff --git a/service/drs/api_op_GetLaunchConfiguration.go b/service/drs/api_op_GetLaunchConfiguration.go index 5750a8fd42b..a899e305671 100644 --- a/service/drs/api_op_GetLaunchConfiguration.go +++ b/service/drs/api_op_GetLaunchConfiguration.go @@ -58,6 +58,9 @@ type GetLaunchConfigurationOutput struct { // The state of the Recovery Instance in EC2 after the recovery operation. LaunchDisposition types.LaunchDisposition + // Launch into existing instance properties. + LaunchIntoInstanceProperties *types.LaunchIntoInstanceProperties + // The licensing configuration to be used for this launch configuration. Licensing *types.Licensing diff --git a/service/drs/api_op_PutLaunchAction.go b/service/drs/api_op_PutLaunchAction.go index 15c33b40dbc..3675c8adb89 100644 --- a/service/drs/api_op_PutLaunchAction.go +++ b/service/drs/api_op_PutLaunchAction.go @@ -59,6 +59,11 @@ type PutLaunchActionInput struct { // This member is required. Category types.LaunchActionCategory + // Launch action description. + // + // This member is required. + Description *string + // Launch action name. // // This member is required. @@ -79,9 +84,6 @@ type PutLaunchActionInput struct { // This member is required. ResourceId *string - // Launch action description. - Description *string - // Launch action parameters. Parameters map[string]types.LaunchActionParameter diff --git a/service/drs/api_op_UpdateLaunchConfiguration.go b/service/drs/api_op_UpdateLaunchConfiguration.go index 324387dce74..3df1b6c7402 100644 --- a/service/drs/api_op_UpdateLaunchConfiguration.go +++ b/service/drs/api_op_UpdateLaunchConfiguration.go @@ -50,6 +50,9 @@ type UpdateLaunchConfigurationInput struct { // The state of the Recovery Instance in EC2 after the recovery operation. LaunchDisposition types.LaunchDisposition + // Launch into existing instance properties. + LaunchIntoInstanceProperties *types.LaunchIntoInstanceProperties + // The licensing configuration to be used for this launch configuration. Licensing *types.Licensing @@ -82,6 +85,9 @@ type UpdateLaunchConfigurationOutput struct { // The state of the Recovery Instance in EC2 after the recovery operation. LaunchDisposition types.LaunchDisposition + // Launch into existing instance properties. + LaunchIntoInstanceProperties *types.LaunchIntoInstanceProperties + // The licensing configuration to be used for this launch configuration. Licensing *types.Licensing diff --git a/service/drs/api_op_UpdateLaunchConfigurationTemplate.go b/service/drs/api_op_UpdateLaunchConfigurationTemplate.go index be0cc42a12e..d4cb659e89b 100644 --- a/service/drs/api_op_UpdateLaunchConfigurationTemplate.go +++ b/service/drs/api_op_UpdateLaunchConfigurationTemplate.go @@ -51,6 +51,11 @@ type UpdateLaunchConfigurationTemplateInput struct { // Launch disposition. LaunchDisposition types.LaunchDisposition + // DRS will set the 'launch into instance ID' of any source server when performing + // a drill, recovery or failback to the previous region or availability zone, using + // the instance ID of the source instance. + LaunchIntoSourceInstance *bool + // Licensing. Licensing *types.Licensing diff --git a/service/drs/deserializers.go b/service/drs/deserializers.go index 19149f74ab7..82a227579c4 100644 --- a/service/drs/deserializers.go +++ b/service/drs/deserializers.go @@ -3866,6 +3866,11 @@ func awsRestjson1_deserializeOpDocumentGetLaunchConfigurationOutput(v **GetLaunc sv.LaunchDisposition = types.LaunchDisposition(jtv) } + case "launchIntoInstanceProperties": + if err := awsRestjson1_deserializeDocumentLaunchIntoInstanceProperties(&sv.LaunchIntoInstanceProperties, value); err != nil { + return err + } + case "licensing": if err := awsRestjson1_deserializeDocumentLicensing(&sv.Licensing, value); err != nil { return err @@ -7513,6 +7518,11 @@ func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationOutput(v **Updat sv.LaunchDisposition = types.LaunchDisposition(jtv) } + case "launchIntoInstanceProperties": + if err := awsRestjson1_deserializeDocumentLaunchIntoInstanceProperties(&sv.LaunchIntoInstanceProperties, value); err != nil { + return err + } + case "licensing": if err := awsRestjson1_deserializeDocumentLicensing(&sv.Licensing, value); err != nil { return err @@ -10550,6 +10560,15 @@ func awsRestjson1_deserializeDocumentLaunchConfigurationTemplate(v **types.Launc sv.LaunchDisposition = types.LaunchDisposition(jtv) } + case "launchIntoSourceInstance": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.LaunchIntoSourceInstance = ptr.Bool(jtv) + } + case "licensing": if err := awsRestjson1_deserializeDocumentLicensing(&sv.Licensing, value); err != nil { return err @@ -10621,6 +10640,46 @@ func awsRestjson1_deserializeDocumentLaunchConfigurationTemplates(v *[]types.Lau return nil } +func awsRestjson1_deserializeDocumentLaunchIntoInstanceProperties(v **types.LaunchIntoInstanceProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LaunchIntoInstanceProperties + if *v == nil { + sv = &types.LaunchIntoInstanceProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "launchIntoEC2InstanceID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EC2InstanceID to be of type string, got %T instead", value) + } + sv.LaunchIntoEC2InstanceID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLicensing(v **types.Licensing, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/drs/serializers.go b/service/drs/serializers.go index 21fa727ffd6..2510e9ab380 100644 --- a/service/drs/serializers.go +++ b/service/drs/serializers.go @@ -263,6 +263,11 @@ func awsRestjson1_serializeOpDocumentCreateLaunchConfigurationTemplateInput(v *C ok.String(string(v.LaunchDisposition)) } + if v.LaunchIntoSourceInstance != nil { + ok := object.Key("launchIntoSourceInstance") + ok.Boolean(*v.LaunchIntoSourceInstance) + } + if v.Licensing != nil { ok := object.Key("licensing") if err := awsRestjson1_serializeDocumentLicensing(v.Licensing, ok); err != nil { @@ -3901,6 +3906,13 @@ func awsRestjson1_serializeOpDocumentUpdateLaunchConfigurationInput(v *UpdateLau ok.String(string(v.LaunchDisposition)) } + if v.LaunchIntoInstanceProperties != nil { + ok := object.Key("launchIntoInstanceProperties") + if err := awsRestjson1_serializeDocumentLaunchIntoInstanceProperties(v.LaunchIntoInstanceProperties, ok); err != nil { + return err + } + } + if v.Licensing != nil { ok := object.Key("licensing") if err := awsRestjson1_serializeDocumentLicensing(v.Licensing, ok); err != nil { @@ -4023,6 +4035,11 @@ func awsRestjson1_serializeOpDocumentUpdateLaunchConfigurationTemplateInput(v *U ok.String(string(v.LaunchDisposition)) } + if v.LaunchIntoSourceInstance != nil { + ok := object.Key("launchIntoSourceInstance") + ok.Boolean(*v.LaunchIntoSourceInstance) + } + if v.Licensing != nil { ok := object.Key("licensing") if err := awsRestjson1_serializeDocumentLicensing(v.Licensing, ok); err != nil { @@ -4585,6 +4602,18 @@ func awsRestjson1_serializeDocumentLaunchConfigurationTemplateIDs(v []string, va return nil } +func awsRestjson1_serializeDocumentLaunchIntoInstanceProperties(v *types.LaunchIntoInstanceProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LaunchIntoEC2InstanceID != nil { + ok := object.Key("launchIntoEC2InstanceID") + ok.String(*v.LaunchIntoEC2InstanceID) + } + + return nil +} + func awsRestjson1_serializeDocumentLicensing(v *types.Licensing, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/drs/types/types.go b/service/drs/types/types.go index 275dd80d486..5ed40856551 100644 --- a/service/drs/types/types.go +++ b/service/drs/types/types.go @@ -448,6 +448,11 @@ type LaunchConfigurationTemplate struct { // Launch disposition. LaunchDisposition LaunchDisposition + // DRS will set the 'launch into instance ID' of any source server when performing + // a drill, recovery or failback to the previous region or availability zone, using + // the instance ID of the source instance. + LaunchIntoSourceInstance *bool + // Licensing. Licensing *Licensing @@ -463,6 +468,16 @@ type LaunchConfigurationTemplate struct { noSmithyDocumentSerde } +// Launch into existing instance. +type LaunchIntoInstanceProperties struct { + + // Optionally holds EC2 instance ID of an instance to launch into, instead of + // launching a new instance during drill, recovery or failback. + LaunchIntoEC2InstanceID *string + + noSmithyDocumentSerde +} + // Configuration of a machine's license. type Licensing struct { diff --git a/service/drs/validators.go b/service/drs/validators.go index a2a799cb8a5..83f81bf44d5 100644 --- a/service/drs/validators.go +++ b/service/drs/validators.go @@ -1495,6 +1495,9 @@ func validateOpPutLaunchActionInput(v *PutLaunchActionInput) error { if len(v.Category) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Category")) } + if v.Description == nil { + invalidParams.Add(smithy.NewErrParamRequired("Description")) + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/entityresolution/api_op_CreateIdMappingWorkflow.go b/service/entityresolution/api_op_CreateIdMappingWorkflow.go new file mode 100644 index 00000000000..10bccfcb1f2 --- /dev/null +++ b/service/entityresolution/api_op_CreateIdMappingWorkflow.go @@ -0,0 +1,327 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an IdMappingWorkflow object which stores the configuration of the data +// processing job to be run. Each IdMappingWorkflow must have a unique workflow +// name. To modify an existing workflow, use the UpdateIdMappingWorkflow API. +func (c *Client) CreateIdMappingWorkflow(ctx context.Context, params *CreateIdMappingWorkflowInput, optFns ...func(*Options)) (*CreateIdMappingWorkflowOutput, error) { + if params == nil { + params = &CreateIdMappingWorkflowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateIdMappingWorkflow", params, optFns, c.addOperationCreateIdMappingWorkflowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateIdMappingWorkflowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateIdMappingWorkflowInput struct { + + // An object which defines the idMappingType and the providerProperties . + // + // This member is required. + IdMappingTechniques *types.IdMappingTechniques + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + // + // This member is required. + InputSourceConfig []types.IdMappingWorkflowInputSource + + // A list of IdMappingWorkflowOutputSource objects, each of which contains fields + // OutputS3Path and Output . + // + // This member is required. + OutputSourceConfig []types.IdMappingWorkflowOutputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to create resources on your behalf as part of workflow execution. + // + // This member is required. + RoleArn *string + + // The name of the workflow. There can't be multiple IdMappingWorkflows with the + // same name. + // + // This member is required. + WorkflowName *string + + // A description of the workflow. + Description *string + + // The tags used to organize, track, or control access for this resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateIdMappingWorkflowOutput struct { + + // An object which defines the idMappingType and the providerProperties . + // + // This member is required. + IdMappingTechniques *types.IdMappingTechniques + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + // + // This member is required. + InputSourceConfig []types.IdMappingWorkflowInputSource + + // A list of IdMappingWorkflowOutputSource objects, each of which contains fields + // OutputS3Path and Output . + // + // This member is required. + OutputSourceConfig []types.IdMappingWorkflowOutputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to create resources on your behalf as part of workflow execution. + // + // This member is required. + RoleArn *string + + // The ARN (Amazon Resource Name) that Entity Resolution generated for the + // IDMappingWorkflow . + // + // This member is required. + WorkflowArn *string + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + // A description of the workflow. + Description *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateIdMappingWorkflowMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addCreateIdMappingWorkflowResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateIdMappingWorkflowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIdMappingWorkflow(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateIdMappingWorkflow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "CreateIdMappingWorkflow", + } +} + +type opCreateIdMappingWorkflowResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opCreateIdMappingWorkflowResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opCreateIdMappingWorkflowResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addCreateIdMappingWorkflowResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opCreateIdMappingWorkflowResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_CreateMatchingWorkflow.go b/service/entityresolution/api_op_CreateMatchingWorkflow.go index f65caf41dd8..890ef085b5e 100644 --- a/service/entityresolution/api_op_CreateMatchingWorkflow.go +++ b/service/entityresolution/api_op_CreateMatchingWorkflow.go @@ -60,8 +60,8 @@ type CreateMatchingWorkflowInput struct { // This member is required. RoleArn *string - // The name of the workflow. There cannot be multiple DataIntegrationWorkflows - // with the same name. + // The name of the workflow. There can't be multiple MatchingWorkflows with the + // same name. // // This member is required. WorkflowName *string diff --git a/service/entityresolution/api_op_CreateSchemaMapping.go b/service/entityresolution/api_op_CreateSchemaMapping.go index 9d8f34d74d6..ed9b28aa8da 100644 --- a/service/entityresolution/api_op_CreateSchemaMapping.go +++ b/service/entityresolution/api_op_CreateSchemaMapping.go @@ -44,7 +44,7 @@ type CreateSchemaMappingInput struct { // This member is required. MappedInputFields []types.SchemaInputAttribute - // The name of the schema. There cannot be multiple SchemaMappings with the same + // The name of the schema. There can't be multiple SchemaMappings with the same // name. // // This member is required. diff --git a/service/entityresolution/api_op_DeleteIdMappingWorkflow.go b/service/entityresolution/api_op_DeleteIdMappingWorkflow.go new file mode 100644 index 00000000000..38ea2dbecb4 --- /dev/null +++ b/service/entityresolution/api_op_DeleteIdMappingWorkflow.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the IdMappingWorkflow with a given name. This operation will succeed +// even if a workflow with the given name does not exist. +func (c *Client) DeleteIdMappingWorkflow(ctx context.Context, params *DeleteIdMappingWorkflowInput, optFns ...func(*Options)) (*DeleteIdMappingWorkflowOutput, error) { + if params == nil { + params = &DeleteIdMappingWorkflowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIdMappingWorkflow", params, optFns, c.addOperationDeleteIdMappingWorkflowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIdMappingWorkflowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIdMappingWorkflowInput struct { + + // The name of the workflow to be deleted. + // + // This member is required. + WorkflowName *string + + noSmithyDocumentSerde +} + +type DeleteIdMappingWorkflowOutput struct { + + // A successful operation message. + // + // This member is required. + Message *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteIdMappingWorkflowMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addDeleteIdMappingWorkflowResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteIdMappingWorkflowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIdMappingWorkflow(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteIdMappingWorkflow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "DeleteIdMappingWorkflow", + } +} + +type opDeleteIdMappingWorkflowResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDeleteIdMappingWorkflowResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDeleteIdMappingWorkflowResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDeleteIdMappingWorkflowResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDeleteIdMappingWorkflowResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_DeleteSchemaMapping.go b/service/entityresolution/api_op_DeleteSchemaMapping.go index d80b6fc4dfa..85f3732b5d0 100644 --- a/service/entityresolution/api_op_DeleteSchemaMapping.go +++ b/service/entityresolution/api_op_DeleteSchemaMapping.go @@ -17,8 +17,8 @@ import ( // Deletes the SchemaMapping with a given name. This operation will succeed even // if a schema with the given name does not exist. This operation will fail if -// there is a DataIntegrationWorkflow object that references the SchemaMapping in -// the workflow's InputSourceConfig . +// there is a MatchingWorkflow object that references the SchemaMapping in the +// workflow's InputSourceConfig . func (c *Client) DeleteSchemaMapping(ctx context.Context, params *DeleteSchemaMappingInput, optFns ...func(*Options)) (*DeleteSchemaMappingOutput, error) { if params == nil { params = &DeleteSchemaMappingInput{} diff --git a/service/entityresolution/api_op_GetIdMappingJob.go b/service/entityresolution/api_op_GetIdMappingJob.go new file mode 100644 index 00000000000..0f808de8d96 --- /dev/null +++ b/service/entityresolution/api_op_GetIdMappingJob.go @@ -0,0 +1,290 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets the status, metrics, and errors (if there are any) that are associated +// with a job. +func (c *Client) GetIdMappingJob(ctx context.Context, params *GetIdMappingJobInput, optFns ...func(*Options)) (*GetIdMappingJobOutput, error) { + if params == nil { + params = &GetIdMappingJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIdMappingJob", params, optFns, c.addOperationGetIdMappingJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIdMappingJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIdMappingJobInput struct { + + // The ID of the job. + // + // This member is required. + JobId *string + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + noSmithyDocumentSerde +} + +type GetIdMappingJobOutput struct { + + // The ID of the job. + // + // This member is required. + JobId *string + + // The time at which the job was started. + // + // This member is required. + StartTime *time.Time + + // The current status of the job. + // + // This member is required. + Status types.JobStatus + + // The time at which the job has finished. + EndTime *time.Time + + // An object containing an error message, if there was an error. + ErrorDetails *types.ErrorDetails + + // Metrics associated with the execution, specifically total records processed, + // unique IDs generated, and records the execution skipped. + Metrics *types.IdMappingJobMetrics + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetIdMappingJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetIdMappingJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetIdMappingJob{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetIdMappingJobResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetIdMappingJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdMappingJob(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetIdMappingJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "GetIdMappingJob", + } +} + +type opGetIdMappingJobResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetIdMappingJobResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetIdMappingJobResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetIdMappingJobResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetIdMappingJobResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_GetIdMappingWorkflow.go b/service/entityresolution/api_op_GetIdMappingWorkflow.go new file mode 100644 index 00000000000..5d75d94710d --- /dev/null +++ b/service/entityresolution/api_op_GetIdMappingWorkflow.go @@ -0,0 +1,309 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns the IdMappingWorkflow with a given name, if it exists. +func (c *Client) GetIdMappingWorkflow(ctx context.Context, params *GetIdMappingWorkflowInput, optFns ...func(*Options)) (*GetIdMappingWorkflowOutput, error) { + if params == nil { + params = &GetIdMappingWorkflowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIdMappingWorkflow", params, optFns, c.addOperationGetIdMappingWorkflowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIdMappingWorkflowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIdMappingWorkflowInput struct { + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + noSmithyDocumentSerde +} + +type GetIdMappingWorkflowOutput struct { + + // The timestamp of when the workflow was created. + // + // This member is required. + CreatedAt *time.Time + + // An object which defines the idMappingType and the providerProperties . + // + // This member is required. + IdMappingTechniques *types.IdMappingTechniques + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + // + // This member is required. + InputSourceConfig []types.IdMappingWorkflowInputSource + + // A list of OutputSource objects, each of which contains fields OutputS3Path and + // KMSArn . + // + // This member is required. + OutputSourceConfig []types.IdMappingWorkflowOutputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access resources on your behalf. + // + // This member is required. + RoleArn *string + + // The timestamp of when the workflow was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The ARN (Amazon Resource Name) that Entity Resolution generated for the + // IdMappingWorkflow . + // + // This member is required. + WorkflowArn *string + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + // A description of the workflow. + Description *string + + // The tags used to organize, track, or control access for this resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetIdMappingWorkflowMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetIdMappingWorkflowResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetIdMappingWorkflowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdMappingWorkflow(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetIdMappingWorkflow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "GetIdMappingWorkflow", + } +} + +type opGetIdMappingWorkflowResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetIdMappingWorkflowResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetIdMappingWorkflowResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetIdMappingWorkflowResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetIdMappingWorkflowResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_GetProviderService.go b/service/entityresolution/api_op_GetProviderService.go new file mode 100644 index 00000000000..3b0356d1e75 --- /dev/null +++ b/service/entityresolution/api_op_GetProviderService.go @@ -0,0 +1,317 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/document" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the ProviderService of a given name. +func (c *Client) GetProviderService(ctx context.Context, params *GetProviderServiceInput, optFns ...func(*Options)) (*GetProviderServiceOutput, error) { + if params == nil { + params = &GetProviderServiceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetProviderService", params, optFns, c.addOperationGetProviderServiceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetProviderServiceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetProviderServiceInput struct { + + // The name of the provider. This name is typically the company name. + // + // This member is required. + ProviderName *string + + // The ARN (Amazon Resource Name) of the product that the provider service + // provides. + // + // This member is required. + ProviderServiceName *string + + noSmithyDocumentSerde +} + +type GetProviderServiceOutput struct { + + // Specifies whether output data from the provider is anonymized. A value of TRUE + // means the output will be anonymized and you can't relate the data that comes + // back from the provider to the identifying input. A value of FALSE means the + // output won't be anonymized and you can relate the data that comes back from the + // provider to your source data. + // + // This member is required. + AnonymizedOutput *bool + + // The required configuration fields to use with the provider service. + // + // This member is required. + ProviderEndpointConfiguration types.ProviderEndpointConfiguration + + // The definition of the provider entity output. + // + // This member is required. + ProviderEntityOutputDefinition document.Interface + + // The name of the provider. This name is typically the company name. + // + // This member is required. + ProviderName *string + + // The ARN (Amazon Resource Name) that Entity Resolution generated for the + // provider service. + // + // This member is required. + ProviderServiceArn *string + + // The display name of the provider service. + // + // This member is required. + ProviderServiceDisplayName *string + + // The name of the product that the provider service provides. + // + // This member is required. + ProviderServiceName *string + + // The type of provider service. + // + // This member is required. + ProviderServiceType types.ServiceType + + // The definition of the provider configuration. + ProviderConfigurationDefinition document.Interface + + // The Amazon Web Services accounts and the S3 permissions that are required by + // some providers to create an S3 bucket for intermediate data storage. + ProviderIntermediateDataAccessConfiguration *types.ProviderIntermediateDataAccessConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetProviderServiceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetProviderService{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetProviderService{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetProviderServiceResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetProviderServiceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProviderService(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetProviderService(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "GetProviderService", + } +} + +type opGetProviderServiceResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetProviderServiceResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetProviderServiceResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetProviderServiceResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetProviderServiceResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_GetSchemaMapping.go b/service/entityresolution/api_op_GetSchemaMapping.go index ff31f26137a..6c83b0e0c4a 100644 --- a/service/entityresolution/api_op_GetSchemaMapping.go +++ b/service/entityresolution/api_op_GetSchemaMapping.go @@ -50,6 +50,11 @@ type GetSchemaMappingOutput struct { // This member is required. CreatedAt *time.Time + // Specifies whether the schema mapping has been applied to a workflow. + // + // This member is required. + HasWorkflows *bool + // A list of MappedInputFields . Each MappedInputField corresponds to a column the // source data table, and contains column name plus additional information Venice // uses for matching. diff --git a/service/entityresolution/api_op_ListIdMappingJobs.go b/service/entityresolution/api_op_ListIdMappingJobs.go new file mode 100644 index 00000000000..4e28e873f43 --- /dev/null +++ b/service/entityresolution/api_op_ListIdMappingJobs.go @@ -0,0 +1,360 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all ID mapping jobs for a given workflow. +func (c *Client) ListIdMappingJobs(ctx context.Context, params *ListIdMappingJobsInput, optFns ...func(*Options)) (*ListIdMappingJobsOutput, error) { + if params == nil { + params = &ListIdMappingJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIdMappingJobs", params, optFns, c.addOperationListIdMappingJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIdMappingJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIdMappingJobsInput struct { + + // The name of the workflow to be retrieved. + // + // This member is required. + WorkflowName *string + + // The maximum number of objects returned per page. + MaxResults *int32 + + // The pagination token from the previous API call. + NextToken *string + + noSmithyDocumentSerde +} + +type ListIdMappingJobsOutput struct { + + // A list of JobSummary objects. + Jobs []types.JobSummary + + // The pagination token from the previous API call. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListIdMappingJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListIdMappingJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIdMappingJobs{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListIdMappingJobsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpListIdMappingJobsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdMappingJobs(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListIdMappingJobsAPIClient is a client that implements the ListIdMappingJobs +// operation. +type ListIdMappingJobsAPIClient interface { + ListIdMappingJobs(context.Context, *ListIdMappingJobsInput, ...func(*Options)) (*ListIdMappingJobsOutput, error) +} + +var _ ListIdMappingJobsAPIClient = (*Client)(nil) + +// ListIdMappingJobsPaginatorOptions is the paginator options for ListIdMappingJobs +type ListIdMappingJobsPaginatorOptions struct { + // The maximum number of objects returned per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListIdMappingJobsPaginator is a paginator for ListIdMappingJobs +type ListIdMappingJobsPaginator struct { + options ListIdMappingJobsPaginatorOptions + client ListIdMappingJobsAPIClient + params *ListIdMappingJobsInput + nextToken *string + firstPage bool +} + +// NewListIdMappingJobsPaginator returns a new ListIdMappingJobsPaginator +func NewListIdMappingJobsPaginator(client ListIdMappingJobsAPIClient, params *ListIdMappingJobsInput, optFns ...func(*ListIdMappingJobsPaginatorOptions)) *ListIdMappingJobsPaginator { + if params == nil { + params = &ListIdMappingJobsInput{} + } + + options := ListIdMappingJobsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIdMappingJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIdMappingJobsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIdMappingJobs page. +func (p *ListIdMappingJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIdMappingJobsOutput, 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.ListIdMappingJobs(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_opListIdMappingJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "ListIdMappingJobs", + } +} + +type opListIdMappingJobsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListIdMappingJobsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListIdMappingJobsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListIdMappingJobsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListIdMappingJobsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_ListIdMappingWorkflows.go b/service/entityresolution/api_op_ListIdMappingWorkflows.go new file mode 100644 index 00000000000..f3e4ed03bdc --- /dev/null +++ b/service/entityresolution/api_op_ListIdMappingWorkflows.go @@ -0,0 +1,354 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all the IdMappingWorkflows that have been created for an +// Amazon Web Services account. +func (c *Client) ListIdMappingWorkflows(ctx context.Context, params *ListIdMappingWorkflowsInput, optFns ...func(*Options)) (*ListIdMappingWorkflowsOutput, error) { + if params == nil { + params = &ListIdMappingWorkflowsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIdMappingWorkflows", params, optFns, c.addOperationListIdMappingWorkflowsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIdMappingWorkflowsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIdMappingWorkflowsInput struct { + + // The maximum number of objects returned per page. + MaxResults *int32 + + // The pagination token from the previous API call. + NextToken *string + + noSmithyDocumentSerde +} + +type ListIdMappingWorkflowsOutput struct { + + // The pagination token from the previous API call. + NextToken *string + + // A list of IdMappingWorkflowSummary objects. + WorkflowSummaries []types.IdMappingWorkflowSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListIdMappingWorkflowsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListIdMappingWorkflows{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIdMappingWorkflows{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListIdMappingWorkflowsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdMappingWorkflows(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListIdMappingWorkflowsAPIClient is a client that implements the +// ListIdMappingWorkflows operation. +type ListIdMappingWorkflowsAPIClient interface { + ListIdMappingWorkflows(context.Context, *ListIdMappingWorkflowsInput, ...func(*Options)) (*ListIdMappingWorkflowsOutput, error) +} + +var _ ListIdMappingWorkflowsAPIClient = (*Client)(nil) + +// ListIdMappingWorkflowsPaginatorOptions is the paginator options for +// ListIdMappingWorkflows +type ListIdMappingWorkflowsPaginatorOptions struct { + // The maximum number of objects returned per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListIdMappingWorkflowsPaginator is a paginator for ListIdMappingWorkflows +type ListIdMappingWorkflowsPaginator struct { + options ListIdMappingWorkflowsPaginatorOptions + client ListIdMappingWorkflowsAPIClient + params *ListIdMappingWorkflowsInput + nextToken *string + firstPage bool +} + +// NewListIdMappingWorkflowsPaginator returns a new ListIdMappingWorkflowsPaginator +func NewListIdMappingWorkflowsPaginator(client ListIdMappingWorkflowsAPIClient, params *ListIdMappingWorkflowsInput, optFns ...func(*ListIdMappingWorkflowsPaginatorOptions)) *ListIdMappingWorkflowsPaginator { + if params == nil { + params = &ListIdMappingWorkflowsInput{} + } + + options := ListIdMappingWorkflowsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIdMappingWorkflowsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIdMappingWorkflowsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIdMappingWorkflows page. +func (p *ListIdMappingWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIdMappingWorkflowsOutput, 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.ListIdMappingWorkflows(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_opListIdMappingWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "ListIdMappingWorkflows", + } +} + +type opListIdMappingWorkflowsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListIdMappingWorkflowsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListIdMappingWorkflowsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListIdMappingWorkflowsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListIdMappingWorkflowsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_ListMatchingJobs.go b/service/entityresolution/api_op_ListMatchingJobs.go index 6bc596849a2..9590896fdb8 100644 --- a/service/entityresolution/api_op_ListMatchingJobs.go +++ b/service/entityresolution/api_op_ListMatchingJobs.go @@ -42,7 +42,7 @@ type ListMatchingJobsInput struct { // The maximum number of objects returned per page. MaxResults *int32 - // The pagination token from the previous ListSchemaMappings API call. + // The pagination token from the previous API call. NextToken *string noSmithyDocumentSerde @@ -54,7 +54,7 @@ type ListMatchingJobsOutput struct { // and end time of a job. Jobs []types.JobSummary - // The pagination token from the previous ListSchemaMappings API call. + // The pagination token from the previous API call. NextToken *string // Metadata pertaining to the operation's result. diff --git a/service/entityresolution/api_op_ListMatchingWorkflows.go b/service/entityresolution/api_op_ListMatchingWorkflows.go index f769a035282..b71d74bb7ec 100644 --- a/service/entityresolution/api_op_ListMatchingWorkflows.go +++ b/service/entityresolution/api_op_ListMatchingWorkflows.go @@ -38,7 +38,7 @@ type ListMatchingWorkflowsInput struct { // The maximum number of objects returned per page. MaxResults *int32 - // The pagination token from the previous ListSchemaMappings API call. + // The pagination token from the previous API call. NextToken *string noSmithyDocumentSerde @@ -46,7 +46,7 @@ type ListMatchingWorkflowsInput struct { type ListMatchingWorkflowsOutput struct { - // The pagination token from the previous ListSchemaMappings API call. + // The pagination token from the previous API call. NextToken *string // A list of MatchingWorkflowSummary objects, each of which contain the fields diff --git a/service/entityresolution/api_op_ListProviderServices.go b/service/entityresolution/api_op_ListProviderServices.go new file mode 100644 index 00000000000..b176d28b202 --- /dev/null +++ b/service/entityresolution/api_op_ListProviderServices.go @@ -0,0 +1,357 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all the ProviderServices that are available in this Amazon +// Web Services Region. +func (c *Client) ListProviderServices(ctx context.Context, params *ListProviderServicesInput, optFns ...func(*Options)) (*ListProviderServicesOutput, error) { + if params == nil { + params = &ListProviderServicesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListProviderServices", params, optFns, c.addOperationListProviderServicesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListProviderServicesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListProviderServicesInput struct { + + // The maximum number of objects returned per page. + MaxResults *int32 + + // The pagination token from the previous API call. + NextToken *string + + // The name of the provider. This name is typically the company name. + ProviderName *string + + noSmithyDocumentSerde +} + +type ListProviderServicesOutput struct { + + // The pagination token from the previous API call. + NextToken *string + + // A list of ProviderServices objects. + ProviderServiceSummaries []types.ProviderServiceSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListProviderServicesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListProviderServices{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListProviderServices{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListProviderServicesResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProviderServices(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListProviderServicesAPIClient is a client that implements the +// ListProviderServices operation. +type ListProviderServicesAPIClient interface { + ListProviderServices(context.Context, *ListProviderServicesInput, ...func(*Options)) (*ListProviderServicesOutput, error) +} + +var _ ListProviderServicesAPIClient = (*Client)(nil) + +// ListProviderServicesPaginatorOptions is the paginator options for +// ListProviderServices +type ListProviderServicesPaginatorOptions struct { + // The maximum number of objects returned per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListProviderServicesPaginator is a paginator for ListProviderServices +type ListProviderServicesPaginator struct { + options ListProviderServicesPaginatorOptions + client ListProviderServicesAPIClient + params *ListProviderServicesInput + nextToken *string + firstPage bool +} + +// NewListProviderServicesPaginator returns a new ListProviderServicesPaginator +func NewListProviderServicesPaginator(client ListProviderServicesAPIClient, params *ListProviderServicesInput, optFns ...func(*ListProviderServicesPaginatorOptions)) *ListProviderServicesPaginator { + if params == nil { + params = &ListProviderServicesInput{} + } + + options := ListProviderServicesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListProviderServicesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListProviderServicesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListProviderServices page. +func (p *ListProviderServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListProviderServicesOutput, 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.ListProviderServices(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_opListProviderServices(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "ListProviderServices", + } +} + +type opListProviderServicesResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListProviderServicesResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListProviderServicesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListProviderServicesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListProviderServicesResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_ListSchemaMappings.go b/service/entityresolution/api_op_ListSchemaMappings.go index 4cf6e2f8ba6..c8310b84404 100644 --- a/service/entityresolution/api_op_ListSchemaMappings.go +++ b/service/entityresolution/api_op_ListSchemaMappings.go @@ -38,7 +38,7 @@ type ListSchemaMappingsInput struct { // The maximum number of objects returned per page. MaxResults *int32 - // The pagination token from the previous ListSchemaMappings API call. + // The pagination token from the previous API call. NextToken *string noSmithyDocumentSerde @@ -46,7 +46,7 @@ type ListSchemaMappingsInput struct { type ListSchemaMappingsOutput struct { - // The pagination token from the previous ListDomains API call. + // The pagination token from the previous API call. NextToken *string // A list of SchemaMappingSummary objects, each of which contain the fields diff --git a/service/entityresolution/api_op_StartIdMappingJob.go b/service/entityresolution/api_op_StartIdMappingJob.go new file mode 100644 index 00000000000..512c712b256 --- /dev/null +++ b/service/entityresolution/api_op_StartIdMappingJob.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts the IdMappingJob of a workflow. The workflow must have previously been +// created using the CreateIdMappingWorkflow endpoint. +func (c *Client) StartIdMappingJob(ctx context.Context, params *StartIdMappingJobInput, optFns ...func(*Options)) (*StartIdMappingJobOutput, error) { + if params == nil { + params = &StartIdMappingJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartIdMappingJob", params, optFns, c.addOperationStartIdMappingJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartIdMappingJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartIdMappingJobInput struct { + + // The name of the ID mapping job to be retrieved. + // + // This member is required. + WorkflowName *string + + noSmithyDocumentSerde +} + +type StartIdMappingJobOutput struct { + + // The ID of the job. + // + // This member is required. + JobId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartIdMappingJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartIdMappingJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartIdMappingJob{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addStartIdMappingJobResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartIdMappingJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartIdMappingJob(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartIdMappingJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "StartIdMappingJob", + } +} + +type opStartIdMappingJobResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opStartIdMappingJobResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opStartIdMappingJobResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addStartIdMappingJobResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opStartIdMappingJobResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_UpdateIdMappingWorkflow.go b/service/entityresolution/api_op_UpdateIdMappingWorkflow.go new file mode 100644 index 00000000000..a0a9c5a08cc --- /dev/null +++ b/service/entityresolution/api_op_UpdateIdMappingWorkflow.go @@ -0,0 +1,323 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing IdMappingWorkflow . This method is identical to +// CreateIdMappingWorkflow , except it uses an HTTP PUT request instead of a POST +// request, and the IdMappingWorkflow must already exist for the method to succeed. +func (c *Client) UpdateIdMappingWorkflow(ctx context.Context, params *UpdateIdMappingWorkflowInput, optFns ...func(*Options)) (*UpdateIdMappingWorkflowOutput, error) { + if params == nil { + params = &UpdateIdMappingWorkflowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateIdMappingWorkflow", params, optFns, c.addOperationUpdateIdMappingWorkflowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateIdMappingWorkflowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateIdMappingWorkflowInput struct { + + // An object which defines the idMappingType and the providerProperties . + // + // This member is required. + IdMappingTechniques *types.IdMappingTechniques + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + // + // This member is required. + InputSourceConfig []types.IdMappingWorkflowInputSource + + // A list of OutputSource objects, each of which contains fields OutputS3Path and + // KMSArn . + // + // This member is required. + OutputSourceConfig []types.IdMappingWorkflowOutputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access resources on your behalf. + // + // This member is required. + RoleArn *string + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + // A description of the workflow. + Description *string + + noSmithyDocumentSerde +} + +type UpdateIdMappingWorkflowOutput struct { + + // An object which defines the idMappingType and the providerProperties . + // + // This member is required. + IdMappingTechniques *types.IdMappingTechniques + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + // + // This member is required. + InputSourceConfig []types.IdMappingWorkflowInputSource + + // A list of OutputSource objects, each of which contains fields OutputS3Path and + // KMSArn . + // + // This member is required. + OutputSourceConfig []types.IdMappingWorkflowOutputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access resources on your behalf. + // + // This member is required. + RoleArn *string + + // The Amazon Resource Name (ARN) of the workflow role. Entity Resolution assumes + // this role to access resources on your behalf. + // + // This member is required. + WorkflowArn *string + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + // A description of the workflow. + Description *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateIdMappingWorkflowMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateIdMappingWorkflow{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addUpdateIdMappingWorkflowResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateIdMappingWorkflowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIdMappingWorkflow(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateIdMappingWorkflow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "UpdateIdMappingWorkflow", + } +} + +type opUpdateIdMappingWorkflowResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opUpdateIdMappingWorkflowResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opUpdateIdMappingWorkflowResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addUpdateIdMappingWorkflowResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opUpdateIdMappingWorkflowResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/api_op_UpdateSchemaMapping.go b/service/entityresolution/api_op_UpdateSchemaMapping.go new file mode 100644 index 00000000000..299470b34a5 --- /dev/null +++ b/service/entityresolution/api_op_UpdateSchemaMapping.go @@ -0,0 +1,292 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a schema mapping. A schema is immutable if it is being used by a +// workflow. Therefore, you can't update a schema mapping if it's associated with a +// workflow. +func (c *Client) UpdateSchemaMapping(ctx context.Context, params *UpdateSchemaMappingInput, optFns ...func(*Options)) (*UpdateSchemaMappingOutput, error) { + if params == nil { + params = &UpdateSchemaMappingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSchemaMapping", params, optFns, c.addOperationUpdateSchemaMappingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSchemaMappingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSchemaMappingInput struct { + + // A list of MappedInputFields . Each MappedInputField corresponds to a column the + // source data table, and contains column name plus additional information that + // Entity Resolution uses for matching. + // + // This member is required. + MappedInputFields []types.SchemaInputAttribute + + // The name of the schema. There can't be multiple SchemaMappings with the same + // name. + // + // This member is required. + SchemaName *string + + // A description of the schema. + Description *string + + noSmithyDocumentSerde +} + +type UpdateSchemaMappingOutput struct { + + // A list of MappedInputFields . Each MappedInputField corresponds to a column the + // source data table, and contains column name plus additional information that + // Entity Resolution uses for matching. + // + // This member is required. + MappedInputFields []types.SchemaInputAttribute + + // The ARN (Amazon Resource Name) that Entity Resolution generated for the + // SchemaMapping . + // + // This member is required. + SchemaArn *string + + // The name of the schema. + // + // This member is required. + SchemaName *string + + // A description of the schema. + Description *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSchemaMappingMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSchemaMapping{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSchemaMapping{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addUpdateSchemaMappingResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateSchemaMappingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSchemaMapping(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSchemaMapping(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "entityresolution", + OperationName: "UpdateSchemaMapping", + } +} + +type opUpdateSchemaMappingResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opUpdateSchemaMappingResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opUpdateSchemaMappingResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "entityresolution" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "entityresolution" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("entityresolution") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addUpdateSchemaMappingResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opUpdateSchemaMappingResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/entityresolution/deserializers.go b/service/entityresolution/deserializers.go index 73ef1b28bed..b2dfaa83efd 100644 --- a/service/entityresolution/deserializers.go +++ b/service/entityresolution/deserializers.go @@ -8,6 +8,8 @@ import ( "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/entityresolution/internal/document" "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" @@ -19,14 +21,14 @@ import ( "strings" ) -type awsRestjson1_deserializeOpCreateMatchingWorkflow struct { +type awsRestjson1_deserializeOpCreateIdMappingWorkflow struct { } -func (*awsRestjson1_deserializeOpCreateMatchingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpCreateIdMappingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateIdMappingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -40,9 +42,9 @@ func (m *awsRestjson1_deserializeOpCreateMatchingWorkflow) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMatchingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateIdMappingWorkflow(response, &metadata) } - output := &CreateMatchingWorkflowOutput{} + output := &CreateIdMappingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -63,7 +65,7 @@ func (m *awsRestjson1_deserializeOpCreateMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateIdMappingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -76,7 +78,7 @@ func (m *awsRestjson1_deserializeOpCreateMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateIdMappingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -145,7 +147,7 @@ func awsRestjson1_deserializeOpErrorCreateMatchingWorkflow(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMatchingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateIdMappingWorkflowOutput(v **CreateIdMappingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -158,9 +160,9 @@ func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMatchingWorkflowOutput + var sv *CreateIdMappingWorkflowOutput if *v == nil { - sv = &CreateMatchingWorkflowOutput{} + sv = &CreateIdMappingWorkflowOutput{} } else { sv = *v } @@ -176,23 +178,18 @@ func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMa sv.Description = ptr.String(jtv) } - case "incrementalRunConfig": - if err := awsRestjson1_deserializeDocumentIncrementalRunConfig(&sv.IncrementalRunConfig, value); err != nil { + case "idMappingTechniques": + if err := awsRestjson1_deserializeDocumentIdMappingTechniques(&sv.IdMappingTechniques, value); err != nil { return err } case "inputSourceConfig": - if err := awsRestjson1_deserializeDocumentInputSourceConfig(&sv.InputSourceConfig, value); err != nil { + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowInputSourceConfig(&sv.InputSourceConfig, value); err != nil { return err } case "outputSourceConfig": - if err := awsRestjson1_deserializeDocumentOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { - return err - } - - case "resolutionTechniques": - if err := awsRestjson1_deserializeDocumentResolutionTechniques(&sv.ResolutionTechniques, value); err != nil { + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { return err } @@ -200,7 +197,7 @@ func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMa 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 RoleArn to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } @@ -209,7 +206,7 @@ func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMa if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MatchingWorkflowArn to be of type string, got %T instead", value) + return fmt.Errorf("expected IdMappingWorkflowArn to be of type string, got %T instead", value) } sv.WorkflowArn = ptr.String(jtv) } @@ -232,14 +229,14 @@ func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMa return nil } -type awsRestjson1_deserializeOpCreateSchemaMapping struct { +type awsRestjson1_deserializeOpCreateMatchingWorkflow struct { } -func (*awsRestjson1_deserializeOpCreateSchemaMapping) ID() string { +func (*awsRestjson1_deserializeOpCreateMatchingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -253,9 +250,9 @@ func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateSchemaMapping(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMatchingWorkflow(response, &metadata) } - output := &CreateSchemaMappingOutput{} + output := &CreateMatchingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -276,7 +273,7 @@ func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -289,7 +286,7 @@ func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -358,7 +355,7 @@ func awsRestjson1_deserializeOpErrorCreateSchemaMapping(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchemaMappingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMatchingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -371,9 +368,9 @@ func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSchemaMappingOutput + var sv *CreateMatchingWorkflowOutput if *v == nil { - sv = &CreateSchemaMappingOutput{} + sv = &CreateMatchingWorkflowOutput{} } else { sv = *v } @@ -389,27 +386,51 @@ func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchem sv.Description = ptr.String(jtv) } - case "mappedInputFields": - if err := awsRestjson1_deserializeDocumentSchemaInputAttributes(&sv.MappedInputFields, value); err != nil { + case "incrementalRunConfig": + if err := awsRestjson1_deserializeDocumentIncrementalRunConfig(&sv.IncrementalRunConfig, value); err != nil { return err } - case "schemaArn": + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentInputSourceConfig(&sv.InputSourceConfig, value); err != nil { + return err + } + + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { + return err + } + + case "resolutionTechniques": + if err := awsRestjson1_deserializeDocumentResolutionTechniques(&sv.ResolutionTechniques, value); err != nil { + return err + } + + case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SchemaMappingArn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.SchemaArn = ptr.String(jtv) + sv.RoleArn = ptr.String(jtv) } - case "schemaName": + case "workflowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MatchingWorkflowArn to be of type string, got %T instead", value) + } + sv.WorkflowArn = ptr.String(jtv) + } + + case "workflowName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) } - sv.SchemaName = ptr.String(jtv) + sv.WorkflowName = ptr.String(jtv) } default: @@ -421,14 +442,14 @@ func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchem return nil } -type awsRestjson1_deserializeOpDeleteMatchingWorkflow struct { +type awsRestjson1_deserializeOpCreateSchemaMapping struct { } -func (*awsRestjson1_deserializeOpDeleteMatchingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpCreateSchemaMapping) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -442,9 +463,9 @@ func (m *awsRestjson1_deserializeOpDeleteMatchingWorkflow) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateSchemaMapping(response, &metadata) } - output := &DeleteMatchingWorkflowOutput{} + output := &CreateSchemaMappingOutput{} out.Result = output var buff [1024]byte @@ -465,7 +486,7 @@ func (m *awsRestjson1_deserializeOpDeleteMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -478,7 +499,7 @@ func (m *awsRestjson1_deserializeOpDeleteMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -522,6 +543,12 @@ func awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ExceedsLimitException", errorCode): + return awsRestjson1_deserializeErrorExceedsLimitException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -541,7 +568,7 @@ func awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(v **DeleteMatchingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchemaMappingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -554,22 +581,45 @@ func awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(v **DeleteMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteMatchingWorkflowOutput + var sv *CreateSchemaMappingOutput if *v == nil { - sv = &DeleteMatchingWorkflowOutput{} + sv = &CreateSchemaMappingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Description = ptr.String(jtv) + } + + case "mappedInputFields": + if err := awsRestjson1_deserializeDocumentSchemaInputAttributes(&sv.MappedInputFields, value); err != nil { + return err + } + + case "schemaArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaMappingArn to be of type string, got %T instead", value) + } + sv.SchemaArn = ptr.String(jtv) + } + + case "schemaName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.SchemaName = ptr.String(jtv) } default: @@ -581,14 +631,14 @@ func awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(v **DeleteMa return nil } -type awsRestjson1_deserializeOpDeleteSchemaMapping struct { +type awsRestjson1_deserializeOpDeleteIdMappingWorkflow struct { } -func (*awsRestjson1_deserializeOpDeleteSchemaMapping) ID() string { +func (*awsRestjson1_deserializeOpDeleteIdMappingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIdMappingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -602,9 +652,9 @@ func (m *awsRestjson1_deserializeOpDeleteSchemaMapping) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSchemaMapping(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIdMappingWorkflow(response, &metadata) } - output := &DeleteSchemaMappingOutput{} + output := &DeleteIdMappingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -625,7 +675,7 @@ func (m *awsRestjson1_deserializeOpDeleteSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteSchemaMappingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteIdMappingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -638,7 +688,7 @@ func (m *awsRestjson1_deserializeOpDeleteSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIdMappingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -682,9 +732,6 @@ func awsRestjson1_deserializeOpErrorDeleteSchemaMapping(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -704,7 +751,7 @@ func awsRestjson1_deserializeOpErrorDeleteSchemaMapping(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentDeleteSchemaMappingOutput(v **DeleteSchemaMappingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteIdMappingWorkflowOutput(v **DeleteIdMappingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -717,9 +764,9 @@ func awsRestjson1_deserializeOpDocumentDeleteSchemaMappingOutput(v **DeleteSchem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteSchemaMappingOutput + var sv *DeleteIdMappingWorkflowOutput if *v == nil { - sv = &DeleteSchemaMappingOutput{} + sv = &DeleteIdMappingWorkflowOutput{} } else { sv = *v } @@ -744,14 +791,14 @@ func awsRestjson1_deserializeOpDocumentDeleteSchemaMappingOutput(v **DeleteSchem return nil } -type awsRestjson1_deserializeOpGetMatchId struct { +type awsRestjson1_deserializeOpDeleteMatchingWorkflow struct { } -func (*awsRestjson1_deserializeOpGetMatchId) ID() string { +func (*awsRestjson1_deserializeOpDeleteMatchingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMatchId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -765,9 +812,9 @@ func (m *awsRestjson1_deserializeOpGetMatchId) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMatchId(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response, &metadata) } - output := &GetMatchIdOutput{} + output := &DeleteMatchingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -788,7 +835,7 @@ func (m *awsRestjson1_deserializeOpGetMatchId) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMatchIdOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -801,7 +848,7 @@ func (m *awsRestjson1_deserializeOpGetMatchId) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMatchId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -848,9 +895,6 @@ func awsRestjson1_deserializeOpErrorGetMatchId(response *smithyhttp.Response, me case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -867,7 +911,7 @@ func awsRestjson1_deserializeOpErrorGetMatchId(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(v **DeleteMatchingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -880,22 +924,22 @@ func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMatchIdOutput + var sv *DeleteMatchingWorkflowOutput if *v == nil { - sv = &GetMatchIdOutput{} + sv = &DeleteMatchingWorkflowOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "matchId": + 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.MatchId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -907,14 +951,14 @@ func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, va return nil } -type awsRestjson1_deserializeOpGetMatchingJob struct { +type awsRestjson1_deserializeOpDeleteSchemaMapping struct { } -func (*awsRestjson1_deserializeOpGetMatchingJob) ID() string { +func (*awsRestjson1_deserializeOpDeleteSchemaMapping) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMatchingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -928,9 +972,9 @@ func (m *awsRestjson1_deserializeOpGetMatchingJob) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMatchingJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteSchemaMapping(response, &metadata) } - output := &GetMatchingJobOutput{} + output := &DeleteSchemaMappingOutput{} out.Result = output var buff [1024]byte @@ -951,7 +995,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingJob) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteSchemaMappingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -964,7 +1008,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingJob) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMatchingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1008,12 +1052,12 @@ func awsRestjson1_deserializeOpErrorGetMatchingJob(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1030,7 +1074,7 @@ func awsRestjson1_deserializeOpErrorGetMatchingJob(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteSchemaMappingOutput(v **DeleteSchemaMappingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1043,92 +1087,41 @@ func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMatchingJobOutput + var sv *DeleteSchemaMappingOutput if *v == nil { - sv = &GetMatchingJobOutput{} + sv = &DeleteSchemaMappingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "endTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "errorDetails": - if err := awsRestjson1_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { - return err - } - - case "jobId": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.JobId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "metrics": - if err := awsRestjson1_deserializeDocumentJobMetrics(&sv.Metrics, value); err != nil { - return err - } + default: + _, _ = key, value - case "startTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + } + *v = sv + return nil +} - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) +type awsRestjson1_deserializeOpGetIdMappingJob struct { +} - } - } +func (*awsRestjson1_deserializeOpGetIdMappingJob) ID() string { + return "OperationDeserializer" +} - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) - } - sv.Status = types.JobStatus(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetMatchingWorkflow struct { -} - -func (*awsRestjson1_deserializeOpGetMatchingWorkflow) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIdMappingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1142,9 +1135,9 @@ func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMatchingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIdMappingJob(response, &metadata) } - output := &GetMatchingWorkflowOutput{} + output := &GetIdMappingJobOutput{} out.Result = output var buff [1024]byte @@ -1165,7 +1158,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1178,7 +1171,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIdMappingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1244,7 +1237,7 @@ func awsRestjson1_deserializeOpErrorGetMatchingWorkflow(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatchingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(v **GetIdMappingJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1257,16 +1250,16 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMatchingWorkflowOutput + var sv *GetIdMappingJobOutput if *v == nil { - sv = &GetMatchingWorkflowOutput{} + sv = &GetIdMappingJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "createdAt": + case "endTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -1274,7 +1267,7 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching if err != nil { return err } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -1282,50 +1275,26 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching } } - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "incrementalRunConfig": - if err := awsRestjson1_deserializeDocumentIncrementalRunConfig(&sv.IncrementalRunConfig, value); err != nil { - return err - } - - case "inputSourceConfig": - if err := awsRestjson1_deserializeDocumentInputSourceConfig(&sv.InputSourceConfig, value); err != nil { - return err - } - - case "outputSourceConfig": - if err := awsRestjson1_deserializeDocumentOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { - return err - } - - case "resolutionTechniques": - if err := awsRestjson1_deserializeDocumentResolutionTechniques(&sv.ResolutionTechniques, value); err != nil { + case "errorDetails": + if err := awsRestjson1_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { return err } - case "roleArn": + case "jobId": 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 JobId to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.JobId = ptr.String(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "metrics": + if err := awsRestjson1_deserializeDocumentIdMappingJobMetrics(&sv.Metrics, value); err != nil { return err } - case "updatedAt": + case "startTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -1333,7 +1302,7 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching if err != nil { return err } - sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -1341,22 +1310,13 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching } } - case "workflowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MatchingWorkflowArn to be of type string, got %T instead", value) - } - sv.WorkflowArn = ptr.String(jtv) - } - - case "workflowName": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) } - sv.WorkflowName = ptr.String(jtv) + sv.Status = types.JobStatus(jtv) } default: @@ -1368,14 +1328,14 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching return nil } -type awsRestjson1_deserializeOpGetSchemaMapping struct { +type awsRestjson1_deserializeOpGetIdMappingWorkflow struct { } -func (*awsRestjson1_deserializeOpGetSchemaMapping) ID() string { +func (*awsRestjson1_deserializeOpGetIdMappingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIdMappingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1389,9 +1349,9 @@ func (m *awsRestjson1_deserializeOpGetSchemaMapping) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSchemaMapping(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIdMappingWorkflow(response, &metadata) } - output := &GetSchemaMappingOutput{} + output := &GetIdMappingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -1412,7 +1372,7 @@ func (m *awsRestjson1_deserializeOpGetSchemaMapping) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1425,7 +1385,7 @@ func (m *awsRestjson1_deserializeOpGetSchemaMapping) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIdMappingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1491,7 +1451,7 @@ func awsRestjson1_deserializeOpErrorGetSchemaMapping(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(v **GetIdMappingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1504,9 +1464,9 @@ func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSchemaMappingOutput + var sv *GetIdMappingWorkflowOutput if *v == nil { - sv = &GetSchemaMappingOutput{} + sv = &GetIdMappingWorkflowOutput{} } else { sv = *v } @@ -1538,27 +1498,28 @@ func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappi sv.Description = ptr.String(jtv) } - case "mappedInputFields": - if err := awsRestjson1_deserializeDocumentSchemaInputAttributes(&sv.MappedInputFields, value); err != nil { + case "idMappingTechniques": + if err := awsRestjson1_deserializeDocumentIdMappingTechniques(&sv.IdMappingTechniques, value); err != nil { return err } - case "schemaArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SchemaMappingArn to be of type string, got %T instead", value) - } - sv.SchemaArn = ptr.String(jtv) + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowInputSourceConfig(&sv.InputSourceConfig, value); err != nil { + return err } - case "schemaName": + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { + return err + } + + case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } - sv.SchemaName = ptr.String(jtv) + sv.RoleArn = ptr.String(jtv) } case "tags": @@ -1582,6 +1543,24 @@ func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappi } } + case "workflowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdMappingWorkflowArn to be of type string, got %T instead", value) + } + sv.WorkflowArn = ptr.String(jtv) + } + + case "workflowName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.WorkflowName = ptr.String(jtv) + } + default: _, _ = key, value @@ -1591,14 +1570,14 @@ func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappi return nil } -type awsRestjson1_deserializeOpListMatchingJobs struct { +type awsRestjson1_deserializeOpGetMatchId struct { } -func (*awsRestjson1_deserializeOpListMatchingJobs) ID() string { +func (*awsRestjson1_deserializeOpGetMatchId) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMatchId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1612,9 +1591,9 @@ func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMatchingJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMatchId(response, &metadata) } - output := &ListMatchingJobsOutput{} + output := &GetMatchIdOutput{} out.Result = output var buff [1024]byte @@ -1635,7 +1614,7 @@ func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMatchIdOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1648,7 +1627,7 @@ func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMatchingJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMatchId(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1714,7 +1693,7 @@ func awsRestjson1_deserializeOpErrorListMatchingJobs(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1727,27 +1706,22 @@ func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMatchingJobsOutput + var sv *GetMatchIdOutput if *v == nil { - sv = &ListMatchingJobsOutput{} + sv = &GetMatchIdOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobs": - if err := awsRestjson1_deserializeDocumentJobList(&sv.Jobs, value); err != nil { - return err - } - - case "nextToken": + case "matchId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.MatchId = ptr.String(jtv) } default: @@ -1759,14 +1733,14 @@ func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJo return nil } -type awsRestjson1_deserializeOpListMatchingWorkflows struct { +type awsRestjson1_deserializeOpGetMatchingJob struct { } -func (*awsRestjson1_deserializeOpListMatchingWorkflows) ID() string { +func (*awsRestjson1_deserializeOpGetMatchingJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMatchingWorkflows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMatchingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1780,9 +1754,9 @@ func (m *awsRestjson1_deserializeOpListMatchingWorkflows) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMatchingWorkflows(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMatchingJob(response, &metadata) } - output := &ListMatchingWorkflowsOutput{} + output := &GetMatchingJobOutput{} out.Result = output var buff [1024]byte @@ -1803,7 +1777,7 @@ func (m *awsRestjson1_deserializeOpListMatchingWorkflows) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1816,7 +1790,7 @@ func (m *awsRestjson1_deserializeOpListMatchingWorkflows) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMatchingWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMatchingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1863,6 +1837,9 @@ func awsRestjson1_deserializeOpErrorListMatchingWorkflows(response *smithyhttp.R case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1879,7 +1856,7 @@ func awsRestjson1_deserializeOpErrorListMatchingWorkflows(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatchingWorkflowsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1892,29 +1869,75 @@ func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatch return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMatchingWorkflowsOutput + var sv *GetMatchingJobOutput if *v == nil { - sv = &ListMatchingWorkflowsOutput{} + sv = &GetMatchingJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "errorDetails": + if err := awsRestjson1_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { + return err + } + + case "jobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.JobId = ptr.String(jtv) } - case "workflowSummaries": - if err := awsRestjson1_deserializeDocumentMatchingWorkflowList(&sv.WorkflowSummaries, value); err != nil { + case "metrics": + if err := awsRestjson1_deserializeDocumentJobMetrics(&sv.Metrics, value); err != nil { return err } + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + } + sv.Status = types.JobStatus(jtv) + } + default: _, _ = key, value @@ -1924,14 +1947,14 @@ func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatch return nil } -type awsRestjson1_deserializeOpListSchemaMappings struct { +type awsRestjson1_deserializeOpGetMatchingWorkflow struct { } -func (*awsRestjson1_deserializeOpListSchemaMappings) ID() string { +func (*awsRestjson1_deserializeOpGetMatchingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1945,9 +1968,9 @@ func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSchemaMappings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMatchingWorkflow(response, &metadata) } - output := &ListSchemaMappingsOutput{} + output := &GetMatchingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -1968,7 +1991,7 @@ func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1981,7 +2004,7 @@ func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSchemaMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2028,6 +2051,9 @@ func awsRestjson1_deserializeOpErrorListSchemaMappings(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2044,7 +2070,7 @@ func awsRestjson1_deserializeOpErrorListSchemaMappings(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMappingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatchingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2057,29 +2083,108 @@ func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSchemaMappingsOutput + var sv *GetMatchingWorkflowOutput if *v == nil { - sv = &ListSchemaMappingsOutput{} + sv = &GetMatchingWorkflowOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "schemaList": - if err := awsRestjson1_deserializeDocumentSchemaMappingList(&sv.SchemaList, value); err != nil { + case "incrementalRunConfig": + if err := awsRestjson1_deserializeDocumentIncrementalRunConfig(&sv.IncrementalRunConfig, value); err != nil { + return err + } + + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentInputSourceConfig(&sv.InputSourceConfig, value); err != nil { + return err + } + + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { + return err + } + + case "resolutionTechniques": + if err := awsRestjson1_deserializeDocumentResolutionTechniques(&sv.ResolutionTechniques, value); err != nil { + return err + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "workflowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MatchingWorkflowArn to be of type string, got %T instead", value) + } + sv.WorkflowArn = ptr.String(jtv) + } + + case "workflowName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.WorkflowName = ptr.String(jtv) + } + default: _, _ = key, value @@ -2089,14 +2194,14 @@ func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMa return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpGetProviderService struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpGetProviderService) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetProviderService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2110,9 +2215,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetProviderService(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &GetProviderServiceOutput{} out.Result = output var buff [1024]byte @@ -2133,7 +2238,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2146,7 +2251,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetProviderService(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2187,12 +2292,18 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2206,7 +2317,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(v **GetProviderServiceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2219,20 +2330,89 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *GetProviderServiceOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &GetProviderServiceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "anonymizedOutput": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AnonymizedOutput = ptr.Bool(jtv) + } + + case "providerConfigurationDefinition": + if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderConfigurationDefinition, value); err != nil { + return err + } + + case "providerEndpointConfiguration": + if err := awsRestjson1_deserializeDocumentProviderEndpointConfiguration(&sv.ProviderEndpointConfiguration, value); err != nil { + return err + } + + case "providerEntityOutputDefinition": + if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderEntityOutputDefinition, value); err != nil { + return err + } + + case "providerIntermediateDataAccessConfiguration": + if err := awsRestjson1_deserializeDocumentProviderIntermediateDataAccessConfiguration(&sv.ProviderIntermediateDataAccessConfiguration, value); err != nil { return err } + case "providerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.ProviderName = ptr.String(jtv) + } + + case "providerServiceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProviderServiceArn to be of type string, got %T instead", value) + } + sv.ProviderServiceArn = ptr.String(jtv) + } + + case "providerServiceDisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProviderServiceDisplayName to be of type string, got %T instead", value) + } + sv.ProviderServiceDisplayName = ptr.String(jtv) + } + + case "providerServiceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.ProviderServiceName = ptr.String(jtv) + } + + case "providerServiceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceType to be of type string, got %T instead", value) + } + sv.ProviderServiceType = types.ServiceType(jtv) + } + default: _, _ = key, value @@ -2242,14 +2422,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpStartMatchingJob struct { +type awsRestjson1_deserializeOpGetSchemaMapping struct { } -func (*awsRestjson1_deserializeOpStartMatchingJob) ID() string { +func (*awsRestjson1_deserializeOpGetSchemaMapping) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartMatchingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2263,9 +2443,9 @@ func (m *awsRestjson1_deserializeOpStartMatchingJob) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartMatchingJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSchemaMapping(response, &metadata) } - output := &StartMatchingJobOutput{} + output := &GetSchemaMappingOutput{} out.Result = output var buff [1024]byte @@ -2286,7 +2466,7 @@ func (m *awsRestjson1_deserializeOpStartMatchingJob) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2299,7 +2479,7 @@ func (m *awsRestjson1_deserializeOpStartMatchingJob) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartMatchingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2343,12 +2523,6 @@ func awsRestjson1_deserializeOpErrorStartMatchingJob(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ExceedsLimitException", errorCode): - return awsRestjson1_deserializeErrorExceedsLimitException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -2371,7 +2545,7 @@ func awsRestjson1_deserializeOpErrorStartMatchingJob(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(v **StartMatchingJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2384,41 +2558,110 @@ func awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(v **StartMatchingJ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartMatchingJobOutput + var sv *GetSchemaMappingOutput if *v == nil { - sv = &StartMatchingJobOutput{} + sv = &GetSchemaMappingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobId": + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.JobId = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - default: - _, _ = key, value + case "hasWorkflows": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.HasWorkflows = ptr.Bool(jtv) + } - } - } - *v = sv - return nil -} + case "mappedInputFields": + if err := awsRestjson1_deserializeDocumentSchemaInputAttributes(&sv.MappedInputFields, value); err != nil { + return err + } -type awsRestjson1_deserializeOpTagResource struct { -} + case "schemaArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaMappingArn to be of type string, got %T instead", value) + } + sv.SchemaArn = ptr.String(jtv) + } -func (*awsRestjson1_deserializeOpTagResource) ID() string { - return "OperationDeserializer" -} + case "schemaName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.SchemaName = ptr.String(jtv) + } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListIdMappingJobs struct { +} + +func (*awsRestjson1_deserializeOpListIdMappingJobs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListIdMappingJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2432,15 +2675,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIdMappingJobs(response, &metadata) } - output := &TagResourceOutput{} + output := &ListIdMappingJobsOutput{} 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_deserializeOpDocumentListIdMappingJobsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIdMappingJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2481,12 +2752,18 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2500,14 +2777,59 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +func awsRestjson1_deserializeOpDocumentListIdMappingJobsOutput(v **ListIdMappingJobsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListIdMappingJobsOutput + if *v == nil { + sv = &ListIdMappingJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobs": + if err := awsRestjson1_deserializeDocumentJobList(&sv.Jobs, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +type awsRestjson1_deserializeOpListIdMappingWorkflows struct { +} + +func (*awsRestjson1_deserializeOpListIdMappingWorkflows) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIdMappingWorkflows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2521,15 +2843,43 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIdMappingWorkflows(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListIdMappingWorkflowsOutput{} 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_deserializeOpDocumentListIdMappingWorkflowsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIdMappingWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2570,11 +2920,17 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -2586,14 +2942,59 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateMatchingWorkflow struct { +func awsRestjson1_deserializeOpDocumentListIdMappingWorkflowsOutput(v **ListIdMappingWorkflowsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListIdMappingWorkflowsOutput + if *v == nil { + sv = &ListIdMappingWorkflowsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "workflowSummaries": + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowList(&sv.WorkflowSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateMatchingWorkflow) ID() string { +type awsRestjson1_deserializeOpListMatchingJobs struct { +} + +func (*awsRestjson1_deserializeOpListMatchingJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2607,9 +3008,9 @@ func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateMatchingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMatchingJobs(response, &metadata) } - output := &UpdateMatchingWorkflowOutput{} + output := &ListMatchingJobsOutput{} out.Result = output var buff [1024]byte @@ -2630,7 +3031,7 @@ func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2643,7 +3044,7 @@ func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListMatchingJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2709,7 +3110,7 @@ func awsRestjson1_deserializeOpErrorUpdateMatchingWorkflow(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(v **UpdateMatchingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2722,60 +3123,27 @@ func awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(v **UpdateMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateMatchingWorkflowOutput + var sv *ListMatchingJobsOutput if *v == nil { - sv = &UpdateMatchingWorkflowOutput{} + sv = &ListMatchingJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "incrementalRunConfig": - if err := awsRestjson1_deserializeDocumentIncrementalRunConfig(&sv.IncrementalRunConfig, value); err != nil { - return err - } - - case "inputSourceConfig": - if err := awsRestjson1_deserializeDocumentInputSourceConfig(&sv.InputSourceConfig, value); err != nil { - return err - } - - case "outputSourceConfig": - if err := awsRestjson1_deserializeDocumentOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { - return err - } - - case "resolutionTechniques": - if err := awsRestjson1_deserializeDocumentResolutionTechniques(&sv.ResolutionTechniques, value); err != nil { + case "jobs": + if err := awsRestjson1_deserializeDocumentJobList(&sv.Jobs, value); err != nil { return err } - case "roleArn": + 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) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) - } - - case "workflowName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) - } - sv.WorkflowName = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -2787,48 +3155,37 @@ func awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(v **UpdateMa return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } +type awsRestjson1_deserializeOpListMatchingWorkflows struct { +} - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsRestjson1_deserializeOpListMatchingWorkflows) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpListMatchingWorkflows) HandleDeserialize(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 { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListMatchingWorkflows(response, &metadata) + } + output := &ListMatchingWorkflowsOutput{} + out.Result = output -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -2839,36 +3196,45 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(&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), + 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_deserializeErrorExceedsLimitException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ExceedsLimitException{} +func awsRestjson1_deserializeOpErrorListMatchingWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -2878,65 +3244,113 @@ func awsRestjson1_deserializeErrorExceedsLimitException(response *smithyhttp.Res return err } - err := awsRestjson1_deserializeDocumentExceedsLimitException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatchingWorkflowsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - errorBody.Seek(0, io.SeekStart) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - return output -} + var sv *ListMatchingWorkflowsOutput + if *v == nil { + sv = &ListMatchingWorkflowsOutput{} + } else { + sv = *v + } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "workflowSummaries": + if err := awsRestjson1_deserializeDocumentMatchingWorkflowList(&sv.WorkflowSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value - 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 } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) +type awsRestjson1_deserializeOpListProviderServices struct { +} + +func (*awsRestjson1_deserializeOpListProviderServices) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpListProviderServices) HandleDeserialize(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 { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListProviderServices(response, &metadata) + } + output := &ListProviderServicesOutput{} + out.Result = output -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -2947,36 +3361,45 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentListProviderServicesOutput(&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), + 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_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} +func awsRestjson1_deserializeOpErrorListProviderServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -2986,33 +3409,162 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo 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(), + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentListProviderServicesOutput(v **ListProviderServicesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListProviderServicesOutput + if *v == nil { + sv = &ListProviderServicesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "providerServiceSummaries": + if err := awsRestjson1_deserializeDocumentProviderServiceList(&sv.ProviderServiceSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} +type awsRestjson1_deserializeOpListSchemaMappings struct { +} + +func (*awsRestjson1_deserializeOpListSchemaMappings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(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_deserializeOpErrorListSchemaMappings(response, &metadata) + } + output := &ListSchemaMappingsOutput{} + 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{} 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_deserializeOpDocumentListSchemaMappingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListSchemaMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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{ @@ -3022,24 +3574,2210 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMappingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSchemaMappingsOutput + if *v == nil { + sv = &ListSchemaMappingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "schemaList": + if err := awsRestjson1_deserializeDocumentSchemaMappingList(&sv.SchemaList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartIdMappingJob struct { +} + +func (*awsRestjson1_deserializeOpStartIdMappingJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartIdMappingJob) HandleDeserialize(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_deserializeOpErrorStartIdMappingJob(response, &metadata) + } + output := &StartIdMappingJobOutput{} + 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_deserializeOpDocumentStartIdMappingJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartIdMappingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ExceedsLimitException", errorCode): + return awsRestjson1_deserializeErrorExceedsLimitException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartIdMappingJobOutput(v **StartIdMappingJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartIdMappingJobOutput + if *v == nil { + sv = &StartIdMappingJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + } + sv.JobId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartMatchingJob struct { +} + +func (*awsRestjson1_deserializeOpStartMatchingJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartMatchingJob) HandleDeserialize(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_deserializeOpErrorStartMatchingJob(response, &metadata) + } + output := &StartMatchingJobOutput{} + 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_deserializeOpDocumentStartMatchingJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartMatchingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ExceedsLimitException", errorCode): + return awsRestjson1_deserializeErrorExceedsLimitException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(v **StartMatchingJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartMatchingJobOutput + if *v == nil { + sv = &StartMatchingJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + } + sv.JobId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateIdMappingWorkflow struct { +} + +func (*awsRestjson1_deserializeOpUpdateIdMappingWorkflow) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateIdMappingWorkflow) HandleDeserialize(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_deserializeOpErrorUpdateIdMappingWorkflow(response, &metadata) + } + output := &UpdateIdMappingWorkflowOutput{} + 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_deserializeOpDocumentUpdateIdMappingWorkflowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateIdMappingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateIdMappingWorkflowOutput(v **UpdateIdMappingWorkflowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateIdMappingWorkflowOutput + if *v == nil { + sv = &UpdateIdMappingWorkflowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "idMappingTechniques": + if err := awsRestjson1_deserializeDocumentIdMappingTechniques(&sv.IdMappingTechniques, value); err != nil { + return err + } + + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowInputSourceConfig(&sv.InputSourceConfig, value); err != nil { + return err + } + + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { + return err + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "workflowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdMappingWorkflowArn to be of type string, got %T instead", value) + } + sv.WorkflowArn = ptr.String(jtv) + } + + case "workflowName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.WorkflowName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateMatchingWorkflow struct { +} + +func (*awsRestjson1_deserializeOpUpdateMatchingWorkflow) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(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_deserializeOpErrorUpdateMatchingWorkflow(response, &metadata) + } + output := &UpdateMatchingWorkflowOutput{} + 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_deserializeOpDocumentUpdateMatchingWorkflowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(v **UpdateMatchingWorkflowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateMatchingWorkflowOutput + if *v == nil { + sv = &UpdateMatchingWorkflowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "incrementalRunConfig": + if err := awsRestjson1_deserializeDocumentIncrementalRunConfig(&sv.IncrementalRunConfig, value); err != nil { + return err + } + + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentInputSourceConfig(&sv.InputSourceConfig, value); err != nil { + return err + } + + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { + return err + } + + case "resolutionTechniques": + if err := awsRestjson1_deserializeDocumentResolutionTechniques(&sv.ResolutionTechniques, value); err != nil { + return err + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "workflowName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.WorkflowName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSchemaMapping struct { +} + +func (*awsRestjson1_deserializeOpUpdateSchemaMapping) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSchemaMapping) HandleDeserialize(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_deserializeOpErrorUpdateSchemaMapping(response, &metadata) + } + output := &UpdateSchemaMappingOutput{} + 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_deserializeOpDocumentUpdateSchemaMappingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSchemaMappingOutput(v **UpdateSchemaMappingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateSchemaMappingOutput + if *v == nil { + sv = &UpdateSchemaMappingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "mappedInputFields": + if err := awsRestjson1_deserializeDocumentSchemaInputAttributes(&sv.MappedInputFields, value); err != nil { + return err + } + + case "schemaArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaMappingArn to be of type string, got %T instead", value) + } + sv.SchemaArn = ptr.String(jtv) + } + + case "schemaName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.SchemaName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorExceedsLimitException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ExceedsLimitException{} + 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_deserializeDocumentExceedsLimitException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_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_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + 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_deserializeDocumentValidationException(&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_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAwsAccountIdList(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 AwsAccountId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ErrorDetails + if *v == nil { + sv = &types.ErrorDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimitException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ExceedsLimitException + if *v == nil { + sv = &types.ExceedsLimitException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "quotaName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaName = ptr.String(jtv) + } + + case "quotaValue": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.QuotaValue = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingJobMetrics(v **types.IdMappingJobMetrics, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IdMappingJobMetrics + if *v == nil { + sv = &types.IdMappingJobMetrics{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inputRecords": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InputRecords = ptr.Int32(int32(i64)) + } + + case "recordsNotProcessed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RecordsNotProcessed = ptr.Int32(int32(i64)) + } + + case "totalRecordsProcessed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalRecordsProcessed = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingTechniques(v **types.IdMappingTechniques, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IdMappingTechniques + if *v == nil { + sv = &types.IdMappingTechniques{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "idMappingType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdMappingType to be of type string, got %T instead", value) + } + sv.IdMappingType = types.IdMappingType(jtv) + } + + case "providerProperties": + if err := awsRestjson1_deserializeDocumentProviderProperties(&sv.ProviderProperties, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSource(v **types.IdMappingWorkflowInputSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IdMappingWorkflowInputSource + if *v == nil { + sv = &types.IdMappingWorkflowInputSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inputSourceARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InputSourceARN = ptr.String(jtv) + } + + case "schemaName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.SchemaName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSourceConfig(v *[]types.IdMappingWorkflowInputSource, 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.IdMappingWorkflowInputSource + if *v == nil { + cv = []types.IdMappingWorkflowInputSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdMappingWorkflowInputSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowInputSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingWorkflowList(v *[]types.IdMappingWorkflowSummary, 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.IdMappingWorkflowSummary + if *v == nil { + cv = []types.IdMappingWorkflowSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdMappingWorkflowSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSource(v **types.IdMappingWorkflowOutputSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IdMappingWorkflowOutputSource + if *v == nil { + sv = &types.IdMappingWorkflowOutputSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "KMSArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSArn to be of type string, got %T instead", value) + } + sv.KMSArn = ptr.String(jtv) + } + + case "outputS3Path": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) + } + sv.OutputS3Path = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(v *[]types.IdMappingWorkflowOutputSource, 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.IdMappingWorkflowOutputSource + if *v == nil { + cv = []types.IdMappingWorkflowOutputSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdMappingWorkflowOutputSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingWorkflowSummary(v **types.IdMappingWorkflowSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IdMappingWorkflowSummary + if *v == nil { + sv = &types.IdMappingWorkflowSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "workflowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdMappingWorkflowArn to be of type string, got %T instead", value) + } + sv.WorkflowArn = ptr.String(jtv) + } + + case "workflowName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.WorkflowName = ptr.String(jtv) + } + + 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_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentIncrementalRunConfig(v **types.IncrementalRunConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3052,22 +5790,22 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.IncrementalRunConfig if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.IncrementalRunConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "incrementalRunType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected IncrementalRunType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.IncrementalRunType = types.IncrementalRunType(jtv) } default: @@ -3079,7 +5817,7 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentInputSource(v **types.InputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3092,22 +5830,40 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.InputSource if *v == nil { - sv = &types.ConflictException{} + sv = &types.InputSource{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "applyNormalization": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ApplyNormalization = ptr.Bool(jtv) + } + + case "inputSourceARN": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.InputSourceARN = ptr.String(jtv) + } + + case "schemaName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.SchemaName = ptr.String(jtv) } default: @@ -3119,7 +5875,41 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { +func awsRestjson1_deserializeDocumentInputSourceConfig(v *[]types.InputSource, 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.InputSource + if *v == nil { + cv = []types.InputSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InputSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentInputSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIntermediateSourceConfiguration(v **types.IntermediateSourceConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3132,22 +5922,22 @@ func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ErrorDetails + var sv *types.IntermediateSourceConfiguration if *v == nil { - sv = &types.ErrorDetails{} + sv = &types.IntermediateSourceConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "errorMessage": + case "intermediateS3Path": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.IntermediateS3Path = ptr.String(jtv) } default: @@ -3159,7 +5949,7 @@ func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value return nil } -func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimitException, value interface{}) error { +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3172,9 +5962,9 @@ func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ExceedsLimitException + var sv *types.InternalServerException if *v == nil { - sv = &types.ExceedsLimitException{} + sv = &types.InternalServerException{} } else { sv = *v } @@ -3190,16 +5980,85 @@ func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimi sv.Message = ptr.String(jtv) } - case "quotaName": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentJobList(v *[]types.JobSummary, 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.JobSummary + if *v == nil { + cv = []types.JobSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.JobSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentJobMetrics(v **types.JobMetrics, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.JobMetrics + if *v == nil { + sv = &types.JobMetrics{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inputRecords": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } - sv.QuotaName = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InputRecords = ptr.Int32(int32(i64)) } - case "quotaValue": + case "matchIDs": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -3209,7 +6068,33 @@ func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimi if err != nil { return err } - sv.QuotaValue = ptr.Int32(int32(i64)) + sv.MatchIDs = ptr.Int32(int32(i64)) + } + + case "recordsNotProcessed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RecordsNotProcessed = ptr.Int32(int32(i64)) + } + + case "totalRecordsProcessed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalRecordsProcessed = ptr.Int32(int32(i64)) } default: @@ -3221,7 +6106,7 @@ func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimi return nil } -func awsRestjson1_deserializeDocumentIncrementalRunConfig(v **types.IncrementalRunConfig, value interface{}) error { +func awsRestjson1_deserializeDocumentJobSummary(v **types.JobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3234,22 +6119,63 @@ func awsRestjson1_deserializeDocumentIncrementalRunConfig(v **types.IncrementalR return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IncrementalRunConfig + var sv *types.JobSummary if *v == nil { - sv = &types.IncrementalRunConfig{} + sv = &types.JobSummary{} } else { sv = *v } - for key, value := range shape { - switch key { - case "incrementalRunType": + for key, value := range shape { + switch key { + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "jobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + } + sv.JobId = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IncrementalRunType to be of type string, got %T instead", value) + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) } - sv.IncrementalRunType = types.IncrementalRunType(jtv) + sv.Status = types.JobStatus(jtv) } default: @@ -3261,7 +6187,7 @@ func awsRestjson1_deserializeDocumentIncrementalRunConfig(v **types.IncrementalR return nil } -func awsRestjson1_deserializeDocumentInputSource(v **types.InputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentMatchingKeys(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3269,57 +6195,35 @@ func awsRestjson1_deserializeDocumentInputSource(v **types.InputSource, value in 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.InputSource + var cv []string if *v == nil { - sv = &types.InputSource{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "applyNormalization": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.ApplyNormalization = ptr.Bool(jtv) - } - - case "inputSourceARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.InputSourceARN = ptr.String(jtv) - } - - case "schemaName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) - } - sv.SchemaName = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeName to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentInputSourceConfig(v *[]types.InputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentMatchingWorkflowList(v *[]types.MatchingWorkflowSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3332,17 +6236,17 @@ func awsRestjson1_deserializeDocumentInputSourceConfig(v *[]types.InputSource, v return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.InputSource + var cv []types.MatchingWorkflowSummary if *v == nil { - cv = []types.InputSource{} + cv = []types.MatchingWorkflowSummary{} } else { cv = *v } for _, value := range shape { - var col types.InputSource + var col types.MatchingWorkflowSummary destAddr := &col - if err := awsRestjson1_deserializeDocumentInputSource(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentMatchingWorkflowSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -3353,7 +6257,7 @@ func awsRestjson1_deserializeDocumentInputSourceConfig(v *[]types.InputSource, v return nil } -func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsRestjson1_deserializeDocumentMatchingWorkflowSummary(v **types.MatchingWorkflowSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3366,22 +6270,72 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.MatchingWorkflowSummary if *v == nil { - sv = &types.InternalServerException{} + sv = &types.MatchingWorkflowSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "resolutionType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ResolutionType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ResolutionType = types.ResolutionType(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "workflowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MatchingWorkflowArn to be of type string, got %T instead", value) + } + sv.WorkflowArn = ptr.String(jtv) + } + + case "workflowName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.WorkflowName = ptr.String(jtv) } default: @@ -3393,7 +6347,7 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } -func awsRestjson1_deserializeDocumentJobList(v *[]types.JobSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentOutputAttribute(v **types.OutputAttribute, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3401,33 +6355,48 @@ func awsRestjson1_deserializeDocumentJobList(v *[]types.JobSummary, value interf return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.JobSummary + var sv *types.OutputAttribute if *v == nil { - cv = []types.JobSummary{} + sv = &types.OutputAttribute{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.JobSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentJobSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "hashed": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Hashed = ptr.Bool(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentJobMetrics(v **types.JobMetrics, value interface{}) error { +func awsRestjson1_deserializeDocumentOutputAttributes(v *[]types.OutputAttribute, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3435,82 +6404,33 @@ func awsRestjson1_deserializeDocumentJobMetrics(v **types.JobMetrics, value inte 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.JobMetrics + var cv []types.OutputAttribute if *v == nil { - sv = &types.JobMetrics{} + cv = []types.OutputAttribute{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "inputRecords": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.InputRecords = ptr.Int32(int32(i64)) - } - - case "matchIDs": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MatchIDs = ptr.Int32(int32(i64)) - } - - case "recordsNotProcessed": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RecordsNotProcessed = ptr.Int32(int32(i64)) - } - - case "totalRecordsProcessed": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.TotalRecordsProcessed = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.OutputAttribute + destAddr := &col + if err := awsRestjson1_deserializeDocumentOutputAttribute(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentJobSummary(v **types.JobSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentOutputSource(v **types.OutputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3523,63 +6443,45 @@ func awsRestjson1_deserializeDocumentJobSummary(v **types.JobSummary, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.JobSummary + var sv *types.OutputSource if *v == nil { - sv = &types.JobSummary{} + sv = &types.OutputSource{} } else { sv = *v } for key, value := range shape { switch key { - case "endTime": + case "applyNormalization": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } + sv.ApplyNormalization = ptr.Bool(jtv) } - case "jobId": + case "KMSArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + return fmt.Errorf("expected KMSArn to be of type string, got %T instead", value) } - sv.JobId = ptr.String(jtv) + sv.KMSArn = ptr.String(jtv) } - case "startTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } + case "output": + if err := awsRestjson1_deserializeDocumentOutputAttributes(&sv.Output, value); err != nil { + return err } - case "status": + case "outputS3Path": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) } - sv.Status = types.JobStatus(jtv) + sv.OutputS3Path = ptr.String(jtv) } default: @@ -3591,7 +6493,7 @@ func awsRestjson1_deserializeDocumentJobSummary(v **types.JobSummary, value inte return nil } -func awsRestjson1_deserializeDocumentMatchingKeys(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentOutputSourceConfig(v *[]types.OutputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3604,22 +6506,20 @@ func awsRestjson1_deserializeDocumentMatchingKeys(v *[]string, value interface{} return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.OutputSource if *v == nil { - cv = []string{} + cv = []types.OutputSource{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AttributeName to be of type string, got %T instead", value) - } - col = jtv + var col types.OutputSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentOutputSource(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -3627,7 +6527,7 @@ func awsRestjson1_deserializeDocumentMatchingKeys(v *[]string, value interface{} return nil } -func awsRestjson1_deserializeDocumentMatchingWorkflowList(v *[]types.MatchingWorkflowSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentProviderEndpointConfiguration(v *types.ProviderEndpointConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3635,33 +6535,80 @@ func awsRestjson1_deserializeDocumentMatchingWorkflowList(v *[]types.MatchingWor return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.MatchingWorkflowSummary + var uv types.ProviderEndpointConfiguration +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "marketplaceConfiguration": + var mv types.ProviderMarketplaceConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentProviderMarketplaceConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ProviderEndpointConfigurationMemberMarketplaceConfiguration{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentProviderIntermediateDataAccessConfiguration(v **types.ProviderIntermediateDataAccessConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProviderIntermediateDataAccessConfiguration if *v == nil { - cv = []types.MatchingWorkflowSummary{} + sv = &types.ProviderIntermediateDataAccessConfiguration{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.MatchingWorkflowSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentMatchingWorkflowSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "awsAccountIds": + if err := awsRestjson1_deserializeDocumentAwsAccountIdList(&sv.AwsAccountIds, value); err != nil { + return err + } + + case "requiredBucketActions": + if err := awsRestjson1_deserializeDocumentRequiredBucketActionsList(&sv.RequiredBucketActions, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentMatchingWorkflowSummary(v **types.MatchingWorkflowSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentProviderMarketplaceConfiguration(v **types.ProviderMarketplaceConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3674,63 +6621,49 @@ func awsRestjson1_deserializeDocumentMatchingWorkflowSummary(v **types.MatchingW return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MatchingWorkflowSummary + var sv *types.ProviderMarketplaceConfiguration if *v == nil { - sv = &types.MatchingWorkflowSummary{} + sv = &types.ProviderMarketplaceConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "createdAt": + case "assetId": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } + sv.AssetId = ptr.String(jtv) } - case "updatedAt": + case "dataSetId": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } + sv.DataSetId = ptr.String(jtv) } - case "workflowArn": + case "listingId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MatchingWorkflowArn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.WorkflowArn = ptr.String(jtv) + sv.ListingId = ptr.String(jtv) } - case "workflowName": + case "revisionId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.WorkflowName = ptr.String(jtv) + sv.RevisionId = ptr.String(jtv) } default: @@ -3742,7 +6675,7 @@ func awsRestjson1_deserializeDocumentMatchingWorkflowSummary(v **types.MatchingW return nil } -func awsRestjson1_deserializeDocumentOutputAttribute(v **types.OutputAttribute, value interface{}) error { +func awsRestjson1_deserializeDocumentProviderProperties(v **types.ProviderProperties, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3755,31 +6688,32 @@ func awsRestjson1_deserializeDocumentOutputAttribute(v **types.OutputAttribute, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OutputAttribute + var sv *types.ProviderProperties if *v == nil { - sv = &types.OutputAttribute{} + sv = &types.ProviderProperties{} } else { sv = *v } for key, value := range shape { switch key { - case "hashed": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.Hashed = ptr.Bool(jtv) + case "intermediateSourceConfiguration": + if err := awsRestjson1_deserializeDocumentIntermediateSourceConfiguration(&sv.IntermediateSourceConfiguration, value); err != nil { + return err } - case "name": + case "providerConfiguration": + if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderConfiguration, value); err != nil { + return err + } + + case "providerServiceArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AttributeName to be of type string, got %T instead", value) + return fmt.Errorf("expected ProviderServiceArn to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.ProviderServiceArn = ptr.String(jtv) } default: @@ -3791,7 +6725,7 @@ func awsRestjson1_deserializeDocumentOutputAttribute(v **types.OutputAttribute, return nil } -func awsRestjson1_deserializeDocumentOutputAttributes(v *[]types.OutputAttribute, value interface{}) error { +func awsRestjson1_deserializeDocumentProviderServiceList(v *[]types.ProviderServiceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3804,17 +6738,17 @@ func awsRestjson1_deserializeDocumentOutputAttributes(v *[]types.OutputAttribute return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.OutputAttribute + var cv []types.ProviderServiceSummary if *v == nil { - cv = []types.OutputAttribute{} + cv = []types.ProviderServiceSummary{} } else { cv = *v } for _, value := range shape { - var col types.OutputAttribute + var col types.ProviderServiceSummary destAddr := &col - if err := awsRestjson1_deserializeDocumentOutputAttribute(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentProviderServiceSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -3825,7 +6759,7 @@ func awsRestjson1_deserializeDocumentOutputAttributes(v *[]types.OutputAttribute return nil } -func awsRestjson1_deserializeDocumentOutputSource(v **types.OutputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentProviderServiceSummary(v **types.ProviderServiceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3838,45 +6772,58 @@ func awsRestjson1_deserializeDocumentOutputSource(v **types.OutputSource, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OutputSource + var sv *types.ProviderServiceSummary if *v == nil { - sv = &types.OutputSource{} + sv = &types.ProviderServiceSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "applyNormalization": + case "providerName": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) } - sv.ApplyNormalization = ptr.Bool(jtv) + sv.ProviderName = ptr.String(jtv) } - case "KMSArn": + case "providerServiceArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected KMSArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ProviderServiceArn to be of type string, got %T instead", value) } - sv.KMSArn = ptr.String(jtv) + sv.ProviderServiceArn = ptr.String(jtv) } - case "output": - if err := awsRestjson1_deserializeDocumentOutputAttributes(&sv.Output, value); err != nil { - return err + case "providerServiceDisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProviderServiceDisplayName to be of type string, got %T instead", value) + } + sv.ProviderServiceDisplayName = ptr.String(jtv) } - case "outputS3Path": + case "providerServiceName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) } - sv.OutputS3Path = ptr.String(jtv) + sv.ProviderServiceName = ptr.String(jtv) + } + + case "providerServiceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceType to be of type string, got %T instead", value) + } + sv.ProviderServiceType = types.ServiceType(jtv) } default: @@ -3888,7 +6835,7 @@ func awsRestjson1_deserializeDocumentOutputSource(v **types.OutputSource, value return nil } -func awsRestjson1_deserializeDocumentOutputSourceConfig(v *[]types.OutputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentRequiredBucketActionsList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3901,20 +6848,22 @@ func awsRestjson1_deserializeDocumentOutputSourceConfig(v *[]types.OutputSource, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.OutputSource + var cv []string if *v == nil { - cv = []types.OutputSource{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.OutputSource - destAddr := &col - if err := awsRestjson1_deserializeDocumentOutputSource(&destAddr, value); err != nil { - return err + 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 } - col = *destAddr cv = append(cv, col) } @@ -3944,6 +6893,11 @@ func awsRestjson1_deserializeDocumentResolutionTechniques(v **types.ResolutionTe for key, value := range shape { switch key { + case "providerProperties": + if err := awsRestjson1_deserializeDocumentProviderProperties(&sv.ProviderProperties, value); err != nil { + return err + } + case "resolutionType": if value != nil { jtv, ok := value.(string) @@ -4180,6 +7134,15 @@ func awsRestjson1_deserializeDocumentSchemaInputAttribute(v **types.SchemaInputA sv.MatchKey = ptr.String(jtv) } + case "subType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeName to be of type string, got %T instead", value) + } + sv.SubType = ptr.String(jtv) + } + case "type": if value != nil { jtv, ok := value.(string) @@ -4304,6 +7267,15 @@ func awsRestjson1_deserializeDocumentSchemaMappingSummary(v **types.SchemaMappin } } + case "hasWorkflows": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.HasWorkflows = ptr.Bool(jtv) + } + case "schemaArn": if value != nil { jtv, ok := value.(string) @@ -4462,3 +7434,11 @@ func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationExc *v = sv return nil } + +func awsRestjson1_deserializeDocumentDocument(v *document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + *v = internaldocument.NewDocumentUnmarshaler(value) + return nil +} diff --git a/service/entityresolution/document/doc.go b/service/entityresolution/document/doc.go new file mode 100644 index 00000000000..2b06b14f3cd --- /dev/null +++ b/service/entityresolution/document/doc.go @@ -0,0 +1,66 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package document implements encoding and decoding of open-content that has a JSON-like data model. +// This data-model allows for UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a +// map of UTF-8 strings to these values. +// +// Interface defines the semantics for how a document type is marshalled and unmarshalled for requests and responses +// for the service. To send a document as input to the service you use NewLazyDocument and pass it the Go type to be +// sent to the service. NewLazyDocument returns a document Interface type that encodes the provided Go type during +// the request serialization step after you have invoked an API client operation that uses the document type. +// +// The following examples show how you can create document types using basic Go types. +// +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) +// +// NewLazyDocument(3.14159) +// +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// +// NewLazyDocument(true) +// +// Services can send document types as part of their API responses. To retrieve the content of a response document +// you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass +// a reference to the Go type that you want to unmarshal and map the response to. +// +// For example, if you expect to receive key/value map from the service response: +// +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } +// +// If a service can return one or more data-types in the response, you can use an empty interface and type switch to +// dynamically handle the response type. +// +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } +// +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } +// +// The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document +// including more in depth examples that cover user-defined structure types. +package document diff --git a/service/entityresolution/document/document.go b/service/entityresolution/document/document.go new file mode 100644 index 00000000000..3c3a53b3ba9 --- /dev/null +++ b/service/entityresolution/document/document.go @@ -0,0 +1,34 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + internaldocument "github.com/aws/aws-sdk-go-v2/service/entityresolution/internal/document" +) + +// Interface defines a document which is a protocol-agnostic type which supports a +// JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary +// precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 +// strings to these values. +// +// You create a document type using the NewLazyDocument function and passing it +// the Go type to marshal. When receiving a document in an API response, you use +// the document's UnmarshalSmithyDocument function to decode the response to your +// desired Go type. Unless documented specifically generated structure types in +// client packages or client types packages are not supported at this time. Such +// types embed a noSmithyDocumentSerde and will cause an error to be returned when +// attempting to send an API request. +// +// For more information see the accompanying package documentation and linked +// references. +type Interface = internaldocument.Interface + +// You create document type using the NewLazyDocument function and passing it the +// Go type to be marshaled and sent to the service. The document marshaler supports +// semantics similar to the encoding/json Go standard library. +// +// For more information see the accompanying package documentation and linked +// references. +func NewLazyDocument(v interface{}) Interface { + return internaldocument.NewDocumentMarshaler(v) +} diff --git a/service/entityresolution/endpoints.go b/service/entityresolution/endpoints.go index 5a6f594983b..15c3179315b 100644 --- a/service/entityresolution/endpoints.go +++ b/service/entityresolution/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://entityresolution-fips.") diff --git a/service/entityresolution/generated.json b/service/entityresolution/generated.json index 2c7ae90c825..5d6bbe9eed8 100644 --- a/service/entityresolution/generated.json +++ b/service/entityresolution/generated.json @@ -9,27 +9,42 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_CreateIdMappingWorkflow.go", "api_op_CreateMatchingWorkflow.go", "api_op_CreateSchemaMapping.go", + "api_op_DeleteIdMappingWorkflow.go", "api_op_DeleteMatchingWorkflow.go", "api_op_DeleteSchemaMapping.go", + "api_op_GetIdMappingJob.go", + "api_op_GetIdMappingWorkflow.go", "api_op_GetMatchId.go", "api_op_GetMatchingJob.go", "api_op_GetMatchingWorkflow.go", + "api_op_GetProviderService.go", "api_op_GetSchemaMapping.go", + "api_op_ListIdMappingJobs.go", + "api_op_ListIdMappingWorkflows.go", "api_op_ListMatchingJobs.go", "api_op_ListMatchingWorkflows.go", + "api_op_ListProviderServices.go", "api_op_ListSchemaMappings.go", "api_op_ListTagsForResource.go", + "api_op_StartIdMappingJob.go", "api_op_StartMatchingJob.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateIdMappingWorkflow.go", "api_op_UpdateMatchingWorkflow.go", + "api_op_UpdateSchemaMapping.go", "deserializers.go", "doc.go", + "document/doc.go", + "document/document.go", "endpoints.go", "endpoints_test.go", "generated.json", + "internal/document/document.go", + "internal/document/document_test.go", "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "protocol_test.go", @@ -37,6 +52,7 @@ "types/enums.go", "types/errors.go", "types/types.go", + "types/types_exported_test.go", "validators.go" ], "go": "1.15", diff --git a/service/entityresolution/internal/document/document.go b/service/entityresolution/internal/document/document.go new file mode 100644 index 00000000000..dd06bf5dafd --- /dev/null +++ b/service/entityresolution/internal/document/document.go @@ -0,0 +1,99 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + "bytes" + "encoding/json" + smithydocument "github.com/aws/smithy-go/document" + smithydocumentjson "github.com/aws/smithy-go/document/json" +) + +// github.com/aws/aws-sdk-go-v2/service/entityresolution/internal/document.smithyDocument +// is an interface which is used to bind a document type to its service client. +type smithyDocument interface { + isSmithyDocument() +} + +// github.com/aws/aws-sdk-go-v2/service/entityresolution/internal/document.Interface +// is a JSON-like data model type that is protocol agnostic and is usedto send +// open-content to a service. +type Interface interface { + smithyDocument + smithydocument.Marshaler + smithydocument.Unmarshaler +} + +type documentMarshaler struct { + value interface{} +} + +func (m *documentMarshaler) UnmarshalSmithyDocument(v interface{}) error { + mBytes, err := m.MarshalSmithyDocument() + if err != nil { + return err + } + + jDecoder := json.NewDecoder(bytes.NewReader(mBytes)) + jDecoder.UseNumber() + + var jv interface{} + if err := jDecoder.Decode(&v); err != nil { + return err + } + + return NewDocumentUnmarshaler(v).UnmarshalSmithyDocument(&jv) +} + +func (m *documentMarshaler) MarshalSmithyDocument() ([]byte, error) { + return smithydocumentjson.NewEncoder().Encode(m.value) +} + +func (m *documentMarshaler) isSmithyDocument() {} + +var _ Interface = (*documentMarshaler)(nil) + +type documentUnmarshaler struct { + value interface{} +} + +func (m *documentUnmarshaler) UnmarshalSmithyDocument(v interface{}) error { + decoder := smithydocumentjson.NewDecoder() + return decoder.DecodeJSONInterface(m.value, v) +} + +func (m *documentUnmarshaler) MarshalSmithyDocument() ([]byte, error) { + return json.Marshal(m.value) +} + +func (m *documentUnmarshaler) isSmithyDocument() {} + +var _ Interface = (*documentUnmarshaler)(nil) + +// NewDocumentMarshaler creates a new document marshaler for the given input type +func NewDocumentMarshaler(v interface{}) Interface { + return &documentMarshaler{ + value: v, + } +} + +// NewDocumentUnmarshaler creates a new document unmarshaler for the given service +// response +func NewDocumentUnmarshaler(v interface{}) Interface { + return &documentUnmarshaler{ + value: v, + } +} + +// github.com/aws/aws-sdk-go-v2/service/entityresolution/internal/document.IsInterface +// returns whether the given Interface implementation is a valid client +// implementation +func IsInterface(v Interface) (ok bool) { + defer func() { + if err := recover(); err != nil { + ok = false + } + }() + v.isSmithyDocument() + return true +} diff --git a/service/entityresolution/internal/document/document_test.go b/service/entityresolution/internal/document/document_test.go new file mode 100644 index 00000000000..775645dcd6e --- /dev/null +++ b/service/entityresolution/internal/document/document_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +var _ smithyDocument = (Interface)(nil) +var _ smithydocument.Marshaler = (Interface)(nil) +var _ smithydocument.Unmarshaler = (Interface)(nil) diff --git a/service/entityresolution/serializers.go b/service/entityresolution/serializers.go index a65ade66780..813f293c4db 100644 --- a/service/entityresolution/serializers.go +++ b/service/entityresolution/serializers.go @@ -6,6 +6,8 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/entityresolution/internal/document" "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" @@ -14,6 +16,119 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpCreateIdMappingWorkflow struct { +} + +func (*awsRestjson1_serializeOpCreateIdMappingWorkflow) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateIdMappingWorkflow) 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.(*CreateIdMappingWorkflowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateIdMappingWorkflowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateIdMappingWorkflowInput(v *CreateIdMappingWorkflowInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateIdMappingWorkflowInput(v *CreateIdMappingWorkflowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.IdMappingTechniques != nil { + ok := object.Key("idMappingTechniques") + if err := awsRestjson1_serializeDocumentIdMappingTechniques(v.IdMappingTechniques, ok); err != nil { + return err + } + } + + if v.InputSourceConfig != nil { + ok := object.Key("inputSourceConfig") + if err := awsRestjson1_serializeDocumentIdMappingWorkflowInputSourceConfig(v.InputSourceConfig, ok); err != nil { + return err + } + } + + if v.OutputSourceConfig != nil { + ok := object.Key("outputSourceConfig") + if err := awsRestjson1_serializeDocumentIdMappingWorkflowOutputSourceConfig(v.OutputSourceConfig, ok); err != nil { + return err + } + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.WorkflowName != nil { + ok := object.Key("workflowName") + ok.String(*v.WorkflowName) + } + + return nil +} + type awsRestjson1_serializeOpCreateMatchingWorkflow struct { } @@ -228,14 +343,14 @@ func awsRestjson1_serializeOpDocumentCreateSchemaMappingInput(v *CreateSchemaMap return nil } -type awsRestjson1_serializeOpDeleteMatchingWorkflow struct { +type awsRestjson1_serializeOpDeleteIdMappingWorkflow struct { } -func (*awsRestjson1_serializeOpDeleteMatchingWorkflow) ID() string { +func (*awsRestjson1_serializeOpDeleteIdMappingWorkflow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteMatchingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteIdMappingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -243,13 +358,13 @@ func (m *awsRestjson1_serializeOpDeleteMatchingWorkflow) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteMatchingWorkflowInput) + input, ok := in.Parameters.(*DeleteIdMappingWorkflowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}") + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows/{workflowName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -265,7 +380,7 @@ func (m *awsRestjson1_serializeOpDeleteMatchingWorkflow) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteMatchingWorkflowInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteIdMappingWorkflowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -276,7 +391,7 @@ func (m *awsRestjson1_serializeOpDeleteMatchingWorkflow) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteMatchingWorkflowInput(v *DeleteMatchingWorkflowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteIdMappingWorkflowInput(v *DeleteIdMappingWorkflowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -293,14 +408,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteMatchingWorkflowInput(v *DeleteMa return nil } -type awsRestjson1_serializeOpDeleteSchemaMapping struct { +type awsRestjson1_serializeOpDeleteMatchingWorkflow struct { } -func (*awsRestjson1_serializeOpDeleteSchemaMapping) ID() string { +func (*awsRestjson1_serializeOpDeleteMatchingWorkflow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteSchemaMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteMatchingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -308,13 +423,13 @@ func (m *awsRestjson1_serializeOpDeleteSchemaMapping) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteSchemaMappingInput) + input, ok := in.Parameters.(*DeleteMatchingWorkflowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/schemas/{schemaName}") + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -330,7 +445,7 @@ func (m *awsRestjson1_serializeOpDeleteSchemaMapping) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteSchemaMappingInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteMatchingWorkflowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -341,16 +456,16 @@ func (m *awsRestjson1_serializeOpDeleteSchemaMapping) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteSchemaMappingInput(v *DeleteSchemaMappingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteMatchingWorkflowInput(v *DeleteMatchingWorkflowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.SchemaName == nil || len(*v.SchemaName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member schemaName must not be empty")} + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} } - if v.SchemaName != nil { - if err := encoder.SetURI("schemaName").String(*v.SchemaName); err != nil { + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { return err } } @@ -358,14 +473,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSchemaMappingInput(v *DeleteSchem return nil } -type awsRestjson1_serializeOpGetMatchId struct { +type awsRestjson1_serializeOpDeleteSchemaMapping struct { } -func (*awsRestjson1_serializeOpGetMatchId) ID() string { +func (*awsRestjson1_serializeOpDeleteSchemaMapping) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetMatchId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteSchemaMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -373,16 +488,16 @@ func (m *awsRestjson1_serializeOpGetMatchId) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetMatchIdInput) + input, ok := in.Parameters.(*DeleteSchemaMappingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}/matches") + opPath, opQuery := httpbinding.SplitURI("/schemas/{schemaName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "DELETE" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -395,18 +510,7 @@ func (m *awsRestjson1_serializeOpGetMatchId) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetMatchIdInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGetMatchIdInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteSchemaMappingInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -417,30 +521,16 @@ func (m *awsRestjson1_serializeOpGetMatchId) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetMatchIdInput(v *GetMatchIdInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteSchemaMappingInput(v *DeleteSchemaMappingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} - } - if v.WorkflowName != nil { - if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { - return err - } + if v.SchemaName == nil || len(*v.SchemaName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member schemaName must not be empty")} } - - return nil -} - -func awsRestjson1_serializeOpDocumentGetMatchIdInput(v *GetMatchIdInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Record != nil { - ok := object.Key("record") - if err := awsRestjson1_serializeDocumentRecordAttributeMap(v.Record, ok); err != nil { + if v.SchemaName != nil { + if err := encoder.SetURI("schemaName").String(*v.SchemaName); err != nil { return err } } @@ -448,14 +538,14 @@ func awsRestjson1_serializeOpDocumentGetMatchIdInput(v *GetMatchIdInput, value s return nil } -type awsRestjson1_serializeOpGetMatchingJob struct { +type awsRestjson1_serializeOpGetIdMappingJob struct { } -func (*awsRestjson1_serializeOpGetMatchingJob) ID() string { +func (*awsRestjson1_serializeOpGetIdMappingJob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetMatchingJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetIdMappingJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -463,13 +553,13 @@ func (m *awsRestjson1_serializeOpGetMatchingJob) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetMatchingJobInput) + input, ok := in.Parameters.(*GetIdMappingJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}/jobs/{jobId}") + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows/{workflowName}/jobs/{jobId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -485,7 +575,7 @@ func (m *awsRestjson1_serializeOpGetMatchingJob) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetMatchingJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetIdMappingJobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -496,7 +586,7 @@ func (m *awsRestjson1_serializeOpGetMatchingJob) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetMatchingJobInput(v *GetMatchingJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetIdMappingJobInput(v *GetIdMappingJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -522,14 +612,14 @@ func awsRestjson1_serializeOpHttpBindingsGetMatchingJobInput(v *GetMatchingJobIn return nil } -type awsRestjson1_serializeOpGetMatchingWorkflow struct { +type awsRestjson1_serializeOpGetIdMappingWorkflow struct { } -func (*awsRestjson1_serializeOpGetMatchingWorkflow) ID() string { +func (*awsRestjson1_serializeOpGetIdMappingWorkflow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetMatchingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetIdMappingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -537,13 +627,13 @@ func (m *awsRestjson1_serializeOpGetMatchingWorkflow) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetMatchingWorkflowInput) + input, ok := in.Parameters.(*GetIdMappingWorkflowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}") + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows/{workflowName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -559,7 +649,7 @@ func (m *awsRestjson1_serializeOpGetMatchingWorkflow) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetMatchingWorkflowInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetIdMappingWorkflowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -570,7 +660,7 @@ func (m *awsRestjson1_serializeOpGetMatchingWorkflow) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetMatchingWorkflowInput(v *GetMatchingWorkflowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetIdMappingWorkflowInput(v *GetIdMappingWorkflowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -587,14 +677,14 @@ func awsRestjson1_serializeOpHttpBindingsGetMatchingWorkflowInput(v *GetMatching return nil } -type awsRestjson1_serializeOpGetSchemaMapping struct { +type awsRestjson1_serializeOpGetMatchId struct { } -func (*awsRestjson1_serializeOpGetSchemaMapping) ID() string { +func (*awsRestjson1_serializeOpGetMatchId) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetSchemaMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetMatchId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -602,16 +692,16 @@ func (m *awsRestjson1_serializeOpGetSchemaMapping) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetSchemaMappingInput) + input, ok := in.Parameters.(*GetMatchIdInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/schemas/{schemaName}") + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}/matches") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -624,7 +714,18 @@ func (m *awsRestjson1_serializeOpGetSchemaMapping) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetSchemaMappingInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetMatchIdInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetMatchIdInput(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} } @@ -635,16 +736,16 @@ func (m *awsRestjson1_serializeOpGetSchemaMapping) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetSchemaMappingInput(v *GetSchemaMappingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetMatchIdInput(v *GetMatchIdInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.SchemaName == nil || len(*v.SchemaName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member schemaName must not be empty")} + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} } - if v.SchemaName != nil { - if err := encoder.SetURI("schemaName").String(*v.SchemaName); err != nil { + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { return err } } @@ -652,14 +753,28 @@ func awsRestjson1_serializeOpHttpBindingsGetSchemaMappingInput(v *GetSchemaMappi return nil } -type awsRestjson1_serializeOpListMatchingJobs struct { +func awsRestjson1_serializeOpDocumentGetMatchIdInput(v *GetMatchIdInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Record != nil { + ok := object.Key("record") + if err := awsRestjson1_serializeDocumentRecordAttributeMap(v.Record, ok); err != nil { + return err + } + } + + return nil } -func (*awsRestjson1_serializeOpListMatchingJobs) ID() string { +type awsRestjson1_serializeOpGetMatchingJob struct { +} + +func (*awsRestjson1_serializeOpGetMatchingJob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListMatchingJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetMatchingJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -667,13 +782,13 @@ func (m *awsRestjson1_serializeOpListMatchingJobs) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMatchingJobsInput) + input, ok := in.Parameters.(*GetMatchingJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}/jobs") + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}/jobs/{jobId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -689,7 +804,7 @@ func (m *awsRestjson1_serializeOpListMatchingJobs) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListMatchingJobsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetMatchingJobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -700,39 +815,518 @@ func (m *awsRestjson1_serializeOpListMatchingJobs) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListMatchingJobsInput(v *ListMatchingJobsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetMatchingJobInput(v *GetMatchingJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != nil { + if v.JobId == nil || len(*v.JobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")} + } + if v.JobId != nil { + if err := encoder.SetURI("jobId").String(*v.JobId); err != nil { + return err + } + } + + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + } + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetMatchingWorkflow struct { +} + +func (*awsRestjson1_serializeOpGetMatchingWorkflow) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMatchingWorkflow) 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.(*GetMatchingWorkflowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetMatchingWorkflowInput(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_serializeOpHttpBindingsGetMatchingWorkflowInput(v *GetMatchingWorkflowInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + } + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetProviderService struct { +} + +func (*awsRestjson1_serializeOpGetProviderService) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetProviderService) 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.(*GetProviderServiceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/providerservices/{providerName}/{providerServiceName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetProviderServiceInput(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_serializeOpHttpBindingsGetProviderServiceInput(v *GetProviderServiceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ProviderName == nil || len(*v.ProviderName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member providerName must not be empty")} + } + if v.ProviderName != nil { + if err := encoder.SetURI("providerName").String(*v.ProviderName); err != nil { + return err + } + } + + if v.ProviderServiceName == nil || len(*v.ProviderServiceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member providerServiceName must not be empty")} + } + if v.ProviderServiceName != nil { + if err := encoder.SetURI("providerServiceName").String(*v.ProviderServiceName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetSchemaMapping struct { +} + +func (*awsRestjson1_serializeOpGetSchemaMapping) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetSchemaMapping) 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.(*GetSchemaMappingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/schemas/{schemaName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetSchemaMappingInput(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_serializeOpHttpBindingsGetSchemaMappingInput(v *GetSchemaMappingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.SchemaName == nil || len(*v.SchemaName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member schemaName must not be empty")} + } + if v.SchemaName != nil { + if err := encoder.SetURI("schemaName").String(*v.SchemaName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListIdMappingJobs struct { +} + +func (*awsRestjson1_serializeOpListIdMappingJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListIdMappingJobs) 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.(*ListIdMappingJobsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows/{workflowName}/jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListIdMappingJobsInput(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_serializeOpHttpBindingsListIdMappingJobsInput(v *ListIdMappingJobsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + } + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListIdMappingWorkflows struct { +} + +func (*awsRestjson1_serializeOpListIdMappingWorkflows) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListIdMappingWorkflows) 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.(*ListIdMappingWorkflowsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListIdMappingWorkflowsInput(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_serializeOpHttpBindingsListIdMappingWorkflowsInput(v *ListIdMappingWorkflowsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListMatchingJobs struct { +} + +func (*awsRestjson1_serializeOpListMatchingJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListMatchingJobs) 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.(*ListMatchingJobsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}/jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListMatchingJobsInput(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_serializeOpHttpBindingsListMatchingJobsInput(v *ListMatchingJobsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + } + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListMatchingWorkflows struct { +} + +func (*awsRestjson1_serializeOpListMatchingWorkflows) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListMatchingWorkflows) 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.(*ListMatchingWorkflowsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListMatchingWorkflowsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.WorkflowName != nil { - if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { - return err - } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListMatchingWorkflowsInput(v *ListMatchingWorkflowsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpListMatchingWorkflows struct { +type awsRestjson1_serializeOpListProviderServices struct { } -func (*awsRestjson1_serializeOpListMatchingWorkflows) ID() string { +func (*awsRestjson1_serializeOpListProviderServices) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListMatchingWorkflows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListProviderServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -740,13 +1334,13 @@ func (m *awsRestjson1_serializeOpListMatchingWorkflows) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMatchingWorkflowsInput) + input, ok := in.Parameters.(*ListProviderServicesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/matchingworkflows") + opPath, opQuery := httpbinding.SplitURI("/providerservices") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -762,7 +1356,7 @@ func (m *awsRestjson1_serializeOpListMatchingWorkflows) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListMatchingWorkflowsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListProviderServicesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -773,7 +1367,7 @@ func (m *awsRestjson1_serializeOpListMatchingWorkflows) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListMatchingWorkflowsInput(v *ListMatchingWorkflowsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListProviderServicesInput(v *ListProviderServicesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -786,6 +1380,10 @@ func awsRestjson1_serializeOpHttpBindingsListMatchingWorkflowsInput(v *ListMatch encoder.SetQuery("nextToken").String(*v.NextToken) } + if v.ProviderName != nil { + encoder.SetQuery("providerName").String(*v.ProviderName) + } + return nil } @@ -918,6 +1516,71 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } +type awsRestjson1_serializeOpStartIdMappingJob struct { +} + +func (*awsRestjson1_serializeOpStartIdMappingJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartIdMappingJob) 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.(*StartIdMappingJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows/{workflowName}/jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartIdMappingJobInput(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_serializeOpHttpBindingsStartIdMappingJobInput(v *StartIdMappingJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + } + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpStartMatchingJob struct { } @@ -983,14 +1646,175 @@ func awsRestjson1_serializeOpHttpBindingsStartMatchingJobInput(v *StartMatchingJ return nil } -type awsRestjson1_serializeOpTagResource struct { +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(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_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateIdMappingWorkflow struct { } -func (*awsRestjson1_serializeOpTagResource) ID() string { +func (*awsRestjson1_serializeOpUpdateIdMappingWorkflow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateIdMappingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -998,16 +1822,16 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*TagResourceInput) + input, ok := in.Parameters.(*UpdateIdMappingWorkflowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + opPath, opQuery := httpbinding.SplitURI("/idmappingworkflows/{workflowName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1020,14 +1844,14 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateIdMappingWorkflowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateIdMappingWorkflowInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1042,16 +1866,16 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateIdMappingWorkflowInput(v *UpdateIdMappingWorkflowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { return err } } @@ -1059,28 +1883,52 @@ func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, e return nil } -func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateIdMappingWorkflowInput(v *UpdateIdMappingWorkflowInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.IdMappingTechniques != nil { + ok := object.Key("idMappingTechniques") + if err := awsRestjson1_serializeDocumentIdMappingTechniques(v.IdMappingTechniques, ok); err != nil { + return err + } + } + + if v.InputSourceConfig != nil { + ok := object.Key("inputSourceConfig") + if err := awsRestjson1_serializeDocumentIdMappingWorkflowInputSourceConfig(v.InputSourceConfig, ok); err != nil { + return err + } + } + + if v.OutputSourceConfig != nil { + ok := object.Key("outputSourceConfig") + if err := awsRestjson1_serializeDocumentIdMappingWorkflowOutputSourceConfig(v.OutputSourceConfig, ok); err != nil { return err } } + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + return nil } -type awsRestjson1_serializeOpUntagResource struct { +type awsRestjson1_serializeOpUpdateMatchingWorkflow struct { } -func (*awsRestjson1_serializeOpUntagResource) ID() string { +func (*awsRestjson1_serializeOpUpdateMatchingWorkflow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateMatchingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1088,16 +1936,16 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UntagResourceInput) + input, ok := in.Parameters.(*UpdateMatchingWorkflowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1110,7 +1958,18 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateMatchingWorkflowInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateMatchingWorkflowInput(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} } @@ -1121,37 +1980,76 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateMatchingWorkflowInput(v *UpdateMatchingWorkflowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { return err } } - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateMatchingWorkflowInput(v *UpdateMatchingWorkflowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.IncrementalRunConfig != nil { + ok := object.Key("incrementalRunConfig") + if err := awsRestjson1_serializeDocumentIncrementalRunConfig(v.IncrementalRunConfig, ok); err != nil { + return err + } + } + + if v.InputSourceConfig != nil { + ok := object.Key("inputSourceConfig") + if err := awsRestjson1_serializeDocumentInputSourceConfig(v.InputSourceConfig, ok); err != nil { + return err + } + } + + if v.OutputSourceConfig != nil { + ok := object.Key("outputSourceConfig") + if err := awsRestjson1_serializeDocumentOutputSourceConfig(v.OutputSourceConfig, ok); err != nil { + return err + } + } + + if v.ResolutionTechniques != nil { + ok := object.Key("resolutionTechniques") + if err := awsRestjson1_serializeDocumentResolutionTechniques(v.ResolutionTechniques, ok); err != nil { + return err } } + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + return nil } -type awsRestjson1_serializeOpUpdateMatchingWorkflow struct { +type awsRestjson1_serializeOpUpdateSchemaMapping struct { } -func (*awsRestjson1_serializeOpUpdateMatchingWorkflow) ID() string { +func (*awsRestjson1_serializeOpUpdateSchemaMapping) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateMatchingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateSchemaMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1159,13 +2057,13 @@ func (m *awsRestjson1_serializeOpUpdateMatchingWorkflow) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateMatchingWorkflowInput) + input, ok := in.Parameters.(*UpdateSchemaMappingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}") + opPath, opQuery := httpbinding.SplitURI("/schemas/{schemaName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" @@ -1181,14 +2079,14 @@ func (m *awsRestjson1_serializeOpUpdateMatchingWorkflow) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUpdateMatchingWorkflowInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateSchemaMappingInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateMatchingWorkflowInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateSchemaMappingInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1203,16 +2101,16 @@ func (m *awsRestjson1_serializeOpUpdateMatchingWorkflow) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateMatchingWorkflowInput(v *UpdateMatchingWorkflowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateSchemaMappingInput(v *UpdateSchemaMappingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + if v.SchemaName == nil || len(*v.SchemaName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member schemaName must not be empty")} } - if v.WorkflowName != nil { - if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + if v.SchemaName != nil { + if err := encoder.SetURI("schemaName").String(*v.SchemaName); err != nil { return err } } @@ -1220,7 +2118,7 @@ func awsRestjson1_serializeOpHttpBindingsUpdateMatchingWorkflowInput(v *UpdateMa return nil } -func awsRestjson1_serializeOpDocumentUpdateMatchingWorkflowInput(v *UpdateMatchingWorkflowInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateSchemaMappingInput(v *UpdateSchemaMappingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1229,42 +2127,95 @@ func awsRestjson1_serializeOpDocumentUpdateMatchingWorkflowInput(v *UpdateMatchi ok.String(*v.Description) } - if v.IncrementalRunConfig != nil { - ok := object.Key("incrementalRunConfig") - if err := awsRestjson1_serializeDocumentIncrementalRunConfig(v.IncrementalRunConfig, ok); err != nil { + if v.MappedInputFields != nil { + ok := object.Key("mappedInputFields") + if err := awsRestjson1_serializeDocumentSchemaInputAttributes(v.MappedInputFields, ok); err != nil { return err } } - if v.InputSourceConfig != nil { - ok := object.Key("inputSourceConfig") - if err := awsRestjson1_serializeDocumentInputSourceConfig(v.InputSourceConfig, ok); err != nil { - return err - } + return nil +} + +func awsRestjson1_serializeDocumentIdMappingTechniques(v *types.IdMappingTechniques, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.IdMappingType) > 0 { + ok := object.Key("idMappingType") + ok.String(string(v.IdMappingType)) } - if v.OutputSourceConfig != nil { - ok := object.Key("outputSourceConfig") - if err := awsRestjson1_serializeDocumentOutputSourceConfig(v.OutputSourceConfig, ok); err != nil { + if v.ProviderProperties != nil { + ok := object.Key("providerProperties") + if err := awsRestjson1_serializeDocumentProviderProperties(v.ProviderProperties, ok); err != nil { return err } } - if v.ResolutionTechniques != nil { - ok := object.Key("resolutionTechniques") - if err := awsRestjson1_serializeDocumentResolutionTechniques(v.ResolutionTechniques, ok); err != nil { + return nil +} + +func awsRestjson1_serializeDocumentIdMappingWorkflowInputSource(v *types.IdMappingWorkflowInputSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InputSourceARN != nil { + ok := object.Key("inputSourceARN") + ok.String(*v.InputSourceARN) + } + + if v.SchemaName != nil { + ok := object.Key("schemaName") + ok.String(*v.SchemaName) + } + + return nil +} + +func awsRestjson1_serializeDocumentIdMappingWorkflowInputSourceConfig(v []types.IdMappingWorkflowInputSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIdMappingWorkflowInputSource(&v[i], av); err != nil { return err } } + return nil +} + +func awsRestjson1_serializeDocumentIdMappingWorkflowOutputSource(v *types.IdMappingWorkflowOutputSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KMSArn != nil { + ok := object.Key("KMSArn") + ok.String(*v.KMSArn) + } - if v.RoleArn != nil { - ok := object.Key("roleArn") - ok.String(*v.RoleArn) + if v.OutputS3Path != nil { + ok := object.Key("outputS3Path") + ok.String(*v.OutputS3Path) } return nil } +func awsRestjson1_serializeDocumentIdMappingWorkflowOutputSourceConfig(v []types.IdMappingWorkflowOutputSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIdMappingWorkflowOutputSource(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentIncrementalRunConfig(v *types.IncrementalRunConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1312,6 +2263,18 @@ func awsRestjson1_serializeDocumentInputSourceConfig(v []types.InputSource, valu return nil } +func awsRestjson1_serializeDocumentIntermediateSourceConfiguration(v *types.IntermediateSourceConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntermediateS3Path != nil { + ok := object.Key("intermediateS3Path") + ok.String(*v.IntermediateS3Path) + } + + return nil +} + func awsRestjson1_serializeDocumentMatchingKeys(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1395,6 +2358,32 @@ func awsRestjson1_serializeDocumentOutputSourceConfig(v []types.OutputSource, va return nil } +func awsRestjson1_serializeDocumentProviderProperties(v *types.ProviderProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntermediateSourceConfiguration != nil { + ok := object.Key("intermediateSourceConfiguration") + if err := awsRestjson1_serializeDocumentIntermediateSourceConfiguration(v.IntermediateSourceConfiguration, ok); err != nil { + return err + } + } + + if v.ProviderConfiguration != nil { + ok := object.Key("providerConfiguration") + if err := awsRestjson1_serializeDocumentDocument(v.ProviderConfiguration, ok); err != nil { + return err + } + } + + if v.ProviderServiceArn != nil { + ok := object.Key("providerServiceArn") + ok.String(*v.ProviderServiceArn) + } + + return nil +} + func awsRestjson1_serializeDocumentRecordAttributeMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1410,6 +2399,13 @@ func awsRestjson1_serializeDocumentResolutionTechniques(v *types.ResolutionTechn object := value.Object() defer object.Close() + if v.ProviderProperties != nil { + ok := object.Key("providerProperties") + if err := awsRestjson1_serializeDocumentProviderProperties(v.ProviderProperties, ok); err != nil { + return err + } + } + if len(v.ResolutionType) > 0 { ok := object.Key("resolutionType") ok.String(string(v.ResolutionType)) @@ -1495,6 +2491,11 @@ func awsRestjson1_serializeDocumentSchemaInputAttribute(v *types.SchemaInputAttr ok.String(*v.MatchKey) } + if v.SubType != nil { + ok := object.Key("subType") + ok.String(*v.SubType) + } + if len(v.Type) > 0 { ok := object.Key("type") ok.String(string(v.Type)) @@ -1526,3 +2527,18 @@ func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson. } return nil } + +func awsRestjson1_serializeDocumentDocument(v document.Interface, value smithyjson.Value) error { + if v == nil { + return nil + } + if !internaldocument.IsInterface(v) { + return fmt.Errorf("%T is not a compatible document type", v) + } + db, err := v.MarshalSmithyDocument() + if err != nil { + return err + } + value.Write(db) + return nil +} diff --git a/service/entityresolution/types/enums.go b/service/entityresolution/types/enums.go index 49f96f3258d..7362c3fb0f1 100644 --- a/service/entityresolution/types/enums.go +++ b/service/entityresolution/types/enums.go @@ -20,6 +20,22 @@ func (AttributeMatchingModel) Values() []AttributeMatchingModel { } } +type IdMappingType string + +// Enum values for IdMappingType +const ( + IdMappingTypeProvider IdMappingType = "PROVIDER" +) + +// Values returns all known values for IdMappingType. 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 (IdMappingType) Values() []IdMappingType { + return []IdMappingType{ + "PROVIDER", + } +} + type IncrementalRunType string // Enum values for IncrementalRunType @@ -64,6 +80,7 @@ type ResolutionType string const ( ResolutionTypeRuleMatching ResolutionType = "RULE_MATCHING" ResolutionTypeMlMatching ResolutionType = "ML_MATCHING" + ResolutionTypeProvider ResolutionType = "PROVIDER" ) // Values returns all known values for ResolutionType. Note that this can be @@ -73,6 +90,7 @@ func (ResolutionType) Values() []ResolutionType { return []ResolutionType{ "RULE_MATCHING", "ML_MATCHING", + "PROVIDER", } } @@ -99,6 +117,7 @@ const ( SchemaAttributeTypeUniqueId SchemaAttributeType = "UNIQUE_ID" SchemaAttributeTypeDate SchemaAttributeType = "DATE" SchemaAttributeTypeString SchemaAttributeType = "STRING" + SchemaAttributeTypeProviderId SchemaAttributeType = "PROVIDER_ID" ) // Values returns all known values for SchemaAttributeType. Note that this can be @@ -125,5 +144,24 @@ func (SchemaAttributeType) Values() []SchemaAttributeType { "UNIQUE_ID", "DATE", "STRING", + "PROVIDER_ID", + } +} + +type ServiceType string + +// Enum values for ServiceType +const ( + ServiceTypeAssignment ServiceType = "ASSIGNMENT" + ServiceTypeIdMapping ServiceType = "ID_MAPPING" +) + +// Values returns all known values for ServiceType. 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 (ServiceType) Values() []ServiceType { + return []ServiceType{ + "ASSIGNMENT", + "ID_MAPPING", } } diff --git a/service/entityresolution/types/types.go b/service/entityresolution/types/types.go index f6b93b2ff72..e26114d47cc 100644 --- a/service/entityresolution/types/types.go +++ b/service/entityresolution/types/types.go @@ -3,6 +3,7 @@ package types import ( + "github.com/aws/aws-sdk-go-v2/service/entityresolution/document" smithydocument "github.com/aws/smithy-go/document" "time" ) @@ -16,6 +17,98 @@ type ErrorDetails struct { noSmithyDocumentSerde } +// An object containing InputRecords , TotalRecordsProcessed , MatchIDs , and +// RecordsNotProcessed . +type IdMappingJobMetrics struct { + + // The total number of input records. + InputRecords *int32 + + // The total number of records that did not get processed. + RecordsNotProcessed *int32 + + // The total number of records processed. + TotalRecordsProcessed *int32 + + noSmithyDocumentSerde +} + +// An object which defines the ID mapping techniques and provider configurations. +type IdMappingTechniques struct { + + // The type of ID mapping. + // + // This member is required. + IdMappingType IdMappingType + + // An object which defines any additional configurations required by the provider + // service. + // + // This member is required. + ProviderProperties *ProviderProperties + + noSmithyDocumentSerde +} + +// An object containing InputSourceARN and SchemaName . +type IdMappingWorkflowInputSource struct { + + // An Gluetable ARN for the input source table. + // + // This member is required. + InputSourceARN *string + + // The name of the schema to be retrieved. + // + // This member is required. + SchemaName *string + + noSmithyDocumentSerde +} + +// The output source for the ID mapping workflow. +type IdMappingWorkflowOutputSource struct { + + // The S3 path to which Entity Resolution will write the output table. + // + // This member is required. + OutputS3Path *string + + // Customer KMS ARN for encryption at rest. If not provided, system will use an + // Entity Resolution managed KMS key. + KMSArn *string + + noSmithyDocumentSerde +} + +// A list of IdMappingWorkflowSummary objects, each of which contain the fields +// WorkflowName , WorkflowArn , CreatedAt , and UpdatedAt . +type IdMappingWorkflowSummary struct { + + // The timestamp of when the workflow was created. + // + // This member is required. + CreatedAt *time.Time + + // The timestamp of when the workflow was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The ARN (Amazon Resource Name) that Entity Resolution generated for the + // IdMappingWorkflow . + // + // This member is required. + WorkflowArn *string + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + noSmithyDocumentSerde +} + // An object which defines an incremental run type and has only incrementalRunType // as a field. type IncrementalRunConfig struct { @@ -48,6 +141,19 @@ type InputSource struct { noSmithyDocumentSerde } +// The Amazon S3 location that temporarily stores your data while it processes. +// Your information won't be saved permanently. +type IntermediateSourceConfiguration struct { + + // The Amazon S3 location (bucket and prefix). For example: + // s3://provider_bucket/DOC-EXAMPLE-BUCKET + // + // This member is required. + IntermediateS3Path *string + + noSmithyDocumentSerde +} + // An object containing InputRecords , TotalRecordsProcessed , MatchIDs , and // RecordsNotProcessed . type JobMetrics struct { @@ -100,6 +206,12 @@ type MatchingWorkflowSummary struct { // This member is required. CreatedAt *time.Time + // The method that has been specified for data matching, either using matching + // provided by Entity Resolution or through a provider service. + // + // This member is required. + ResolutionType ResolutionType + // The timestamp of when the workflow was last updated. // // This member is required. @@ -166,6 +278,117 @@ type OutputSource struct { noSmithyDocumentSerde } +// The required configuration fields to use with the provider service. +// +// The following types satisfy this interface: +// +// ProviderEndpointConfigurationMemberMarketplaceConfiguration +type ProviderEndpointConfiguration interface { + isProviderEndpointConfiguration() +} + +// The identifiers of the provider service, from Data Exchange. +type ProviderEndpointConfigurationMemberMarketplaceConfiguration struct { + Value ProviderMarketplaceConfiguration + + noSmithyDocumentSerde +} + +func (*ProviderEndpointConfigurationMemberMarketplaceConfiguration) isProviderEndpointConfiguration() { +} + +// The required configuration fields to give intermediate access to a provider +// service. +type ProviderIntermediateDataAccessConfiguration struct { + + // The Amazon Web Services account that provider can use to read or write data + // into the customer's intermediate S3 bucket. + AwsAccountIds []string + + // The S3 bucket actions that the provider requires permission for. + RequiredBucketActions []string + + noSmithyDocumentSerde +} + +// The identifiers of the provider service, from Data Exchange. +type ProviderMarketplaceConfiguration struct { + + // The asset ID on Data Exchange. + // + // This member is required. + AssetId *string + + // The dataset ID on Data Exchange. + // + // This member is required. + DataSetId *string + + // The listing ID on Data Exchange. + // + // This member is required. + ListingId *string + + // The revision ID on Data Exchange. + // + // This member is required. + RevisionId *string + + noSmithyDocumentSerde +} + +// An object containing the providerServiceARN , intermediateSourceConfiguration , +// and providerConfiguration . +type ProviderProperties struct { + + // The ARN of the provider service. + // + // This member is required. + ProviderServiceArn *string + + // The Amazon S3 location that temporarily stores your data while it processes. + // Your information won't be saved permanently. + IntermediateSourceConfiguration *IntermediateSourceConfiguration + + // The required configuration fields to use with the provider service. + ProviderConfiguration document.Interface + + noSmithyDocumentSerde +} + +// A list of ProviderService objects, each of which contain the fields providerName +// , providerServiceArn , providerServiceName , and providerServiceType . +type ProviderServiceSummary struct { + + // The name of the provider. This name is typically the company name. + // + // This member is required. + ProviderName *string + + // The ARN (Amazon Resource Name) that Entity Resolution generated for the + // providerService . + // + // This member is required. + ProviderServiceArn *string + + // The display name of the provider service. + // + // This member is required. + ProviderServiceDisplayName *string + + // The name of the product that the provider service provides. + // + // This member is required. + ProviderServiceName *string + + // The type of provider service. + // + // This member is required. + ProviderServiceType ServiceType + + noSmithyDocumentSerde +} + // An object which defines the resolutionType and the ruleBasedProperties . type ResolutionTechniques struct { @@ -175,6 +398,9 @@ type ResolutionTechniques struct { // This member is required. ResolutionType ResolutionType + // The properties of the provider service. + ProviderProperties *ProviderProperties + // An object which defines the list of matching rules to run and has a field Rules // , which is a list of rule objects. RuleBasedProperties *RuleBasedProperties @@ -225,7 +451,7 @@ type RuleBasedProperties struct { noSmithyDocumentSerde } -// An object containing FieldField , Type , GroupName , and MatchKey . +// An object containing FieldName , Type , GroupName , and MatchKey . type SchemaInputAttribute struct { // A string containing the field name. @@ -246,13 +472,16 @@ type SchemaInputAttribute struct { // A key that allows grouping of multiple input attributes into a unified matching // group. For example, let's consider a scenario where the source table contains - // various addresses, such as business_address and shipping_address. By assigning + // various addresses, such as business_address and shipping_address . By assigning // the MatchKey Address to both attributes, Entity Resolution will match records // across these fields to create a consolidated matching group. If no MatchKey is // specified for a column, it won't be utilized for matching purposes but will // still be included in the output table. MatchKey *string + // The subtype of the attribute, selected from a list of values. + SubType *string + noSmithyDocumentSerde } @@ -264,6 +493,11 @@ type SchemaMappingSummary struct { // This member is required. CreatedAt *time.Time + // Specifies whether the schema mapping has been applied to a workflow. + // + // This member is required. + HasWorkflows *bool + // The ARN (Amazon Resource Name) that Entity Resolution generated for the // SchemaMapping . // @@ -284,3 +518,14 @@ type SchemaMappingSummary struct { } type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isProviderEndpointConfiguration() {} diff --git a/service/entityresolution/types/types_exported_test.go b/service/entityresolution/types/types_exported_test.go new file mode 100644 index 00000000000..c5b61f6d1cb --- /dev/null +++ b/service/entityresolution/types/types_exported_test.go @@ -0,0 +1,26 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" +) + +func ExampleProviderEndpointConfiguration_outputUsage() { + var union types.ProviderEndpointConfiguration + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ProviderEndpointConfigurationMemberMarketplaceConfiguration: + _ = v.Value // Value is types.ProviderMarketplaceConfiguration + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.ProviderMarketplaceConfiguration diff --git a/service/entityresolution/validators.go b/service/entityresolution/validators.go index 58701e78d75..5d9a15a8d8b 100644 --- a/service/entityresolution/validators.go +++ b/service/entityresolution/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpCreateIdMappingWorkflow struct { +} + +func (*validateOpCreateIdMappingWorkflow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateIdMappingWorkflow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateIdMappingWorkflowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateIdMappingWorkflowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateMatchingWorkflow struct { } @@ -50,6 +70,26 @@ func (m *validateOpCreateSchemaMapping) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteIdMappingWorkflow struct { +} + +func (*validateOpDeleteIdMappingWorkflow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIdMappingWorkflow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIdMappingWorkflowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIdMappingWorkflowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteMatchingWorkflow struct { } @@ -90,6 +130,46 @@ func (m *validateOpDeleteSchemaMapping) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetIdMappingJob struct { +} + +func (*validateOpGetIdMappingJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetIdMappingJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetIdMappingJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetIdMappingJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetIdMappingWorkflow struct { +} + +func (*validateOpGetIdMappingWorkflow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetIdMappingWorkflow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetIdMappingWorkflowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetIdMappingWorkflowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetMatchId struct { } @@ -150,6 +230,26 @@ func (m *validateOpGetMatchingWorkflow) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetProviderService struct { +} + +func (*validateOpGetProviderService) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetProviderService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetProviderServiceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetProviderServiceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSchemaMapping struct { } @@ -170,6 +270,26 @@ func (m *validateOpGetSchemaMapping) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpListIdMappingJobs struct { +} + +func (*validateOpListIdMappingJobs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListIdMappingJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListIdMappingJobsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListIdMappingJobsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListMatchingJobs struct { } @@ -210,6 +330,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpStartIdMappingJob struct { +} + +func (*validateOpStartIdMappingJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartIdMappingJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartIdMappingJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartIdMappingJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartMatchingJob struct { } @@ -270,6 +410,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateIdMappingWorkflow struct { +} + +func (*validateOpUpdateIdMappingWorkflow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateIdMappingWorkflow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateIdMappingWorkflowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateIdMappingWorkflowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateMatchingWorkflow struct { } @@ -290,6 +450,30 @@ func (m *validateOpUpdateMatchingWorkflow) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpUpdateSchemaMapping struct { +} + +func (*validateOpUpdateSchemaMapping) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSchemaMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSchemaMappingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSchemaMappingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateIdMappingWorkflow{}, middleware.After) +} + func addOpCreateMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMatchingWorkflow{}, middleware.After) } @@ -298,6 +482,10 @@ func addOpCreateSchemaMappingValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpCreateSchemaMapping{}, middleware.After) } +func addOpDeleteIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIdMappingWorkflow{}, middleware.After) +} + func addOpDeleteMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMatchingWorkflow{}, middleware.After) } @@ -306,6 +494,14 @@ func addOpDeleteSchemaMappingValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteSchemaMapping{}, middleware.After) } +func addOpGetIdMappingJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetIdMappingJob{}, middleware.After) +} + +func addOpGetIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetIdMappingWorkflow{}, middleware.After) +} + func addOpGetMatchIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMatchId{}, middleware.After) } @@ -318,10 +514,18 @@ func addOpGetMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetMatchingWorkflow{}, middleware.After) } +func addOpGetProviderServiceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetProviderService{}, middleware.After) +} + func addOpGetSchemaMappingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSchemaMapping{}, middleware.After) } +func addOpListIdMappingJobsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListIdMappingJobs{}, middleware.After) +} + func addOpListMatchingJobsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMatchingJobs{}, middleware.After) } @@ -330,6 +534,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpStartIdMappingJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartIdMappingJob{}, middleware.After) +} + func addOpStartMatchingJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartMatchingJob{}, middleware.After) } @@ -342,10 +550,107 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateIdMappingWorkflow{}, middleware.After) +} + func addOpUpdateMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMatchingWorkflow{}, middleware.After) } +func addOpUpdateSchemaMappingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSchemaMapping{}, middleware.After) +} + +func validateIdMappingTechniques(v *types.IdMappingTechniques) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdMappingTechniques"} + if len(v.IdMappingType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("IdMappingType")) + } + if v.ProviderProperties == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProviderProperties")) + } else if v.ProviderProperties != nil { + if err := validateProviderProperties(v.ProviderProperties); err != nil { + invalidParams.AddNested("ProviderProperties", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdMappingWorkflowInputSource(v *types.IdMappingWorkflowInputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdMappingWorkflowInputSource"} + if v.InputSourceARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("InputSourceARN")) + } + if v.SchemaName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SchemaName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdMappingWorkflowInputSourceConfig(v []types.IdMappingWorkflowInputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdMappingWorkflowInputSourceConfig"} + for i := range v { + if err := validateIdMappingWorkflowInputSource(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdMappingWorkflowOutputSource(v *types.IdMappingWorkflowOutputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdMappingWorkflowOutputSource"} + if v.OutputS3Path == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputS3Path")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdMappingWorkflowOutputSourceConfig(v []types.IdMappingWorkflowOutputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdMappingWorkflowOutputSourceConfig"} + for i := range v { + if err := validateIdMappingWorkflowOutputSource(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInputSource(v *types.InputSource) error { if v == nil { return nil @@ -381,6 +686,21 @@ func validateInputSourceConfig(v []types.InputSource) error { } } +func validateIntermediateSourceConfiguration(v *types.IntermediateSourceConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IntermediateSourceConfiguration"} + if v.IntermediateS3Path == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntermediateS3Path")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOutputAttribute(v *types.OutputAttribute) error { if v == nil { return nil @@ -452,6 +772,26 @@ func validateOutputSourceConfig(v []types.OutputSource) error { } } +func validateProviderProperties(v *types.ProviderProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProviderProperties"} + if v.ProviderServiceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProviderServiceArn")) + } + if v.IntermediateSourceConfiguration != nil { + if err := validateIntermediateSourceConfiguration(v.IntermediateSourceConfiguration); err != nil { + invalidParams.AddNested("IntermediateSourceConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateResolutionTechniques(v *types.ResolutionTechniques) error { if v == nil { return nil @@ -465,6 +805,11 @@ func validateResolutionTechniques(v *types.ResolutionTechniques) error { invalidParams.AddNested("RuleBasedProperties", err.(smithy.InvalidParamsError)) } } + if v.ProviderProperties != nil { + if err := validateProviderProperties(v.ProviderProperties); err != nil { + invalidParams.AddNested("ProviderProperties", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -564,6 +909,45 @@ func validateSchemaInputAttributes(v []types.SchemaInputAttribute) error { } } +func validateOpCreateIdMappingWorkflowInput(v *CreateIdMappingWorkflowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateIdMappingWorkflowInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if v.InputSourceConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("InputSourceConfig")) + } else if v.InputSourceConfig != nil { + if err := validateIdMappingWorkflowInputSourceConfig(v.InputSourceConfig); err != nil { + invalidParams.AddNested("InputSourceConfig", err.(smithy.InvalidParamsError)) + } + } + if v.OutputSourceConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputSourceConfig")) + } else if v.OutputSourceConfig != nil { + if err := validateIdMappingWorkflowOutputSourceConfig(v.OutputSourceConfig); err != nil { + invalidParams.AddNested("OutputSourceConfig", err.(smithy.InvalidParamsError)) + } + } + if v.IdMappingTechniques == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdMappingTechniques")) + } else if v.IdMappingTechniques != nil { + if err := validateIdMappingTechniques(v.IdMappingTechniques); err != nil { + invalidParams.AddNested("IdMappingTechniques", err.(smithy.InvalidParamsError)) + } + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateMatchingWorkflowInput(v *CreateMatchingWorkflowInput) error { if v == nil { return nil @@ -625,6 +1009,21 @@ func validateOpCreateSchemaMappingInput(v *CreateSchemaMappingInput) error { } } +func validateOpDeleteIdMappingWorkflowInput(v *DeleteIdMappingWorkflowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIdMappingWorkflowInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteMatchingWorkflowInput(v *DeleteMatchingWorkflowInput) error { if v == nil { return nil @@ -655,6 +1054,39 @@ func validateOpDeleteSchemaMappingInput(v *DeleteSchemaMappingInput) error { } } +func validateOpGetIdMappingJobInput(v *GetIdMappingJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetIdMappingJobInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetIdMappingWorkflowInput(v *GetIdMappingWorkflowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetIdMappingWorkflowInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetMatchIdInput(v *GetMatchIdInput) error { if v == nil { return nil @@ -706,6 +1138,24 @@ func validateOpGetMatchingWorkflowInput(v *GetMatchingWorkflowInput) error { } } +func validateOpGetProviderServiceInput(v *GetProviderServiceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetProviderServiceInput"} + if v.ProviderName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProviderName")) + } + if v.ProviderServiceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProviderServiceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSchemaMappingInput(v *GetSchemaMappingInput) error { if v == nil { return nil @@ -721,6 +1171,21 @@ func validateOpGetSchemaMappingInput(v *GetSchemaMappingInput) error { } } +func validateOpListIdMappingJobsInput(v *ListIdMappingJobsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListIdMappingJobsInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListMatchingJobsInput(v *ListMatchingJobsInput) error { if v == nil { return nil @@ -751,6 +1216,21 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpStartIdMappingJobInput(v *StartIdMappingJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartIdMappingJobInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartMatchingJobInput(v *StartMatchingJobInput) error { if v == nil { return nil @@ -802,6 +1282,45 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateIdMappingWorkflowInput(v *UpdateIdMappingWorkflowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateIdMappingWorkflowInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if v.InputSourceConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("InputSourceConfig")) + } else if v.InputSourceConfig != nil { + if err := validateIdMappingWorkflowInputSourceConfig(v.InputSourceConfig); err != nil { + invalidParams.AddNested("InputSourceConfig", err.(smithy.InvalidParamsError)) + } + } + if v.OutputSourceConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputSourceConfig")) + } else if v.OutputSourceConfig != nil { + if err := validateIdMappingWorkflowOutputSourceConfig(v.OutputSourceConfig); err != nil { + invalidParams.AddNested("OutputSourceConfig", err.(smithy.InvalidParamsError)) + } + } + if v.IdMappingTechniques == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdMappingTechniques")) + } else if v.IdMappingTechniques != nil { + if err := validateIdMappingTechniques(v.IdMappingTechniques); err != nil { + invalidParams.AddNested("IdMappingTechniques", err.(smithy.InvalidParamsError)) + } + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateMatchingWorkflowInput(v *UpdateMatchingWorkflowInput) error { if v == nil { return nil @@ -840,3 +1359,25 @@ func validateOpUpdateMatchingWorkflowInput(v *UpdateMatchingWorkflowInput) error return nil } } + +func validateOpUpdateSchemaMappingInput(v *UpdateSchemaMappingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSchemaMappingInput"} + if v.SchemaName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SchemaName")) + } + if v.MappedInputFields == nil { + invalidParams.Add(smithy.NewErrParamRequired("MappedInputFields")) + } else if v.MappedInputFields != nil { + if err := validateSchemaInputAttributes(v.MappedInputFields); err != nil { + invalidParams.AddNested("MappedInputFields", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/lakeformation/internal/endpoints/endpoints.go b/service/lakeformation/internal/endpoints/endpoints.go index 86fefb0a817..02d7ea5c038 100644 --- a/service/lakeformation/internal/endpoints/endpoints.go +++ b/service/lakeformation/internal/endpoints/endpoints.go @@ -474,6 +474,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "lakeformation-fips.us-gov-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lakeformation.us-gov-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, @@ -483,6 +495,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "lakeformation-fips.us-gov-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lakeformation.us-gov-west-1.api.aws", + }, }, }, } diff --git a/service/managedblockchainquery/api_op_BatchGetTokenBalance.go b/service/managedblockchainquery/api_op_BatchGetTokenBalance.go index dbeb8315056..5f0dc320008 100644 --- a/service/managedblockchainquery/api_op_BatchGetTokenBalance.go +++ b/service/managedblockchainquery/api_op_BatchGetTokenBalance.go @@ -16,7 +16,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the token balance for a batch of tokens by using the GetTokenBalance +// Gets the token balance for a batch of tokens by using the BatchGetTokenBalance // action for every token in the request. Only the native tokens BTC,ETH, and the // ERC-20, ERC-721, and ERC 1155 token standards are supported. func (c *Client) BatchGetTokenBalance(ctx context.Context, params *BatchGetTokenBalanceInput, optFns ...func(*Options)) (*BatchGetTokenBalanceOutput, error) { @@ -36,7 +36,8 @@ func (c *Client) BatchGetTokenBalance(ctx context.Context, params *BatchGetToken type BatchGetTokenBalanceInput struct { - // An array of GetTokenBalanceInput objects whose balance is being requested. + // An array of BatchGetTokenBalanceInputItem objects whose balance is being + // requested. GetTokenBalanceInputs []types.BatchGetTokenBalanceInputItem noSmithyDocumentSerde diff --git a/service/managedblockchainquery/api_op_GetAssetContract.go b/service/managedblockchainquery/api_op_GetAssetContract.go new file mode 100644 index 00000000000..cb90138b72f --- /dev/null +++ b/service/managedblockchainquery/api_op_GetAssetContract.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package managedblockchainquery + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/managedblockchainquery/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the information about a specific contract deployed on the blockchain. +// - The Bitcoin blockchain networks do not support this operation. +// - Metadata is currently only available for some ERC-20 contracts. Metadata +// will be available for additional contracts in the future. +func (c *Client) GetAssetContract(ctx context.Context, params *GetAssetContractInput, optFns ...func(*Options)) (*GetAssetContractOutput, error) { + if params == nil { + params = &GetAssetContractInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAssetContract", params, optFns, c.addOperationGetAssetContractMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAssetContractOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAssetContractInput struct { + + // Contains the blockchain address and network information about the contract. + // + // This member is required. + ContractIdentifier *types.ContractIdentifier + + noSmithyDocumentSerde +} + +type GetAssetContractOutput struct { + + // Contains the blockchain address and network information about the contract. + // + // This member is required. + ContractIdentifier *types.ContractIdentifier + + // The address of the deployer of contract. + // + // This member is required. + DeployerAddress *string + + // The token standard of the contract requested. + // + // This member is required. + TokenStandard types.QueryTokenStandard + + // The metadata of the contract. + Metadata *types.ContractMetadata + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAssetContractMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAssetContract{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAssetContract{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetAssetContractResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetAssetContractValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAssetContract(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAssetContract(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "managedblockchain-query", + OperationName: "GetAssetContract", + } +} + +type opGetAssetContractResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetAssetContractResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetAssetContractResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "managedblockchain-query" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "managedblockchain-query" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("managedblockchain-query") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetAssetContractResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetAssetContractResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/managedblockchainquery/api_op_ListAssetContracts.go b/service/managedblockchainquery/api_op_ListAssetContracts.go new file mode 100644 index 00000000000..2e29d303490 --- /dev/null +++ b/service/managedblockchainquery/api_op_ListAssetContracts.go @@ -0,0 +1,365 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package managedblockchainquery + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/managedblockchainquery/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the contracts for a given contract type deployed by an address +// (either a contract address or a wallet address). The Bitcoin blockchain networks +// do not support this operation. +func (c *Client) ListAssetContracts(ctx context.Context, params *ListAssetContractsInput, optFns ...func(*Options)) (*ListAssetContractsOutput, error) { + if params == nil { + params = &ListAssetContractsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAssetContracts", params, optFns, c.addOperationListAssetContractsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAssetContractsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAssetContractsInput struct { + + // Contains the filter parameter for the request. + // + // This member is required. + ContractFilter *types.ContractFilter + + // The maximum number of contracts to list. + MaxResults *int32 + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAssetContractsOutput struct { + + // An array of contract objects that contain the properties for each contract. + // + // This member is required. + Contracts []types.AssetContract + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAssetContractsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAssetContracts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAssetContracts{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListAssetContractsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpListAssetContractsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssetContracts(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListAssetContractsAPIClient is a client that implements the ListAssetContracts +// operation. +type ListAssetContractsAPIClient interface { + ListAssetContracts(context.Context, *ListAssetContractsInput, ...func(*Options)) (*ListAssetContractsOutput, error) +} + +var _ ListAssetContractsAPIClient = (*Client)(nil) + +// ListAssetContractsPaginatorOptions is the paginator options for +// ListAssetContracts +type ListAssetContractsPaginatorOptions struct { + // The maximum number of contracts to list. + 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 +} + +// ListAssetContractsPaginator is a paginator for ListAssetContracts +type ListAssetContractsPaginator struct { + options ListAssetContractsPaginatorOptions + client ListAssetContractsAPIClient + params *ListAssetContractsInput + nextToken *string + firstPage bool +} + +// NewListAssetContractsPaginator returns a new ListAssetContractsPaginator +func NewListAssetContractsPaginator(client ListAssetContractsAPIClient, params *ListAssetContractsInput, optFns ...func(*ListAssetContractsPaginatorOptions)) *ListAssetContractsPaginator { + if params == nil { + params = &ListAssetContractsInput{} + } + + options := ListAssetContractsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAssetContractsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAssetContractsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAssetContracts page. +func (p *ListAssetContractsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAssetContractsOutput, 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.ListAssetContracts(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_opListAssetContracts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "managedblockchain-query", + OperationName: "ListAssetContracts", + } +} + +type opListAssetContractsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListAssetContractsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListAssetContractsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "managedblockchain-query" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "managedblockchain-query" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("managedblockchain-query") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListAssetContractsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListAssetContractsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/managedblockchainquery/api_op_ListTokenBalances.go b/service/managedblockchainquery/api_op_ListTokenBalances.go index 2c02cc5583a..7c2033e9503 100644 --- a/service/managedblockchainquery/api_op_ListTokenBalances.go +++ b/service/managedblockchainquery/api_op_ListTokenBalances.go @@ -16,9 +16,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This action returns the following for a given a blockchain network: -// - Lists all token balances owned by an address (either a contact address or a -// wallet address). +// This action returns the following for a given blockchain network: +// - Lists all token balances owned by an address (either a contract address or +// a wallet address). // - Lists all token balances for all tokens created by a contract. // - Lists all token balances for a given token. // diff --git a/service/managedblockchainquery/deserializers.go b/service/managedblockchainquery/deserializers.go index 915cda343a3..bfd648784d4 100644 --- a/service/managedblockchainquery/deserializers.go +++ b/service/managedblockchainquery/deserializers.go @@ -187,6 +187,191 @@ func awsRestjson1_deserializeOpDocumentBatchGetTokenBalanceOutput(v **BatchGetTo return nil } +type awsRestjson1_deserializeOpGetAssetContract struct { +} + +func (*awsRestjson1_deserializeOpGetAssetContract) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAssetContract) HandleDeserialize(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_deserializeOpErrorGetAssetContract(response, &metadata) + } + output := &GetAssetContractOutput{} + 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_deserializeOpDocumentGetAssetContractOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAssetContract(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAssetContractOutput(v **GetAssetContractOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAssetContractOutput + if *v == nil { + sv = &GetAssetContractOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contractIdentifier": + if err := awsRestjson1_deserializeDocumentContractIdentifier(&sv.ContractIdentifier, value); err != nil { + return err + } + + case "deployerAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChainAddress to be of type string, got %T instead", value) + } + sv.DeployerAddress = ptr.String(jtv) + } + + case "metadata": + if err := awsRestjson1_deserializeDocumentContractMetadata(&sv.Metadata, value); err != nil { + return err + } + + case "tokenStandard": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryTokenStandard to be of type string, got %T instead", value) + } + sv.TokenStandard = types.QueryTokenStandard(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetTokenBalance struct { } @@ -535,6 +720,174 @@ func awsRestjson1_deserializeOpDocumentGetTransactionOutput(v **GetTransactionOu return nil } +type awsRestjson1_deserializeOpListAssetContracts struct { +} + +func (*awsRestjson1_deserializeOpListAssetContracts) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAssetContracts) HandleDeserialize(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_deserializeOpErrorListAssetContracts(response, &metadata) + } + output := &ListAssetContractsOutput{} + 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_deserializeOpDocumentListAssetContractsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAssetContracts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAssetContractsOutput(v **ListAssetContractsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAssetContractsOutput + if *v == nil { + sv = &ListAssetContractsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contracts": + if err := awsRestjson1_deserializeDocumentAssetContractList(&sv.Contracts, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListTokenBalances struct { } @@ -1335,6 +1688,94 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } +func awsRestjson1_deserializeDocumentAssetContract(v **types.AssetContract, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AssetContract + if *v == nil { + sv = &types.AssetContract{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contractIdentifier": + if err := awsRestjson1_deserializeDocumentContractIdentifier(&sv.ContractIdentifier, value); err != nil { + return err + } + + case "deployerAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChainAddress to be of type string, got %T instead", value) + } + sv.DeployerAddress = ptr.String(jtv) + } + + case "tokenStandard": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryTokenStandard to be of type string, got %T instead", value) + } + sv.TokenStandard = types.QueryTokenStandard(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAssetContractList(v *[]types.AssetContract, 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.AssetContract + if *v == nil { + cv = []types.AssetContract{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssetContract + destAddr := &col + if err := awsRestjson1_deserializeDocumentAssetContract(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentBatchGetTokenBalanceErrorItem(v **types.BatchGetTokenBalanceErrorItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -1583,6 +2024,117 @@ func awsRestjson1_deserializeDocumentBlockchainInstant(v **types.BlockchainInsta return nil } +func awsRestjson1_deserializeDocumentContractIdentifier(v **types.ContractIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ContractIdentifier + if *v == nil { + sv = &types.ContractIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contractAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChainAddress to be of type string, got %T instead", value) + } + sv.ContractAddress = ptr.String(jtv) + } + + case "network": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryNetwork to be of type string, got %T instead", value) + } + sv.Network = types.QueryNetwork(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentContractMetadata(v **types.ContractMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ContractMetadata + if *v == nil { + sv = &types.ContractMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "decimals": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Decimals = ptr.Int32(int32(i64)) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "symbol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Symbol = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/managedblockchainquery/generated.json b/service/managedblockchainquery/generated.json index c5d3cfe56c0..1f2b9595221 100644 --- a/service/managedblockchainquery/generated.json +++ b/service/managedblockchainquery/generated.json @@ -10,8 +10,10 @@ "api_client.go", "api_client_test.go", "api_op_BatchGetTokenBalance.go", + "api_op_GetAssetContract.go", "api_op_GetTokenBalance.go", "api_op_GetTransaction.go", + "api_op_ListAssetContracts.go", "api_op_ListTokenBalances.go", "api_op_ListTransactionEvents.go", "api_op_ListTransactions.go", diff --git a/service/managedblockchainquery/serializers.go b/service/managedblockchainquery/serializers.go index 9adf1eace3d..83bb32f527c 100644 --- a/service/managedblockchainquery/serializers.go +++ b/service/managedblockchainquery/serializers.go @@ -92,6 +92,83 @@ func awsRestjson1_serializeOpDocumentBatchGetTokenBalanceInput(v *BatchGetTokenB return nil } +type awsRestjson1_serializeOpGetAssetContract struct { +} + +func (*awsRestjson1_serializeOpGetAssetContract) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAssetContract) 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.(*GetAssetContractInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/get-asset-contract") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetAssetContractInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAssetContractInput(v *GetAssetContractInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetAssetContractInput(v *GetAssetContractInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContractIdentifier != nil { + ok := object.Key("contractIdentifier") + if err := awsRestjson1_serializeDocumentContractIdentifier(v.ContractIdentifier, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetTokenBalance struct { } @@ -263,6 +340,93 @@ func awsRestjson1_serializeOpDocumentGetTransactionInput(v *GetTransactionInput, return nil } +type awsRestjson1_serializeOpListAssetContracts struct { +} + +func (*awsRestjson1_serializeOpListAssetContracts) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAssetContracts) 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.(*ListAssetContractsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-asset-contracts") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListAssetContractsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAssetContractsInput(v *ListAssetContractsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListAssetContractsInput(v *ListAssetContractsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContractFilter != nil { + ok := object.Key("contractFilter") + if err := awsRestjson1_serializeDocumentContractFilter(v.ContractFilter, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListTokenBalances struct { } @@ -598,6 +762,45 @@ func awsRestjson1_serializeDocumentBlockchainInstant(v *types.BlockchainInstant, return nil } +func awsRestjson1_serializeDocumentContractFilter(v *types.ContractFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeployerAddress != nil { + ok := object.Key("deployerAddress") + ok.String(*v.DeployerAddress) + } + + if len(v.Network) > 0 { + ok := object.Key("network") + ok.String(string(v.Network)) + } + + if len(v.TokenStandard) > 0 { + ok := object.Key("tokenStandard") + ok.String(string(v.TokenStandard)) + } + + return nil +} + +func awsRestjson1_serializeDocumentContractIdentifier(v *types.ContractIdentifier, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContractAddress != nil { + ok := object.Key("contractAddress") + ok.String(*v.ContractAddress) + } + + if len(v.Network) > 0 { + ok := object.Key("network") + ok.String(string(v.Network)) + } + + return nil +} + func awsRestjson1_serializeDocumentGetTokenBalanceInputList(v []types.BatchGetTokenBalanceInputItem, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/managedblockchainquery/types/enums.go b/service/managedblockchainquery/types/enums.go index a9b58f0adcc..c66d757831f 100644 --- a/service/managedblockchainquery/types/enums.go +++ b/service/managedblockchainquery/types/enums.go @@ -47,6 +47,8 @@ const ( QueryNetworkEthereumMainnet QueryNetwork = "ETHEREUM_MAINNET" // Bitcoin main network QueryNetworkBitcoinMainnet QueryNetwork = "BITCOIN_MAINNET" + // Bitcoin test network + QueryNetworkBitcoinTestnet QueryNetwork = "BITCOIN_TESTNET" ) // Values returns all known values for QueryNetwork. Note that this can be @@ -56,6 +58,27 @@ func (QueryNetwork) Values() []QueryNetwork { return []QueryNetwork{ "ETHEREUM_MAINNET", "BITCOIN_MAINNET", + "BITCOIN_TESTNET", + } +} + +type QueryTokenStandard string + +// Enum values for QueryTokenStandard +const ( + QueryTokenStandardErc20 QueryTokenStandard = "ERC20" + QueryTokenStandardErc721 QueryTokenStandard = "ERC721" + QueryTokenStandardErc1155 QueryTokenStandard = "ERC1155" +) + +// Values returns all known values for QueryTokenStandard. 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 (QueryTokenStandard) Values() []QueryTokenStandard { + return []QueryTokenStandard{ + "ERC20", + "ERC721", + "ERC1155", } } diff --git a/service/managedblockchainquery/types/types.go b/service/managedblockchainquery/types/types.go index 83a71b381d9..1dccf0d8d02 100644 --- a/service/managedblockchainquery/types/types.go +++ b/service/managedblockchainquery/types/types.go @@ -7,6 +7,28 @@ import ( "time" ) +// This container contains information about an contract. +type AssetContract struct { + + // The container for the contract identifier containing its blockchain network and + // address. + // + // This member is required. + ContractIdentifier *ContractIdentifier + + // The address of the contract deployer. + // + // This member is required. + DeployerAddress *string + + // The token standard of the contract. + // + // This member is required. + TokenStandard QueryTokenStandard + + noSmithyDocumentSerde +} + // Error generated from a failed BatchGetTokenBalance request. type BatchGetTokenBalanceErrorItem struct { @@ -97,6 +119,58 @@ type BlockchainInstant struct { noSmithyDocumentSerde } +// The contract or wallet address by which to filter the request. +type ContractFilter struct { + + // The network address of the deployer. + // + // This member is required. + DeployerAddress *string + + // The blockchain network of the contract. + // + // This member is required. + Network QueryNetwork + + // The container for the token standard. + // + // This member is required. + TokenStandard QueryTokenStandard + + noSmithyDocumentSerde +} + +// Container for the blockchain address and network information about a contract. +type ContractIdentifier struct { + + // Container for the blockchain address about a contract. + // + // This member is required. + ContractAddress *string + + // The blockchain network of the contract. + // + // This member is required. + Network QueryNetwork + + noSmithyDocumentSerde +} + +// The metadata of the contract. +type ContractMetadata struct { + + // The decimals used by the token contract. + Decimals *int32 + + // The name of the token contract. + Name *string + + // The symbol of the token contract. + Symbol *string + + noSmithyDocumentSerde +} + // The container for determining how the list transaction result will be sorted. type ListTransactionsSort struct { @@ -148,7 +222,7 @@ type TokenBalance struct { // This member is required. Balance *string - // The timestamp of the last transaction at which the balance for the token in the + // The Timestamp of the last transaction at which the balance for the token in the // wallet was updated. LastUpdatedTime *BlockchainInstant @@ -195,7 +269,10 @@ type TokenIdentifier struct { // This is the token's contract address. ContractAddress *string - // The unique identifier of the token. + // The unique identifier of the token. You must specify this container with btc + // for the native BTC token, and eth for the native ETH token. For all other token + // types you must specify the tokenId in the 64 character hexadecimal tokenid + // format. TokenId *string noSmithyDocumentSerde @@ -209,7 +286,7 @@ type TokenIdentifier struct { // must be credited. This state-changing action occurs within a transaction. type Transaction struct { - // The blockchain network where the transaction occured. + // The blockchain network where the transaction occurred. // // This member is required. Network QueryNetwork diff --git a/service/managedblockchainquery/validators.go b/service/managedblockchainquery/validators.go index 046036bbc0b..3088a3e65a0 100644 --- a/service/managedblockchainquery/validators.go +++ b/service/managedblockchainquery/validators.go @@ -30,6 +30,26 @@ func (m *validateOpBatchGetTokenBalance) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpGetAssetContract struct { +} + +func (*validateOpGetAssetContract) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAssetContract) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAssetContractInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAssetContractInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetTokenBalance struct { } @@ -70,6 +90,26 @@ func (m *validateOpGetTransaction) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpListAssetContracts struct { +} + +func (*validateOpListAssetContracts) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAssetContracts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAssetContractsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAssetContractsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTokenBalances struct { } @@ -134,6 +174,10 @@ func addOpBatchGetTokenBalanceValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpBatchGetTokenBalance{}, middleware.After) } +func addOpGetAssetContractValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAssetContract{}, middleware.After) +} + func addOpGetTokenBalanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTokenBalance{}, middleware.After) } @@ -142,6 +186,10 @@ func addOpGetTransactionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTransaction{}, middleware.After) } +func addOpListAssetContractsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAssetContracts{}, middleware.After) +} + func addOpListTokenBalancesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTokenBalances{}, middleware.After) } @@ -180,6 +228,45 @@ func validateBatchGetTokenBalanceInputItem(v *types.BatchGetTokenBalanceInputIte } } +func validateContractFilter(v *types.ContractFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContractFilter"} + if len(v.Network) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Network")) + } + if len(v.TokenStandard) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TokenStandard")) + } + if v.DeployerAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeployerAddress")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContractIdentifier(v *types.ContractIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContractIdentifier"} + if len(v.Network) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Network")) + } + if v.ContractAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContractAddress")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateGetTokenBalanceInputList(v []types.BatchGetTokenBalanceInputItem) error { if v == nil { return nil @@ -274,6 +361,25 @@ func validateOpBatchGetTokenBalanceInput(v *BatchGetTokenBalanceInput) error { } } +func validateOpGetAssetContractInput(v *GetAssetContractInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAssetContractInput"} + if v.ContractIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContractIdentifier")) + } else if v.ContractIdentifier != nil { + if err := validateContractIdentifier(v.ContractIdentifier); err != nil { + invalidParams.AddNested("ContractIdentifier", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetTokenBalanceInput(v *GetTokenBalanceInput) error { if v == nil { return nil @@ -318,6 +424,25 @@ func validateOpGetTransactionInput(v *GetTransactionInput) error { } } +func validateOpListAssetContractsInput(v *ListAssetContractsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAssetContractsInput"} + if v.ContractFilter == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContractFilter")) + } else if v.ContractFilter != nil { + if err := validateContractFilter(v.ContractFilter); err != nil { + invalidParams.AddNested("ContractFilter", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTokenBalancesInput(v *ListTokenBalancesInput) error { if v == nil { return nil diff --git a/service/mediapackagev2/deserializers.go b/service/mediapackagev2/deserializers.go index 1158f61590b..522d9ff3c9f 100644 --- a/service/mediapackagev2/deserializers.go +++ b/service/mediapackagev2/deserializers.go @@ -218,7 +218,7 @@ func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutp 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -447,7 +447,7 @@ func awsRestjson1_deserializeOpDocumentCreateChannelGroupOutput(v **CreateChanne 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -1434,7 +1434,7 @@ func awsRestjson1_deserializeOpDocumentGetChannelOutput(v **GetChannelOutput, va 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -1657,7 +1657,7 @@ func awsRestjson1_deserializeOpDocumentGetChannelGroupOutput(v **GetChannelGroup 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -1868,7 +1868,7 @@ func awsRestjson1_deserializeOpDocumentGetChannelPolicyOutput(v **GetChannelPoli 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 PolicyText to be of type string, got %T instead", value) } sv.Policy = ptr.String(jtv) } @@ -2304,7 +2304,7 @@ func awsRestjson1_deserializeOpDocumentGetOriginEndpointPolicyOutput(v **GetOrig 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 ResourceName to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } @@ -2313,7 +2313,7 @@ func awsRestjson1_deserializeOpDocumentGetOriginEndpointPolicyOutput(v **GetOrig 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 ResourceName to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } @@ -2322,7 +2322,7 @@ func awsRestjson1_deserializeOpDocumentGetOriginEndpointPolicyOutput(v **GetOrig 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 ResourceName to be of type string, got %T instead", value) } sv.OriginEndpointName = ptr.String(jtv) } @@ -2331,7 +2331,7 @@ func awsRestjson1_deserializeOpDocumentGetOriginEndpointPolicyOutput(v **GetOrig 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 PolicyText to be of type string, got %T instead", value) } sv.Policy = ptr.String(jtv) } @@ -3559,7 +3559,7 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutp 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -3785,7 +3785,7 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelGroupOutput(v **UpdateChanne 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -4460,7 +4460,7 @@ func awsRestjson1_deserializeDocumentChannelGroupListConfiguration(v **types.Cha 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -4627,7 +4627,7 @@ func awsRestjson1_deserializeDocumentChannelListConfiguration(v **types.ChannelL 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 ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } diff --git a/service/mediapackagev2/endpoints.go b/service/mediapackagev2/endpoints.go index 58b6a0734e2..ff2abe38c83 100644 --- a/service/mediapackagev2/endpoints.go +++ b/service/mediapackagev2/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://mediapackagev2-fips.") diff --git a/service/opensearch/api_op_DescribeDomains.go b/service/opensearch/api_op_DescribeDomains.go index 4e8d7b1082e..5f39c64223d 100644 --- a/service/opensearch/api_op_DescribeDomains.go +++ b/service/opensearch/api_op_DescribeDomains.go @@ -36,9 +36,8 @@ func (c *Client) DescribeDomains(ctx context.Context, params *DescribeDomainsInp // Container for the parameters to the DescribeDomains operation. type DescribeDomainsInput struct { - // Array of OpenSearch Service domain names that you want information about. If - // you don't specify any domains, OpenSearch Service returns information about all - // domains owned by the account. + // Array of OpenSearch Service domain names that you want information about. You + // must specify at least one domain name. // // This member is required. DomainNames []string diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index 6f5730b8412..badba45b24c 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -17,7 +17,7 @@ import ( ) // Modifies the cluster configuration of the specified Amazon OpenSearch Service -// domain.sl +// domain. func (c *Client) UpdateDomainConfig(ctx context.Context, params *UpdateDomainConfigInput, optFns ...func(*Options)) (*UpdateDomainConfigOutput, error) { if params == nil { params = &UpdateDomainConfigInput{} diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index 45023bb8967..8530a448d3f 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -14017,6 +14017,11 @@ func awsRestjson1_deserializeDocumentPackageDetails(v **types.PackageDetails, va sv.AvailablePackageVersion = ptr.String(jtv) } + case "AvailablePluginProperties": + if err := awsRestjson1_deserializeDocumentPluginProperties(&sv.AvailablePluginProperties, value); err != nil { + return err + } + case "CreatedAt": if value != nil { switch jtv := value.(type) { @@ -14033,6 +14038,15 @@ func awsRestjson1_deserializeDocumentPackageDetails(v **types.PackageDetails, va } } + case "EngineVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngineVersion to be of type string, got %T instead", value) + } + sv.EngineVersion = ptr.String(jtv) + } + case "ErrorDetails": if err := awsRestjson1_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { return err @@ -14198,6 +14212,11 @@ func awsRestjson1_deserializeDocumentPackageVersionHistory(v **types.PackageVers sv.PackageVersion = ptr.String(jtv) } + case "PluginProperties": + if err := awsRestjson1_deserializeDocumentPluginProperties(&sv.PluginProperties, value); err != nil { + return err + } + default: _, _ = key, value @@ -14241,6 +14260,86 @@ func awsRestjson1_deserializeDocumentPackageVersionHistoryList(v *[]types.Packag return nil } +func awsRestjson1_deserializeDocumentPluginProperties(v **types.PluginProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.PluginProperties + if *v == nil { + sv = &types.PluginProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClassName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginClassName to be of type string, got %T instead", value) + } + sv.ClassName = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "UncompressedSizeInBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected UncompressedPluginSizeInBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UncompressedSizeInBytes = ptr.Int64(i64) + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRecurringCharge(v **types.RecurringCharge, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 84a3ba39cff..e26928a7d57 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -183,6 +183,8 @@ const ( DescribePackagesFilterNamePackageID DescribePackagesFilterName = "PackageID" DescribePackagesFilterNamePackageName DescribePackagesFilterName = "PackageName" DescribePackagesFilterNamePackageStatus DescribePackagesFilterName = "PackageStatus" + DescribePackagesFilterNamePackageType DescribePackagesFilterName = "PackageType" + DescribePackagesFilterNameEngineVersion DescribePackagesFilterName = "EngineVersion" ) // Values returns all known values for DescribePackagesFilterName. Note that this @@ -193,6 +195,8 @@ func (DescribePackagesFilterName) Values() []DescribePackagesFilterName { "PackageID", "PackageName", "PackageStatus", + "PackageType", + "EngineVersion", } } @@ -746,6 +750,7 @@ type PackageType string // Enum values for PackageType const ( PackageTypeTxtDictionary PackageType = "TXT-DICTIONARY" + PackageTypeZipPlugin PackageType = "ZIP-PLUGIN" ) // Values returns all known values for PackageType. Note that this can be expanded @@ -754,6 +759,7 @@ const ( func (PackageType) Values() []PackageType { return []PackageType{ "TXT-DICTIONARY", + "ZIP-PLUGIN", } } diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index e93f30b27bb..e7346c866e9 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -575,10 +575,13 @@ type ConnectionProperties struct { noSmithyDocumentSerde } -// Cross cluster search specific connection properties. +// Cross-cluster search specific connection properties. type CrossClusterSearchConnectionProperties struct { - // Status of SkipUnavailable param for outbound connection. + // The status of the SkipUnavailable setting for the outbound connection. This + // feature allows you to specify some clusters as optional and ensure that your + // cross-cluster queries return partial results despite failures on one or more + // remote clusters. SkipUnavailable SkipUnavailableStatus noSmithyDocumentSerde @@ -1397,9 +1400,17 @@ type PackageDetails struct { // The package version. AvailablePackageVersion *string + // If the package is a ZIP-PLUGIN package, additional information about plugin + // properties. + AvailablePluginProperties *PluginProperties + // The timestamp when the package was created. CreatedAt *time.Time + // Version of OpenSearch or Elasticsearch, in the format Elasticsearch_X.Y or + // OpenSearch_X.Y. Defaults to the latest version of OpenSearch. + EngineVersion *string + // Additional information if the package is in an error state. Null otherwise. ErrorDetails *ErrorDetails @@ -1449,6 +1460,31 @@ type PackageVersionHistory struct { // The package version. PackageVersion *string + // Additional information about plugin properties if the package is a ZIP-PLUGIN + // package. + PluginProperties *PluginProperties + + noSmithyDocumentSerde +} + +// Basic information about the plugin. +type PluginProperties struct { + + // The name of the class to load. + ClassName *string + + // The description of the plugin. + Description *string + + // The name of the plugin. + Name *string + + // The uncompressed size of the plugin. + UncompressedSizeInBytes *int64 + + // The version of the plugin. + Version *string + noSmithyDocumentSerde } diff --git a/service/redshift/api_op_CreateCluster.go b/service/redshift/api_op_CreateCluster.go index f6a9a797a71..c1937ae7010 100644 --- a/service/redshift/api_op_CreateCluster.go +++ b/service/redshift/api_op_CreateCluster.go @@ -52,18 +52,6 @@ type CreateClusterInput struct { // This member is required. ClusterIdentifier *string - // The password associated with the admin user account for the cluster that is - // being created. Constraints: - // - Must be between 8 and 64 characters in length. - // - Must contain at least one uppercase letter. - // - Must contain at least one lowercase letter. - // - Must contain one number. - // - Can be any printable ASCII character (ASCII code 33-126) except ' (single - // quote), " (double quote), \ , / , or @ . - // - // This member is required. - MasterUserPassword *string - // The user name associated with the admin user account for the cluster that is // being created. Constraints: // - Must be 1 - 128 alphanumeric characters or hyphens. The user name can't be @@ -215,12 +203,34 @@ type CreateClusterInput struct { // current track. MaintenanceTrackName *string + // If true , Amazon Redshift uses Secrets Manager to manage this cluster's admin + // credentials. You can't use MasterUserPassword if ManageMasterPassword is true. + // If ManageMasterPassword is false or not set, Amazon Redshift uses + // MasterUserPassword for the admin user account's password. + ManageMasterPassword *bool + // The default number of days to retain a manual snapshot. If the value is -1, the // snapshot is retained indefinitely. This setting doesn't change the retention // period of existing snapshots. The value must be either -1 or an integer between // 1 and 3,653. ManualSnapshotRetentionPeriod *int32 + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // cluster's admin credentials secret. You can only use this parameter if + // ManageMasterPassword is true. + MasterPasswordSecretKmsKeyId *string + + // The password associated with the admin user account for the cluster that is + // being created. You can't use MasterUserPassword if ManageMasterPassword is true + // . Constraints: + // - Must be between 8 and 64 characters in length. + // - Must contain at least one uppercase letter. + // - Must contain at least one lowercase letter. + // - Must contain one number. + // - Can be any printable ASCII character (ASCII code 33-126) except ' (single + // quote), " (double quote), \ , / , or @ . + MasterUserPassword *string + // The number of compute nodes in the cluster. This parameter is required when the // ClusterType parameter is specified as multi-node . For information about // determining how many nodes you need, go to Working with Clusters (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes) diff --git a/service/redshift/api_op_DescribeCustomDomainAssociations.go b/service/redshift/api_op_DescribeCustomDomainAssociations.go index bd4bdeb33dd..b3f8c3e50e2 100644 --- a/service/redshift/api_op_DescribeCustomDomainAssociations.go +++ b/service/redshift/api_op_DescribeCustomDomainAssociations.go @@ -16,7 +16,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Contains information for custom domain associations for a cluster. +// Contains information about custom domain associations for a cluster. func (c *Client) DescribeCustomDomainAssociations(ctx context.Context, params *DescribeCustomDomainAssociationsInput, optFns ...func(*Options)) (*DescribeCustomDomainAssociationsOutput, error) { if params == nil { params = &DescribeCustomDomainAssociationsInput{} diff --git a/service/redshift/api_op_ModifyCluster.go b/service/redshift/api_op_ModifyCluster.go index 8c0fd091b55..3374806772f 100644 --- a/service/redshift/api_op_ModifyCluster.go +++ b/service/redshift/api_op_ModifyCluster.go @@ -143,6 +143,12 @@ type ModifyClusterInput struct { // track name is applied. MaintenanceTrackName *string + // If true , Amazon Redshift uses Secrets Manager to manage this cluster's admin + // credentials. You can't use MasterUserPassword if ManageMasterPassword is true. + // If ManageMasterPassword is false or not set, Amazon Redshift uses + // MasterUserPassword for the admin user account's password. + ManageMasterPassword *bool + // The default for number of days that a newly created manual snapshot is // retained. If the value is -1, the manual snapshot is retained indefinitely. This // value doesn't retroactively change the retention periods of existing manual @@ -150,13 +156,19 @@ type ModifyClusterInput struct { // default value is -1. ManualSnapshotRetentionPeriod *int32 + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // cluster's admin credentials secret. You can only use this parameter if + // ManageMasterPassword is true. + MasterPasswordSecretKmsKeyId *string + // The new password for the cluster admin user. This change is asynchronously // applied as soon as possible. Between the time of the request and the completion // of the request, the MasterUserPassword element exists in the - // PendingModifiedValues element of the operation response. Operations never return - // the password, so this operation provides a way to regain access to the admin - // user account for a cluster if the password is lost. Default: Uses existing - // setting. Constraints: + // PendingModifiedValues element of the operation response. You can't use + // MasterUserPassword if ManageMasterPassword is true . Operations never return the + // password, so this operation provides a way to regain access to the admin user + // account for a cluster if the password is lost. Default: Uses existing setting. + // Constraints: // - Must be between 8 and 64 characters in length. // - Must contain at least one uppercase letter. // - Must contain at least one lowercase letter. diff --git a/service/redshift/api_op_RestoreFromClusterSnapshot.go b/service/redshift/api_op_RestoreFromClusterSnapshot.go index 2d4068b779c..1dc9f5995e4 100644 --- a/service/redshift/api_op_RestoreFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreFromClusterSnapshot.go @@ -156,12 +156,22 @@ type RestoreFromClusterSnapshotInput struct { // tracks. MaintenanceTrackName *string + // If true , Amazon Redshift uses Secrets Manager to manage the restored cluster's + // admin credentials. If ManageMasterPassword is false or not set, Amazon Redshift + // uses the admin credentials the cluster had at the time the snapshot was taken. + ManageMasterPassword *bool + // The default number of days to retain a manual snapshot. If the value is -1, the // snapshot is retained indefinitely. This setting doesn't change the retention // period of existing snapshots. The value must be either -1 or an integer between // 1 and 3,653. ManualSnapshotRetentionPeriod *int32 + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // cluster's admin credentials secret. You can only use this parameter if + // ManageMasterPassword is true. + MasterPasswordSecretKmsKeyId *string + // The node type that the restored cluster will be provisioned with. Default: The // node type of the cluster from which the snapshot was taken. You can modify this // if you are using any DS node type. In that case, you can choose to restore into diff --git a/service/redshift/deserializers.go b/service/redshift/deserializers.go index c37e7894e42..c1e047a9b49 100644 --- a/service/redshift/deserializers.go +++ b/service/redshift/deserializers.go @@ -21647,6 +21647,32 @@ func awsAwsquery_deserializeDocumentCluster(v **types.Cluster, decoder smithyxml sv.ManualSnapshotRetentionPeriod = int32(i64) } + case strings.EqualFold("MasterPasswordSecretArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MasterPasswordSecretArn = ptr.String(xtv) + } + + case strings.EqualFold("MasterPasswordSecretKmsKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MasterPasswordSecretKmsKeyId = ptr.String(xtv) + } + case strings.EqualFold("MasterUsername", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -34620,6 +34646,32 @@ func awsAwsquery_deserializeDocumentSnapshot(v **types.Snapshot, decoder smithyx sv.ManualSnapshotRetentionPeriod = ptr.Int32(int32(i64)) } + case strings.EqualFold("MasterPasswordSecretArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MasterPasswordSecretArn = ptr.String(xtv) + } + + case strings.EqualFold("MasterPasswordSecretKmsKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MasterPasswordSecretKmsKeyId = ptr.String(xtv) + } + case strings.EqualFold("MasterUsername", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/redshift/serializers.go b/service/redshift/serializers.go index 27a0ffcb259..c72aff27b04 100644 --- a/service/redshift/serializers.go +++ b/service/redshift/serializers.go @@ -8728,11 +8728,21 @@ func awsAwsquery_serializeOpDocumentCreateClusterInput(v *CreateClusterInput, va objectKey.String(*v.MaintenanceTrackName) } + if v.ManageMasterPassword != nil { + objectKey := object.Key("ManageMasterPassword") + objectKey.Boolean(*v.ManageMasterPassword) + } + if v.ManualSnapshotRetentionPeriod != nil { objectKey := object.Key("ManualSnapshotRetentionPeriod") objectKey.Integer(*v.ManualSnapshotRetentionPeriod) } + if v.MasterPasswordSecretKmsKeyId != nil { + objectKey := object.Key("MasterPasswordSecretKmsKeyId") + objectKey.String(*v.MasterPasswordSecretKmsKeyId) + } + if v.MasterUsername != nil { objectKey := object.Key("MasterUsername") objectKey.String(*v.MasterUsername) @@ -11065,11 +11075,21 @@ func awsAwsquery_serializeOpDocumentModifyClusterInput(v *ModifyClusterInput, va objectKey.String(*v.MaintenanceTrackName) } + if v.ManageMasterPassword != nil { + objectKey := object.Key("ManageMasterPassword") + objectKey.Boolean(*v.ManageMasterPassword) + } + if v.ManualSnapshotRetentionPeriod != nil { objectKey := object.Key("ManualSnapshotRetentionPeriod") objectKey.Integer(*v.ManualSnapshotRetentionPeriod) } + if v.MasterPasswordSecretKmsKeyId != nil { + objectKey := object.Key("MasterPasswordSecretKmsKeyId") + objectKey.String(*v.MasterPasswordSecretKmsKeyId) + } + if v.MasterUserPassword != nil { objectKey := object.Key("MasterUserPassword") objectKey.String(*v.MasterUserPassword) @@ -11660,11 +11680,21 @@ func awsAwsquery_serializeOpDocumentRestoreFromClusterSnapshotInput(v *RestoreFr objectKey.String(*v.MaintenanceTrackName) } + if v.ManageMasterPassword != nil { + objectKey := object.Key("ManageMasterPassword") + objectKey.Boolean(*v.ManageMasterPassword) + } + if v.ManualSnapshotRetentionPeriod != nil { objectKey := object.Key("ManualSnapshotRetentionPeriod") objectKey.Integer(*v.ManualSnapshotRetentionPeriod) } + if v.MasterPasswordSecretKmsKeyId != nil { + objectKey := object.Key("MasterPasswordSecretKmsKeyId") + objectKey.String(*v.MasterPasswordSecretKmsKeyId) + } + if v.NodeType != nil { objectKey := object.Key("NodeType") objectKey.String(*v.NodeType) diff --git a/service/redshift/types/types.go b/service/redshift/types/types.go index 5f45b64aafd..e86f6827b34 100644 --- a/service/redshift/types/types.go +++ b/service/redshift/types/types.go @@ -284,6 +284,13 @@ type Cluster struct { // 1 and 3,653. ManualSnapshotRetentionPeriod int32 + // The Amazon Resource Name (ARN) for the cluster's admin user credentials secret. + MasterPasswordSecretArn *string + + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // cluster's admin credentials secret. + MasterPasswordSecretKmsKeyId *string + // The admin user name for the cluster. This name is used to connect to the // database that is specified in the DBName parameter. MasterUsername *string @@ -1655,6 +1662,13 @@ type Snapshot struct { // integer between 1 and 3,653. ManualSnapshotRetentionPeriod *int32 + // The Amazon Resource Name (ARN) for the cluster's admin user credentials secret. + MasterPasswordSecretArn *string + + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // cluster's admin credentials secret. + MasterPasswordSecretKmsKeyId *string + // The admin user name for the cluster. MasterUsername *string diff --git a/service/redshift/validators.go b/service/redshift/validators.go index ea71474a48c..3d431e0c3c2 100644 --- a/service/redshift/validators.go +++ b/service/redshift/validators.go @@ -2560,9 +2560,6 @@ func validateOpCreateClusterInput(v *CreateClusterInput) error { if v.MasterUsername == nil { invalidParams.Add(smithy.NewErrParamRequired("MasterUsername")) } - if v.MasterUserPassword == nil { - invalidParams.Add(smithy.NewErrParamRequired("MasterUserPassword")) - } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/redshiftserverless/api_op_CreateNamespace.go b/service/redshiftserverless/api_op_CreateNamespace.go index 056079e07f4..be644fee6c9 100644 --- a/service/redshiftserverless/api_op_CreateNamespace.go +++ b/service/redshiftserverless/api_op_CreateNamespace.go @@ -39,8 +39,13 @@ type CreateNamespaceInput struct { // This member is required. NamespaceName *string + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // namespace's admin credentials secret. You can only use this parameter if + // manageAdminPassword is true. + AdminPasswordSecretKmsKeyId *string + // The password of the administrator for the first database created in the - // namespace. + // namespace. You can't use adminUserPassword if manageAdminPassword is true. AdminUserPassword *string // The username of the administrator for the first database created in the @@ -65,6 +70,12 @@ type CreateNamespaceInput struct { // connectionlog , and useractivitylog . LogExports []types.LogExport + // If true , Amazon Redshift uses Secrets Manager to manage the namespace's admin + // credentials. You can't use adminUserPassword if manageAdminPassword is true. If + // manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword + // for the admin user account's password. + ManageAdminPassword *bool + // A list of tag instances. Tags []types.Tag diff --git a/service/redshiftserverless/api_op_RestoreFromSnapshot.go b/service/redshiftserverless/api_op_RestoreFromSnapshot.go index 545f9c7f28f..f7ccb4b56b9 100644 --- a/service/redshiftserverless/api_op_RestoreFromSnapshot.go +++ b/service/redshiftserverless/api_op_RestoreFromSnapshot.go @@ -44,6 +44,16 @@ type RestoreFromSnapshotInput struct { // This member is required. WorkgroupName *string + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // namespace's admin credentials secret. + AdminPasswordSecretKmsKeyId *string + + // If true , Amazon Redshift uses Secrets Manager to manage the restored snapshot's + // admin credentials. If MmanageAdminPassword is false or not set, Amazon Redshift + // uses the admin credentials that the namespace or cluster had at the time the + // snapshot was taken. + ManageAdminPassword *bool + // The Amazon Web Services account that owns the snapshot. OwnerAccount *string diff --git a/service/redshiftserverless/api_op_UpdateNamespace.go b/service/redshiftserverless/api_op_UpdateNamespace.go index 36c1317aa8f..d0a2e76b70b 100644 --- a/service/redshiftserverless/api_op_UpdateNamespace.go +++ b/service/redshiftserverless/api_op_UpdateNamespace.go @@ -43,8 +43,14 @@ type UpdateNamespaceInput struct { // This member is required. NamespaceName *string + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // namespace's admin credentials secret. You can only use this parameter if + // manageAdminPassword is true. + AdminPasswordSecretKmsKeyId *string + // The password of the administrator for the first database created in the - // namespace. This parameter must be updated together with adminUsername . + // namespace. This parameter must be updated together with adminUsername . You + // can't use adminUserPassword if manageAdminPassword is true. AdminUserPassword *string // The username of the administrator for the first database created in the @@ -67,6 +73,12 @@ type UpdateNamespaceInput struct { // connectionlog , and useractivitylog . LogExports []types.LogExport + // If true , Amazon Redshift uses Secrets Manager to manage the namespace's admin + // credentials. You can't use adminUserPassword if manageAdminPassword is true. If + // manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword + // for the admin user account's password. + ManageAdminPassword *bool + noSmithyDocumentSerde } diff --git a/service/redshiftserverless/deserializers.go b/service/redshiftserverless/deserializers.go index d9605f2ef50..f6f5d42734a 100644 --- a/service/redshiftserverless/deserializers.go +++ b/service/redshiftserverless/deserializers.go @@ -5798,6 +5798,24 @@ func awsAwsjson11_deserializeDocumentNamespace(v **types.Namespace, value interf for key, value := range shape { switch key { + case "adminPasswordSecretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AdminPasswordSecretArn = ptr.String(jtv) + } + + case "adminPasswordSecretKmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.AdminPasswordSecretKmsKeyId = ptr.String(jtv) + } + case "adminUsername": if value != nil { jtv, ok := value.(string) @@ -6425,6 +6443,24 @@ func awsAwsjson11_deserializeDocumentSnapshot(v **types.Snapshot, value interfac } } + case "adminPasswordSecretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AdminPasswordSecretArn = ptr.String(jtv) + } + + case "adminPasswordSecretKmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.AdminPasswordSecretKmsKeyId = ptr.String(jtv) + } + case "adminUsername": if value != nil { jtv, ok := value.(string) diff --git a/service/redshiftserverless/serializers.go b/service/redshiftserverless/serializers.go index 28854012ba9..50b1e8d83f6 100644 --- a/service/redshiftserverless/serializers.go +++ b/service/redshiftserverless/serializers.go @@ -2405,6 +2405,11 @@ func awsAwsjson11_serializeOpDocumentCreateNamespaceInput(v *CreateNamespaceInpu object := value.Object() defer object.Close() + if v.AdminPasswordSecretKmsKeyId != nil { + ok := object.Key("adminPasswordSecretKmsKeyId") + ok.String(*v.AdminPasswordSecretKmsKeyId) + } + if v.AdminUsername != nil { ok := object.Key("adminUsername") ok.String(*v.AdminUsername) @@ -2444,6 +2449,11 @@ func awsAwsjson11_serializeOpDocumentCreateNamespaceInput(v *CreateNamespaceInpu } } + if v.ManageAdminPassword != nil { + ok := object.Key("manageAdminPassword") + ok.Boolean(*v.ManageAdminPassword) + } + if v.NamespaceName != nil { ok := object.Key("namespaceName") ok.String(*v.NamespaceName) @@ -3044,6 +3054,16 @@ func awsAwsjson11_serializeOpDocumentRestoreFromSnapshotInput(v *RestoreFromSnap object := value.Object() defer object.Close() + if v.AdminPasswordSecretKmsKeyId != nil { + ok := object.Key("adminPasswordSecretKmsKeyId") + ok.String(*v.AdminPasswordSecretKmsKeyId) + } + + if v.ManageAdminPassword != nil { + ok := object.Key("manageAdminPassword") + ok.Boolean(*v.ManageAdminPassword) + } + if v.NamespaceName != nil { ok := object.Key("namespaceName") ok.String(*v.NamespaceName) @@ -3190,6 +3210,11 @@ func awsAwsjson11_serializeOpDocumentUpdateNamespaceInput(v *UpdateNamespaceInpu object := value.Object() defer object.Close() + if v.AdminPasswordSecretKmsKeyId != nil { + ok := object.Key("adminPasswordSecretKmsKeyId") + ok.String(*v.AdminPasswordSecretKmsKeyId) + } + if v.AdminUsername != nil { ok := object.Key("adminUsername") ok.String(*v.AdminUsername) @@ -3224,6 +3249,11 @@ func awsAwsjson11_serializeOpDocumentUpdateNamespaceInput(v *UpdateNamespaceInpu } } + if v.ManageAdminPassword != nil { + ok := object.Key("manageAdminPassword") + ok.Boolean(*v.ManageAdminPassword) + } + if v.NamespaceName != nil { ok := object.Key("namespaceName") ok.String(*v.NamespaceName) diff --git a/service/redshiftserverless/types/types.go b/service/redshiftserverless/types/types.go index f35d051c68b..c230be1ab79 100644 --- a/service/redshiftserverless/types/types.go +++ b/service/redshiftserverless/types/types.go @@ -81,6 +81,14 @@ type EndpointAccess struct { // A collection of database objects and users. type Namespace struct { + // The Amazon Resource Name (ARN) for the namespace's admin user credentials + // secret. + AdminPasswordSecretArn *string + + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // namespace's admin credentials secret. + AdminPasswordSecretKmsKeyId *string + // The username of the administrator for the first database created in the // namespace. AdminUsername *string @@ -196,6 +204,14 @@ type Snapshot struct { // The size of the incremental backup in megabytes. ActualIncrementalBackupSizeInMegaBytes *float64 + // The Amazon Resource Name (ARN) for the namespace's admin user credentials + // secret. + AdminPasswordSecretArn *string + + // The ID of the Key Management Service (KMS) key used to encrypt and store the + // namespace's admin credentials secret. + AdminPasswordSecretKmsKeyId *string + // The username of the database within a snapshot. AdminUsername *string diff --git a/service/sesv2/api_op_GetEmailIdentity.go b/service/sesv2/api_op_GetEmailIdentity.go index f2129fe3c77..3128a9073ac 100644 --- a/service/sesv2/api_op_GetEmailIdentity.go +++ b/service/sesv2/api_op_GetEmailIdentity.go @@ -79,6 +79,10 @@ type GetEmailIdentityOutput struct { // with the email identity. Tags []types.Tag + // An object that contains additional information about the verification status + // for the identity. + VerificationInfo *types.VerificationInfo + // The verification status of the identity. The status can be one of the // following: // - PENDING – The verification process was initiated, but Amazon SES hasn't yet diff --git a/service/sesv2/api_op_ListEmailTemplates.go b/service/sesv2/api_op_ListEmailTemplates.go index 9744cb53d3d..28d61d8d406 100644 --- a/service/sesv2/api_op_ListEmailTemplates.go +++ b/service/sesv2/api_op_ListEmailTemplates.go @@ -48,7 +48,7 @@ type ListEmailTemplatesInput struct { // number of results is larger than the number you specified in this parameter, // then the response includes a NextToken element, which you can use to obtain // additional results. The value you specify has to be at least 1, and can be no - // more than 10. + // more than 100. PageSize *int32 noSmithyDocumentSerde @@ -159,7 +159,7 @@ type ListEmailTemplatesPaginatorOptions struct { // number of results is larger than the number you specified in this parameter, // then the response includes a NextToken element, which you can use to obtain // additional results. The value you specify has to be at least 1, and can be no - // more than 10. + // more than 100. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/sesv2/deserializers.go b/service/sesv2/deserializers.go index 04ff3f2e79c..f6c84b48ecf 100644 --- a/service/sesv2/deserializers.go +++ b/service/sesv2/deserializers.go @@ -5277,6 +5277,11 @@ func awsRestjson1_deserializeOpDocumentGetEmailIdentityOutput(v **GetEmailIdenti return err } + case "VerificationInfo": + if err := awsRestjson1_deserializeDocumentVerificationInfo(&sv.VerificationInfo, value); err != nil { + return err + } + case "VerificationStatus": if value != nil { jtv, ok := value.(string) @@ -18364,6 +18369,68 @@ func awsRestjson1_deserializeDocumentSnsDestination(v **types.SnsDestination, va return nil } +func awsRestjson1_deserializeDocumentSOARecord(v **types.SOARecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SOARecord + if *v == nil { + sv = &types.SOARecord{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdminEmail": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AdminEmail to be of type string, got %T instead", value) + } + sv.AdminEmail = ptr.String(jtv) + } + + case "PrimaryNameServer": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PrimaryNameServer to be of type string, got %T instead", value) + } + sv.PrimaryNameServer = ptr.String(jtv) + } + + case "SerialNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SerialNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SerialNumber = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSuppressedDestination(v **types.SuppressedDestination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19211,6 +19278,83 @@ func awsRestjson1_deserializeDocumentVdmOptions(v **types.VdmOptions, value inte return nil } +func awsRestjson1_deserializeDocumentVerificationInfo(v **types.VerificationInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.VerificationInfo + if *v == nil { + sv = &types.VerificationInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VerificationError to be of type string, got %T instead", value) + } + sv.ErrorType = types.VerificationError(jtv) + } + + case "LastCheckedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastCheckedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastSuccessTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSuccessTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "SOARecord": + if err := awsRestjson1_deserializeDocumentSOARecord(&sv.SOARecord, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentVolumeStatistics(v **types.VolumeStatistics, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sesv2/endpoints.go b/service/sesv2/endpoints.go index a8408a3154f..3f3769dab7b 100644 --- a/service/sesv2/endpoints.go +++ b/service/sesv2/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://email-fips.") diff --git a/service/sesv2/types/enums.go b/service/sesv2/types/enums.go index 64025693ed3..58bb8e91abe 100644 --- a/service/sesv2/types/enums.go +++ b/service/sesv2/types/enums.go @@ -770,6 +770,30 @@ func (TlsPolicy) Values() []TlsPolicy { } } +type VerificationError string + +// Enum values for VerificationError +const ( + VerificationErrorServiceError VerificationError = "SERVICE_ERROR" + VerificationErrorDnsServerError VerificationError = "DNS_SERVER_ERROR" + VerificationErrorHostNotFound VerificationError = "HOST_NOT_FOUND" + VerificationErrorTypeNotFound VerificationError = "TYPE_NOT_FOUND" + VerificationErrorInvalidValue VerificationError = "INVALID_VALUE" +) + +// Values returns all known values for VerificationError. 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 (VerificationError) Values() []VerificationError { + return []VerificationError{ + "SERVICE_ERROR", + "DNS_SERVER_ERROR", + "HOST_NOT_FOUND", + "TYPE_NOT_FOUND", + "INVALID_VALUE", + } +} + type VerificationStatus string // Enum values for VerificationStatus diff --git a/service/sesv2/types/types.go b/service/sesv2/types/types.go index 0f4c553ad37..d63b89fa570 100644 --- a/service/sesv2/types/types.go +++ b/service/sesv2/types/types.go @@ -771,7 +771,10 @@ type EmailContent struct { // - Each part of a multipart MIME message must be formatted properly. // - If you include attachments, they must be in a file format that the Amazon // SES API v2 supports. - // - The entire message must be Base64 encoded. + // - The raw data of the message needs to base64-encoded if you are accessing + // Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES + // using an Amazon Web Services SDK, the SDK takes care of the base 64-encoding for + // you. // - If any of the MIME parts in your message contain content that is outside of // the 7-bit ASCII character range, you should encode that content to ensure that // recipients' email clients render the message properly. @@ -1592,7 +1595,10 @@ type RawMessage struct { // - All of the required header fields must be present in the message. // - Each part of a multipart MIME message must be formatted properly. // - Attachments must be in a file format that the Amazon SES supports. - // - The entire message must be Base64 encoded. + // - The raw data of the message needs to base64-encoded if you are accessing + // Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES + // using an Amazon Web Services SDK, the SDK takes care of the base 64-encoding for + // you. // - If any of the MIME parts in your message contain content that is outside of // the 7-bit ASCII character range, you should encode that content to ensure that // recipients' email clients render the message properly. @@ -1740,6 +1746,22 @@ type SnsDestination struct { noSmithyDocumentSerde } +// An object that contains information about the start of authority (SOA) record +// associated with the identity. +type SOARecord struct { + + // Administrative contact email from the SOA record. + AdminEmail *string + + // Primary name server specified in the SOA record. + PrimaryNameServer *string + + // Serial number from the SOA record. + SerialNumber int64 + + noSmithyDocumentSerde +} + // An object that contains information about an email address that is on the // suppression list for your account. type SuppressedDestination struct { @@ -2024,6 +2046,40 @@ type VdmOptions struct { noSmithyDocumentSerde } +// An object that contains additional information about the verification status +// for the identity. +type VerificationInfo struct { + + // Provides the reason for the failure describing why Amazon SES was not able to + // successfully verify the identity. Below are the possible values: + // - INVALID_VALUE – Amazon SES was able to find the record, but the value + // contained within the record was invalid. Ensure you have published the correct + // values for the record. + // - TYPE_NOT_FOUND – The queried hostname exists but does not have the requested + // type of DNS record. Ensure that you have published the correct type of DNS + // record. + // - HOST_NOT_FOUND – The queried hostname does not exist or was not reachable at + // the time of the request. Ensure that you have published the required DNS + // record(s). + // - SERVICE_ERROR – A temporary issue is preventing Amazon SES from determining + // the verification status of the domain. + // - DNS_SERVER_ERROR – The DNS server encountered an issue and was unable to + // complete the request. + ErrorType VerificationError + + // The last time a verification attempt was made for this identity. + LastCheckedTimestamp *time.Time + + // The last time a successful verification was made for this identity. + LastSuccessTimestamp *time.Time + + // An object that contains information about the start of authority (SOA) record + // associated with the identity. + SOARecord *SOARecord + + noSmithyDocumentSerde +} + // An object that contains information about the amount of email that was // delivered to recipients. type VolumeStatistics struct { diff --git a/service/transfer/api_op_CreateAccess.go b/service/transfer/api_op_CreateAccess.go index 85a594d1352..a1585144c4a 100644 --- a/service/transfer/api_op_CreateAccess.go +++ b/service/transfer/api_op_CreateAccess.go @@ -72,7 +72,7 @@ type CreateAccessInput struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and diff --git a/service/transfer/api_op_CreateUser.go b/service/transfer/api_op_CreateUser.go index f7f569b1795..88ce2d93169 100644 --- a/service/transfer/api_op_CreateUser.go +++ b/service/transfer/api_op_CreateUser.go @@ -68,7 +68,7 @@ type CreateUserInput struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and diff --git a/service/transfer/api_op_UpdateAccess.go b/service/transfer/api_op_UpdateAccess.go index f54f6093a05..27af6cc149e 100644 --- a/service/transfer/api_op_UpdateAccess.go +++ b/service/transfer/api_op_UpdateAccess.go @@ -57,7 +57,7 @@ type UpdateAccessInput struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and diff --git a/service/transfer/api_op_UpdateUser.go b/service/transfer/api_op_UpdateUser.go index 39a482a8b94..4a966b24789 100644 --- a/service/transfer/api_op_UpdateUser.go +++ b/service/transfer/api_op_UpdateUser.go @@ -54,7 +54,7 @@ type UpdateUserInput struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and diff --git a/service/transfer/types/types.go b/service/transfer/types/types.go index c4f0a251da2..eabd5baccae 100644 --- a/service/transfer/types/types.go +++ b/service/transfer/types/types.go @@ -213,7 +213,7 @@ type DescribedAccess struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and @@ -744,7 +744,7 @@ type DescribedUser struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and @@ -1061,7 +1061,7 @@ type ListedAccess struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // The type of landing directory (folder) that you want your users' home directory @@ -1313,7 +1313,7 @@ type ListedUser struct { // The landing directory (folder) for a user when they log in to the server using // the client. A HomeDirectory example is /bucket_name/home/mydirectory . The - // HomeDirectory parameter is only used if HomeDirectoryType is set to LOGICAL . + // HomeDirectory parameter is only used if HomeDirectoryType is set to PATH . HomeDirectory *string // The type of landing directory (folder) that you want your users' home directory diff --git a/service/xray/api_op_GetTraceSummaries.go b/service/xray/api_op_GetTraceSummaries.go index 16938f8a304..2c9a6f5ea45 100644 --- a/service/xray/api_op_GetTraceSummaries.go +++ b/service/xray/api_op_GetTraceSummaries.go @@ -69,8 +69,8 @@ type GetTraceSummariesInput struct { // parameters are Name and Value. SamplingStrategy *types.SamplingStrategy - // A parameter to indicate whether to query trace summaries by TraceId or Event - // time. + // A parameter to indicate whether to query trace summaries by TraceId, Event + // (trace update time), or Service (segment end time). TimeRangeType types.TimeRangeType noSmithyDocumentSerde diff --git a/service/xray/types/enums.go b/service/xray/types/enums.go index 9c63dcce815..4c0e311fb74 100644 --- a/service/xray/types/enums.go +++ b/service/xray/types/enums.go @@ -96,6 +96,7 @@ type TimeRangeType string const ( TimeRangeTypeTraceId TimeRangeType = "TraceId" TimeRangeTypeEvent TimeRangeType = "Event" + TimeRangeTypeService TimeRangeType = "Service" ) // Values returns all known values for TimeRangeType. Note that this can be @@ -105,5 +106,6 @@ func (TimeRangeType) Values() []TimeRangeType { return []TimeRangeType{ "TraceId", "Event", + "Service", } }