diff --git a/.changelog/1d11b5e03858465b8cb59215ad18863b.json b/.changelog/1d11b5e03858465b8cb59215ad18863b.json new file mode 100644 index 00000000000..d332c05ce1a --- /dev/null +++ b/.changelog/1d11b5e03858465b8cb59215ad18863b.json @@ -0,0 +1,8 @@ +{ + "id": "1d11b5e0-3858-465b-8cb5-9215ad18863b", + "type": "feature", + "description": "Adding new ListBatchJobRestartPoints API and support for restart batch job.", + "modules": [ + "service/m2" + ] +} \ No newline at end of file diff --git a/.changelog/3513352e940f4897b285bef7b2a7a8cc.json b/.changelog/3513352e940f4897b285bef7b2a7a8cc.json new file mode 100644 index 00000000000..804e7d17ee1 --- /dev/null +++ b/.changelog/3513352e940f4897b285bef7b2a7a8cc.json @@ -0,0 +1,8 @@ +{ + "id": "3513352e-940f-4897-b285-bef7b2a7a8cc", + "type": "feature", + "description": "This release adds support for shuffle optimized disks that allow larger disk sizes and higher IOPS to efficiently run shuffle heavy workloads.", + "modules": [ + "service/emrserverless" + ] +} \ No newline at end of file diff --git a/.changelog/3c7c9264c1954747926bec2ae28cab20.json b/.changelog/3c7c9264c1954747926bec2ae28cab20.json new file mode 100644 index 00000000000..4c4e17077f0 --- /dev/null +++ b/.changelog/3c7c9264c1954747926bec2ae28cab20.json @@ -0,0 +1,8 @@ +{ + "id": "3c7c9264-c195-4747-926b-ec2ae28cab20", + "type": "feature", + "description": "Add PublicGateways in the GetWirelessStatistics call response, indicating the LoRaWAN public network accessed by the device.", + "modules": [ + "service/iotwireless" + ] +} \ No newline at end of file diff --git a/.changelog/3d2826bb343147249125fc46d44d1714.json b/.changelog/3d2826bb343147249125fc46d44d1714.json new file mode 100644 index 00000000000..b1c1aeb8f6d --- /dev/null +++ b/.changelog/3d2826bb343147249125fc46d44d1714.json @@ -0,0 +1,8 @@ +{ + "id": "3d2826bb-3431-4724-9125-fc46d44d1714", + "type": "feature", + "description": "For Create Agent API, the agentResourceRoleArn parameter is no longer required.", + "modules": [ + "service/bedrockagent" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..1cc0d8d6b2d --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "internal/protocoltest/smithyrpcv2cbor" + ] +} \ No newline at end of file diff --git a/.changelog/4db7a79baea54e07b067c599830f77ef.json b/.changelog/4db7a79baea54e07b067c599830f77ef.json new file mode 100644 index 00000000000..cc81dd565ff --- /dev/null +++ b/.changelog/4db7a79baea54e07b067c599830f77ef.json @@ -0,0 +1,8 @@ +{ + "id": "4db7a79b-aea5-4e07-b067-c599830f77ef", + "type": "feature", + "description": "Cross Account Resource Support .", + "modules": [ + "service/entityresolution" + ] +} \ No newline at end of file diff --git a/.changelog/638f57b7c1df463fb0d6ca0f80535972.json b/.changelog/638f57b7c1df463fb0d6ca0f80535972.json new file mode 100644 index 00000000000..d970374c7f4 --- /dev/null +++ b/.changelog/638f57b7c1df463fb0d6ca0f80535972.json @@ -0,0 +1,8 @@ +{ + "id": "638f57b7-c1df-463f-b0d6-ca0f80535972", + "type": "feature", + "description": "This release adds new APIs to allow customers to configure their Outpost capacity at order-time.", + "modules": [ + "service/outposts" + ] +} \ No newline at end of file diff --git a/.changelog/6b2f3c89563349c9b9eb5c6d0db959af.json b/.changelog/6b2f3c89563349c9b9eb5c6d0db959af.json new file mode 100644 index 00000000000..71fc3db5732 --- /dev/null +++ b/.changelog/6b2f3c89563349c9b9eb5c6d0db959af.json @@ -0,0 +1,8 @@ +{ + "id": "6b2f3c89-5633-49c9-b9eb-5c6d0db959af", + "type": "feature", + "description": "This release adds Lake Formation managed RAM support for the 4 APIs - \"DescribeLakeFormationIdentityCenterConfiguration\", \"CreateLakeFormationIdentityCenterConfiguration\", \"DescribeLakeFormationIdentityCenterConfiguration\", and \"DeleteLakeFormationIdentityCenterConfiguration\"", + "modules": [ + "service/lakeformation" + ] +} \ No newline at end of file diff --git a/.changelog/751aa8f634a94732b60dee6e6ef43818.json b/.changelog/751aa8f634a94732b60dee6e6ef43818.json new file mode 100644 index 00000000000..72187e7ecf9 --- /dev/null +++ b/.changelog/751aa8f634a94732b60dee6e6ef43818.json @@ -0,0 +1,8 @@ +{ + "id": "751aa8f6-34a9-4732-b60d-ee6e6ef43818", + "type": "feature", + "description": "AWS Well-Architected now has a Connector for Jira to allow customers to efficiently track workload risks and improvement efforts and create closed-loop mechanisms.", + "modules": [ + "service/wellarchitected" + ] +} \ No newline at end of file diff --git a/.changelog/790a9a25d6d040a0b794c6f59d18105f.json b/.changelog/790a9a25d6d040a0b794c6f59d18105f.json new file mode 100644 index 00000000000..823bc5b851b --- /dev/null +++ b/.changelog/790a9a25d6d040a0b794c6f59d18105f.json @@ -0,0 +1,8 @@ +{ + "id": "790a9a25-d6d0-40a0-b794-c6f59d18105f", + "type": "feature", + "description": "Dash v2 is a MediaPackage V2 feature to support egressing on DASH manifest format.", + "modules": [ + "service/mediapackagev2" + ] +} \ No newline at end of file diff --git a/service/bedrockagent/api_op_CreateAgent.go b/service/bedrockagent/api_op_CreateAgent.go index 35ee4ad8c1a..9f1d2812283 100644 --- a/service/bedrockagent/api_op_CreateAgent.go +++ b/service/bedrockagent/api_op_CreateAgent.go @@ -15,10 +15,10 @@ import ( // sources, software applications, user conversations, and APIs to carry out tasks // to help customers. // - Specify the following fields for security purposes. -// - agentResourceRoleArn – The ARN of the role with permissions to create an -// agent. -// - (Optional) customerEncryptionKeyArn – The ARN of a KMS key to encrypt the -// creation of the agent. +// - agentResourceRoleArn – The Amazon Resource Name (ARN) of the role with +// permissions to invoke API operations on an agent. +// - (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a +// KMS key to encrypt the creation of the agent. // - (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which // the agent should maintain session information. After this time expires, the // subsequent InvokeAgent request begins a new session. @@ -50,10 +50,8 @@ type CreateAgentInput struct { // This member is required. AgentName *string - // The ARN of the IAM role with permissions to create the agent. The ARN must - // begin with AmazonBedrockExecutionRoleForAgents_ . - // - // This member is required. + // The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API + // operations on the agent. AgentResourceRoleArn *string // A unique, case-sensitive identifier to ensure that the API request completes no @@ -63,7 +61,7 @@ type CreateAgentInput struct { // . ClientToken *string - // The ARN of the KMS key with which to encrypt the agent. + // The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent. CustomerEncryptionKeyArn *string // A description of the agent. diff --git a/service/bedrockagent/api_op_CreateAgentActionGroup.go b/service/bedrockagent/api_op_CreateAgentActionGroup.go index 57e4231d9e6..de23aff12f1 100644 --- a/service/bedrockagent/api_op_CreateAgentActionGroup.go +++ b/service/bedrockagent/api_op_CreateAgentActionGroup.go @@ -54,8 +54,8 @@ type CreateAgentActionGroupInput struct { // This member is required. AgentVersion *string - // The ARN of the Lambda function containing the business logic that is carried - // out upon invoking the action. + // The Amazon Resource Name (ARN) of the Lambda function containing the business + // logic that is carried out upon invoking the action. ActionGroupExecutor types.ActionGroupExecutor // Specifies whether the action group is available for the agent to invoke or not diff --git a/service/bedrockagent/api_op_CreateKnowledgeBase.go b/service/bedrockagent/api_op_CreateKnowledgeBase.go index de0ac07ea38..5b57c18abc2 100644 --- a/service/bedrockagent/api_op_CreateKnowledgeBase.go +++ b/service/bedrockagent/api_op_CreateKnowledgeBase.go @@ -20,8 +20,8 @@ import ( // a knowledge base (https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-create) // . // - Provide the name and an optional description . -// - Provide the ARN with permissions to create a knowledge base in the roleArn -// field. +// - Provide the Amazon Resource Name (ARN) with permissions to create a +// knowledge base in the roleArn field. // - Provide the embedding model to use in the embeddingModelArn field in the // knowledgeBaseConfiguration object. // - Provide the configuration for your vector store in the storageConfiguration @@ -67,7 +67,8 @@ type CreateKnowledgeBaseInput struct { // This member is required. Name *string - // The ARN of the IAM role with permissions to create the knowledge base. + // The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API + // operations on the knowledge base. // // This member is required. RoleArn *string diff --git a/service/bedrockagent/api_op_ListTagsForResource.go b/service/bedrockagent/api_op_ListTagsForResource.go index 0f4305539d8..77a549587aa 100644 --- a/service/bedrockagent/api_op_ListTagsForResource.go +++ b/service/bedrockagent/api_op_ListTagsForResource.go @@ -28,7 +28,7 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes type ListTagsForResourceInput struct { - // The ARN of the resource for which to list tags. + // The Amazon Resource Name (ARN) of the resource for which to list tags. // // This member is required. ResourceArn *string diff --git a/service/bedrockagent/api_op_TagResource.go b/service/bedrockagent/api_op_TagResource.go index b308699ee1f..7ba322e2144 100644 --- a/service/bedrockagent/api_op_TagResource.go +++ b/service/bedrockagent/api_op_TagResource.go @@ -29,7 +29,7 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF type TagResourceInput struct { - // The ARN of the resource to tag. + // The Amazon Resource Name (ARN) of the resource to tag. // // This member is required. ResourceArn *string diff --git a/service/bedrockagent/api_op_UntagResource.go b/service/bedrockagent/api_op_UntagResource.go index b780eab7f04..955ea9a6fe4 100644 --- a/service/bedrockagent/api_op_UntagResource.go +++ b/service/bedrockagent/api_op_UntagResource.go @@ -28,7 +28,7 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, type UntagResourceInput struct { - // The ARN of the resource from which to remove tags. + // The Amazon Resource Name (ARN) of the resource from which to remove tags. // // This member is required. ResourceArn *string diff --git a/service/bedrockagent/api_op_UpdateAgent.go b/service/bedrockagent/api_op_UpdateAgent.go index b2f26a12042..54d03708816 100644 --- a/service/bedrockagent/api_op_UpdateAgent.go +++ b/service/bedrockagent/api_op_UpdateAgent.go @@ -39,8 +39,8 @@ type UpdateAgentInput struct { // This member is required. AgentName *string - // The ARN of the IAM role with permissions to update the agent. The ARN must - // begin with AmazonBedrockExecutionRoleForAgents_ . + // The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API + // operations on the agent. // // This member is required. AgentResourceRoleArn *string @@ -50,7 +50,7 @@ type UpdateAgentInput struct { // This member is required. FoundationModel *string - // The ARN of the KMS key with which to encrypt the agent. + // The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent. CustomerEncryptionKeyArn *string // Specifies a new description of the agent. diff --git a/service/bedrockagent/api_op_UpdateAgentActionGroup.go b/service/bedrockagent/api_op_UpdateAgentActionGroup.go index 20ae8c422b0..aca5db95303 100644 --- a/service/bedrockagent/api_op_UpdateAgentActionGroup.go +++ b/service/bedrockagent/api_op_UpdateAgentActionGroup.go @@ -49,8 +49,8 @@ type UpdateAgentActionGroupInput struct { // This member is required. AgentVersion *string - // The ARN of the Lambda function containing the business logic that is carried - // out upon invoking the action. + // The Amazon Resource Name (ARN) of the Lambda function containing the business + // logic that is carried out upon invoking the action. ActionGroupExecutor types.ActionGroupExecutor // Specifies whether the action group is available for the agent to invoke or not diff --git a/service/bedrockagent/api_op_UpdateKnowledgeBase.go b/service/bedrockagent/api_op_UpdateKnowledgeBase.go index f3d91d13fea..600a2e72f89 100644 --- a/service/bedrockagent/api_op_UpdateKnowledgeBase.go +++ b/service/bedrockagent/api_op_UpdateKnowledgeBase.go @@ -57,7 +57,7 @@ type UpdateKnowledgeBaseInput struct { Name *string // Specifies a different Amazon Resource Name (ARN) of the IAM role with - // permissions to modify the knowledge base. + // permissions to invoke API operations on the knowledge base. // // This member is required. RoleArn *string diff --git a/service/bedrockagent/types/errors.go b/service/bedrockagent/types/errors.go index 9681a7d91d9..eabda8876bb 100644 --- a/service/bedrockagent/types/errors.go +++ b/service/bedrockagent/types/errors.go @@ -85,8 +85,8 @@ func (e *InternalServerException) ErrorCode() string { } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// The specified resource ARN was not found. Check the ARN and try your request -// again. +// The specified resource Amazon Resource Name (ARN) was not found. Check the +// Amazon Resource Name (ARN) and try your request again. type ResourceNotFoundException struct { Message *string diff --git a/service/bedrockagent/types/types.go b/service/bedrockagent/types/types.go index 39680625227..c88c9ab643f 100644 --- a/service/bedrockagent/types/types.go +++ b/service/bedrockagent/types/types.go @@ -17,8 +17,8 @@ type ActionGroupExecutor interface { isActionGroupExecutor() } -// The ARN of the Lambda function containing the business logic that is carried -// out upon invoking the action. +// The Amazon Resource Name (ARN) of the Lambda function containing the business +// logic that is carried out upon invoking the action. type ActionGroupExecutorMemberLambda struct { Value string @@ -61,7 +61,7 @@ type ActionGroupSummary struct { // Contains details about an agent. type Agent struct { - // The ARN of the agent. + // The Amazon Resource Name (ARN) of the agent. // // This member is required. AgentArn *string @@ -76,8 +76,8 @@ type Agent struct { // This member is required. AgentName *string - // The ARN of the IAM role with permissions to call API operations on the agent. - // The ARN must begin with AmazonBedrockExecutionRoleForAgents_ . + // The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API + // operations on the agent. // // This member is required. AgentResourceRoleArn *string @@ -125,7 +125,7 @@ type Agent struct { // . ClientToken *string - // The ARN of the KMS key that encrypts the agent. + // The Amazon Resource Name (ARN) of the KMS key that encrypts the agent. CustomerEncryptionKeyArn *string // The description of the agent. @@ -196,8 +196,8 @@ type AgentActionGroup struct { // This member is required. UpdatedAt *time.Time - // The ARN of the Lambda function containing the business logic that is carried - // out upon invoking the action. + // The Amazon Resource Name (ARN) of the Lambda function containing the business + // logic that is carried out upon invoking the action. ActionGroupExecutor ActionGroupExecutor // Contains either details about the S3 object containing the OpenAPI schema for @@ -231,7 +231,7 @@ type AgentActionGroup struct { // Contains details about an alias of an agent. type AgentAlias struct { - // The ARN of the alias of the agent. + // The Amazon Resource Name (ARN) of the alias of the agent. // // This member is required. AgentAliasArn *string @@ -467,7 +467,7 @@ type AgentSummary struct { // Contains details about a version of an agent. type AgentVersion struct { - // The ARN of the agent that the version belongs to. + // The Amazon Resource Name (ARN) of the agent that the version belongs to. // // This member is required. AgentArn *string @@ -482,8 +482,8 @@ type AgentVersion struct { // This member is required. AgentName *string - // The ARN of the IAM role with permissions to invoke API operations on the agent. - // The ARN must begin with AmazonBedrockExecutionRoleForAgents_ . + // The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API + // operations on the agent. // // This member is required. AgentResourceRoleArn *string @@ -516,7 +516,7 @@ type AgentVersion struct { // This member is required. Version *string - // The ARN of the KMS key that encrypts the agent. + // The Amazon Resource Name (ARN) of the KMS key that encrypts the agent. CustomerEncryptionKeyArn *string // The description of the version. @@ -963,7 +963,7 @@ type KnowledgeBase struct { // This member is required. CreatedAt *time.Time - // The ARN of the knowledge base. + // The Amazon Resource Name (ARN) of the knowledge base. // // This member is required. KnowledgeBaseArn *string @@ -983,9 +983,8 @@ type KnowledgeBase struct { // This member is required. Name *string - // The ARN of the IAM role with permissions to invoke API operations on the - // knowledge base. The ARN must begin with - // AmazonBedrockExecutionRoleForKnowledgeBase_ . + // The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API + // operations on the knowledge base. // // This member is required. RoleArn *string @@ -1069,7 +1068,7 @@ type KnowledgeBaseSummary struct { // . type OpenSearchServerlessConfiguration struct { - // The ARN of the OpenSearch Service vector store. + // The Amazon Resource Name (ARN) of the OpenSearch Service vector store. // // This member is required. CollectionArn *string @@ -1123,8 +1122,8 @@ type PineconeConfiguration struct { // This member is required. ConnectionString *string - // The ARN of the secret that you created in Secrets Manager that is linked to - // your Pinecone API key. + // The Amazon Resource Name (ARN) of the secret that you created in Secrets + // Manager that is linked to your Pinecone API key. // // This member is required. CredentialsSecretArn *string @@ -1231,8 +1230,8 @@ type PromptOverrideConfiguration struct { // . type RdsConfiguration struct { - // The ARN of the secret that you created in Secrets Manager that is linked to - // your Amazon RDS database. + // The Amazon Resource Name (ARN) of the secret that you created in Secrets + // Manager that is linked to your Amazon RDS database. // // This member is required. CredentialsSecretArn *string @@ -1248,7 +1247,7 @@ type RdsConfiguration struct { // This member is required. FieldMapping *RdsFieldMapping - // The ARN of the vector store. + // The Amazon Resource Name (ARN) of the vector store. // // This member is required. ResourceArn *string @@ -1297,8 +1296,8 @@ type RdsFieldMapping struct { // . type RedisEnterpriseCloudConfiguration struct { - // The ARN of the secret that you created in Secrets Manager that is linked to - // your Redis Enterprise Cloud database. + // The Amazon Resource Name (ARN) of the secret that you created in Secrets + // Manager that is linked to your Redis Enterprise Cloud database. // // This member is required. CredentialsSecretArn *string @@ -1350,7 +1349,7 @@ type RedisEnterpriseCloudFieldMapping struct { // Contains information about the S3 configuration of the data source. type S3DataSourceConfiguration struct { - // The ARN of the bucket that contains the data source. + // The Amazon Resource Name (ARN) of the bucket that contains the data source. // // This member is required. BucketArn *string @@ -1378,7 +1377,7 @@ type S3Identifier struct { // Contains the configuration for server-side encryption. type ServerSideEncryptionConfiguration struct { - // The ARN of the KMS key used to encrypt the resource. + // The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource. KmsKeyArn *string noSmithyDocumentSerde @@ -1443,7 +1442,8 @@ type VectorIngestionConfiguration struct { // knowledge base. type VectorKnowledgeBaseConfiguration struct { - // The ARN of the model used to create vector embeddings for the knowledge base. + // The Amazon Resource Name (ARN) of the model used to create vector embeddings + // for the knowledge base. // // This member is required. EmbeddingModelArn *string diff --git a/service/bedrockagent/validators.go b/service/bedrockagent/validators.go index 132a51ba45d..04cde6b7406 100644 --- a/service/bedrockagent/validators.go +++ b/service/bedrockagent/validators.go @@ -1454,9 +1454,6 @@ func validateOpCreateAgentInput(v *CreateAgentInput) error { if v.AgentName == nil { invalidParams.Add(smithy.NewErrParamRequired("AgentName")) } - if v.AgentResourceRoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AgentResourceRoleArn")) - } if v.PromptOverrideConfiguration != nil { if err := validatePromptOverrideConfiguration(v.PromptOverrideConfiguration); err != nil { invalidParams.AddNested("PromptOverrideConfiguration", err.(smithy.InvalidParamsError)) diff --git a/service/cognitoidentity/internal/endpoints/endpoints.go b/service/cognitoidentity/internal/endpoints/endpoints.go index eef6b76e85e..fec8e627bf6 100644 --- a/service/cognitoidentity/internal/endpoints/endpoints.go +++ b/service/cognitoidentity/internal/endpoints/endpoints.go @@ -154,6 +154,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -181,6 +184,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/cognitoidentityprovider/internal/endpoints/endpoints.go b/service/cognitoidentityprovider/internal/endpoints/endpoints.go index cb08204c725..7dbbb6017f1 100644 --- a/service/cognitoidentityprovider/internal/endpoints/endpoints.go +++ b/service/cognitoidentityprovider/internal/endpoints/endpoints.go @@ -184,6 +184,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/emrserverless/deserializers.go b/service/emrserverless/deserializers.go index 5ac385d5b6c..8550e7cbd3c 100644 --- a/service/emrserverless/deserializers.go +++ b/service/emrserverless/deserializers.go @@ -4582,6 +4582,15 @@ func awsRestjson1_deserializeDocumentWorkerResourceConfig(v **types.WorkerResour sv.Disk = ptr.String(jtv) } + case "diskType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DiskType to be of type string, got %T instead", value) + } + sv.DiskType = ptr.String(jtv) + } + case "memory": if value != nil { jtv, ok := value.(string) diff --git a/service/emrserverless/endpoints.go b/service/emrserverless/endpoints.go index fe0b01de044..dcfbc970c7a 100644 --- a/service/emrserverless/endpoints.go +++ b/service/emrserverless/endpoints.go @@ -373,7 +373,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://emr-serverless-fips.") diff --git a/service/emrserverless/serializers.go b/service/emrserverless/serializers.go index 5a43ba18c3c..1e5168cecb0 100644 --- a/service/emrserverless/serializers.go +++ b/service/emrserverless/serializers.go @@ -1769,6 +1769,11 @@ func awsRestjson1_serializeDocumentWorkerResourceConfig(v *types.WorkerResourceC ok.String(*v.Disk) } + if v.DiskType != nil { + ok := object.Key("diskType") + ok.String(*v.DiskType) + } + if v.Memory != nil { ok := object.Key("memory") ok.String(*v.Memory) diff --git a/service/emrserverless/types/types.go b/service/emrserverless/types/types.go index 7bc4dd18568..16db3b82072 100644 --- a/service/emrserverless/types/types.go +++ b/service/emrserverless/types/types.go @@ -624,6 +624,11 @@ type WorkerResourceConfig struct { // The disk requirements for every worker instance of the worker type. Disk *string + // The disk type for every worker instance of the work type. Shuffle optimized + // disks have higher performance characteristics and are better for shuffle heavy + // workloads. Default is STANDARD . + DiskType *string + noSmithyDocumentSerde } diff --git a/service/entityresolution/api_op_AddPolicyStatement.go b/service/entityresolution/api_op_AddPolicyStatement.go new file mode 100644 index 00000000000..178373a597d --- /dev/null +++ b/service/entityresolution/api_op_AddPolicyStatement.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a policy statement object. To retrieve a list of existing policy +// statements, use the GetPolicy API. +func (c *Client) AddPolicyStatement(ctx context.Context, params *AddPolicyStatementInput, optFns ...func(*Options)) (*AddPolicyStatementOutput, error) { + if params == nil { + params = &AddPolicyStatementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddPolicyStatement", params, optFns, c.addOperationAddPolicyStatementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddPolicyStatementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddPolicyStatementInput struct { + + // The action that the principal can use on the resource. For example, + // entityresolution:GetIdMappingJob , entityresolution:GetMatchingJob . + // + // This member is required. + Action []string + + // The Amazon Resource Name (ARN) of the resource that will be accessed by the + // principal. + // + // This member is required. + Arn *string + + // Determines whether the permissions specified in the policy are to be allowed ( + // Allow ) or denied ( Deny ). + // + // This member is required. + Effect types.StatementEffect + + // The Amazon Web Services service or Amazon Web Services account that can access + // the resource defined as ARN. + // + // This member is required. + Principal []string + + // A statement identifier that differentiates the statement from others in the + // same policy. + // + // This member is required. + StatementId *string + + // A set of condition keys that you can use in key policies. + Condition *string + + noSmithyDocumentSerde +} + +type AddPolicyStatementOutput struct { + + // The Amazon Resource Name (ARN) of the resource that will be accessed by the + // principal. + // + // This member is required. + Arn *string + + // A unique identifier for the current revision of the policy. + // + // This member is required. + Token *string + + // The resource-based policy. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddPolicyStatementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddPolicyStatement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddPolicyStatement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddPolicyStatement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpAddPolicyStatementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddPolicyStatement(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAddPolicyStatement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddPolicyStatement", + } +} diff --git a/service/entityresolution/api_op_CreateIdMappingWorkflow.go b/service/entityresolution/api_op_CreateIdMappingWorkflow.go index 2f1dd0c642f..39bf88f706c 100644 --- a/service/entityresolution/api_op_CreateIdMappingWorkflow.go +++ b/service/entityresolution/api_op_CreateIdMappingWorkflow.go @@ -42,12 +42,6 @@ type CreateIdMappingWorkflowInput struct { // 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. // @@ -63,6 +57,10 @@ type CreateIdMappingWorkflowInput struct { // A description of the workflow. Description *string + // A list of IdMappingWorkflowOutputSource objects, each of which contains fields + // OutputS3Path and Output . + OutputSourceConfig []types.IdMappingWorkflowOutputSource + // The tags used to organize, track, or control access for this resource. Tags map[string]string @@ -82,12 +80,6 @@ type CreateIdMappingWorkflowOutput struct { // 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. // @@ -108,6 +100,10 @@ type CreateIdMappingWorkflowOutput struct { // A description of the workflow. Description *string + // A list of IdMappingWorkflowOutputSource objects, each of which contains fields + // OutputS3Path and Output . + OutputSourceConfig []types.IdMappingWorkflowOutputSource + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/entityresolution/api_op_CreateIdNamespace.go b/service/entityresolution/api_op_CreateIdNamespace.go new file mode 100644 index 00000000000..e9394c1bc1e --- /dev/null +++ b/service/entityresolution/api_op_CreateIdNamespace.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an ID namespace object which will help customers provide metadata +// explaining their dataset and how to use it. Each ID namespace must have a unique +// name. To modify an existing ID namespace, use the UpdateIdNamespace API. +func (c *Client) CreateIdNamespace(ctx context.Context, params *CreateIdNamespaceInput, optFns ...func(*Options)) (*CreateIdNamespaceOutput, error) { + if params == nil { + params = &CreateIdNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateIdNamespace", params, optFns, c.addOperationCreateIdNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateIdNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateIdNamespaceInput struct { + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + // The type of ID namespace. There are two types: SOURCE and TARGET . The SOURCE + // contains configurations for sourceId data that will be processed in an ID + // mapping workflow. The TARGET contains a configuration of targetId to which all + // sourceIds will resolve to. + // + // This member is required. + Type types.IdNamespaceType + + // The description of the ID namespace. + Description *string + + // Determines the properties of IdMappingWorflow where this IdNamespace can be + // used as a Source or a Target . + IdMappingWorkflowProperties []types.IdNamespaceIdMappingWorkflowProperties + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + InputSourceConfig []types.IdNamespaceInputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access the resources defined in this IdNamespace on your behalf as part + // of the workflow run. + RoleArn *string + + // The tags used to organize, track, or control access for this resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateIdNamespaceOutput struct { + + // The timestamp of when the ID namespace was created. + // + // This member is required. + CreatedAt *time.Time + + // The Amazon Resource Name (ARN) of the ID namespace. + // + // This member is required. + IdNamespaceArn *string + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + // The type of ID namespace. There are two types: SOURCE and TARGET . The SOURCE + // contains configurations for sourceId data that will be processed in an ID + // mapping workflow. The TARGET contains a configuration of targetId to which all + // sourceIds will resolve to. + // + // This member is required. + Type types.IdNamespaceType + + // The timestamp of when the ID namespace was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The description of the ID namespace. + Description *string + + // Determines the properties of IdMappingWorkflow where this IdNamespace can be + // used as a Source or a Target . + IdMappingWorkflowProperties []types.IdNamespaceIdMappingWorkflowProperties + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + InputSourceConfig []types.IdNamespaceInputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access the resources defined in inputSourceConfig on your behalf as + // part of the workflow run. + RoleArn *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) addOperationCreateIdNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateIdNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateIdNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIdNamespace"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCreateIdNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIdNamespace(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateIdNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateIdNamespace", + } +} diff --git a/service/entityresolution/api_op_DeleteIdNamespace.go b/service/entityresolution/api_op_DeleteIdNamespace.go new file mode 100644 index 00000000000..9ba2cec144f --- /dev/null +++ b/service/entityresolution/api_op_DeleteIdNamespace.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the IdNamespace with a given name. +func (c *Client) DeleteIdNamespace(ctx context.Context, params *DeleteIdNamespaceInput, optFns ...func(*Options)) (*DeleteIdNamespaceOutput, error) { + if params == nil { + params = &DeleteIdNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIdNamespace", params, optFns, c.addOperationDeleteIdNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIdNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIdNamespaceInput struct { + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + noSmithyDocumentSerde +} + +type DeleteIdNamespaceOutput 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) addOperationDeleteIdNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteIdNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteIdNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIdNamespace"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteIdNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIdNamespace(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteIdNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteIdNamespace", + } +} diff --git a/service/entityresolution/api_op_DeletePolicyStatement.go b/service/entityresolution/api_op_DeletePolicyStatement.go new file mode 100644 index 00000000000..059466641e7 --- /dev/null +++ b/service/entityresolution/api_op_DeletePolicyStatement.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the policy statement. +func (c *Client) DeletePolicyStatement(ctx context.Context, params *DeletePolicyStatementInput, optFns ...func(*Options)) (*DeletePolicyStatementOutput, error) { + if params == nil { + params = &DeletePolicyStatementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePolicyStatement", params, optFns, c.addOperationDeletePolicyStatementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePolicyStatementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePolicyStatementInput struct { + + // The ARN of the resource for which the policy need to be deleted. + // + // This member is required. + Arn *string + + // A statement identifier that differentiates the statement from others in the + // same policy. + // + // This member is required. + StatementId *string + + noSmithyDocumentSerde +} + +type DeletePolicyStatementOutput struct { + + // The ARN of the resource for which the policy need to be deleted. + // + // This member is required. + Arn *string + + // A unique identifier for the deleted policy. + // + // This member is required. + Token *string + + // The resource-based policy. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePolicyStatementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePolicyStatement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePolicyStatement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePolicyStatement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeletePolicyStatementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicyStatement(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePolicyStatement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePolicyStatement", + } +} diff --git a/service/entityresolution/api_op_GetIdMappingJob.go b/service/entityresolution/api_op_GetIdMappingJob.go index 378a6871924..60623059753 100644 --- a/service/entityresolution/api_op_GetIdMappingJob.go +++ b/service/entityresolution/api_op_GetIdMappingJob.go @@ -71,6 +71,9 @@ type GetIdMappingJobOutput struct { // unique IDs generated, and records the execution skipped. Metrics *types.IdMappingJobMetrics + // A list of OutputSource objects. + OutputSourceConfig []types.IdMappingJobOutputSource + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/entityresolution/api_op_GetIdMappingWorkflow.go b/service/entityresolution/api_op_GetIdMappingWorkflow.go index bd2e3688965..b8a5fd282bf 100644 --- a/service/entityresolution/api_op_GetIdMappingWorkflow.go +++ b/service/entityresolution/api_op_GetIdMappingWorkflow.go @@ -56,14 +56,8 @@ type GetIdMappingWorkflowOutput struct { // 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. + // role to access Amazon Web Services resources on your behalf. // // This member is required. RoleArn *string @@ -87,6 +81,10 @@ type GetIdMappingWorkflowOutput struct { // A description of the workflow. Description *string + // A list of OutputSource objects, each of which contains fields OutputS3Path and + // KMSArn . + OutputSourceConfig []types.IdMappingWorkflowOutputSource + // The tags used to organize, track, or control access for this resource. Tags map[string]string diff --git a/service/entityresolution/api_op_GetIdNamespace.go b/service/entityresolution/api_op_GetIdNamespace.go new file mode 100644 index 00000000000..8910e0bd3ac --- /dev/null +++ b/service/entityresolution/api_op_GetIdNamespace.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns the IdNamespace with a given name, if it exists. +func (c *Client) GetIdNamespace(ctx context.Context, params *GetIdNamespaceInput, optFns ...func(*Options)) (*GetIdNamespaceOutput, error) { + if params == nil { + params = &GetIdNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIdNamespace", params, optFns, c.addOperationGetIdNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIdNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIdNamespaceInput struct { + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + noSmithyDocumentSerde +} + +type GetIdNamespaceOutput struct { + + // The timestamp of when the ID namespace was created. + // + // This member is required. + CreatedAt *time.Time + + // The Amazon Resource Name (ARN) of the ID namespace. + // + // This member is required. + IdNamespaceArn *string + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + // The type of ID namespace. There are two types: SOURCE and TARGET . The SOURCE + // contains configurations for sourceId data that will be processed in an ID + // mapping workflow. The TARGET contains a configuration of targetId to which all + // sourceIds will resolve to. + // + // This member is required. + Type types.IdNamespaceType + + // The timestamp of when the ID namespace was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The description of the ID namespace. + Description *string + + // Determines the properties of IdMappingWorkflow where this IdNamespace can be + // used as a Source or a Target . + IdMappingWorkflowProperties []types.IdNamespaceIdMappingWorkflowProperties + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + InputSourceConfig []types.IdNamespaceInputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access the resources defined in this IdNamespace on your behalf as part + // of a workflow run. + RoleArn *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) addOperationGetIdNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetIdNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetIdNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetIdNamespace"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetIdNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdNamespace(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetIdNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetIdNamespace", + } +} diff --git a/service/entityresolution/api_op_GetMatchId.go b/service/entityresolution/api_op_GetMatchId.go index a0408c82568..489b0d86bf9 100644 --- a/service/entityresolution/api_op_GetMatchId.go +++ b/service/entityresolution/api_op_GetMatchId.go @@ -39,6 +39,12 @@ type GetMatchIdInput struct { // This member is required. WorkflowName *string + // Normalizes the attributes defined in the schema in the input data. For example, + // if an attribute has an AttributeType of PHONE_NUMBER , and the data in the input + // table is in a format of 1234567890, Entity Resolution will normalize this field + // in the output to (123)-456-7890. + ApplyNormalization *bool + noSmithyDocumentSerde } @@ -47,6 +53,9 @@ type GetMatchIdOutput struct { // The unique identifiers for this group of match records. MatchId *string + // The rule the record matched on. + MatchRule *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/entityresolution/api_op_GetMatchingJob.go b/service/entityresolution/api_op_GetMatchingJob.go index 11099cca9c8..5eea3398647 100644 --- a/service/entityresolution/api_op_GetMatchingJob.go +++ b/service/entityresolution/api_op_GetMatchingJob.go @@ -71,6 +71,9 @@ type GetMatchingJobOutput struct { // unique IDs generated, and records the execution skipped. Metrics *types.JobMetrics + // A list of OutputSource objects. + OutputSourceConfig []types.JobOutputSource + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/entityresolution/api_op_GetMatchingWorkflow.go b/service/entityresolution/api_op_GetMatchingWorkflow.go index 12c7e7a0d9e..da4a1466959 100644 --- a/service/entityresolution/api_op_GetMatchingWorkflow.go +++ b/service/entityresolution/api_op_GetMatchingWorkflow.go @@ -63,7 +63,7 @@ type GetMatchingWorkflowOutput struct { ResolutionTechniques *types.ResolutionTechniques // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this - // role to access resources on your behalf. + // role to access Amazon Web Services resources on your behalf. // // This member is required. RoleArn *string diff --git a/service/entityresolution/api_op_GetPolicy.go b/service/entityresolution/api_op_GetPolicy.go new file mode 100644 index 00000000000..969dec1ee1f --- /dev/null +++ b/service/entityresolution/api_op_GetPolicy.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the resource-based policy. +func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns ...func(*Options)) (*GetPolicyOutput, error) { + if params == nil { + params = &GetPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPolicy", params, optFns, c.addOperationGetPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPolicyInput struct { + + // The Amazon Resource Name (ARN) of the resource for which the policy need to be + // returned. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type GetPolicyOutput struct { + + // The Entity Resolution resource ARN. + // + // This member is required. + Arn *string + + // A unique identifier for the current revision of the policy. + // + // This member is required. + Token *string + + // The resource-based policy. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPolicy", + } +} diff --git a/service/entityresolution/api_op_GetProviderService.go b/service/entityresolution/api_op_GetProviderService.go index df9e6a5cedb..16ba4adc411 100644 --- a/service/entityresolution/api_op_GetProviderService.go +++ b/service/entityresolution/api_op_GetProviderService.go @@ -91,13 +91,22 @@ type GetProviderServiceOutput struct { // This member is required. ProviderServiceType types.ServiceType + // Input schema for the provider service. + ProviderComponentSchema *types.ProviderComponentSchema + // The definition of the provider configuration. ProviderConfigurationDefinition document.Interface + // The provider configuration required for different ID namespace types. + ProviderIdNameSpaceConfiguration *types.ProviderIdNameSpaceConfiguration + // 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 + // Provider service job configurations. + ProviderJobConfiguration document.Interface + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/entityresolution/api_op_ListIdNamespaces.go b/service/entityresolution/api_op_ListIdNamespaces.go new file mode 100644 index 00000000000..265d537d1f3 --- /dev/null +++ b/service/entityresolution/api_op_ListIdNamespaces.go @@ -0,0 +1,227 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all ID namespaces. +func (c *Client) ListIdNamespaces(ctx context.Context, params *ListIdNamespacesInput, optFns ...func(*Options)) (*ListIdNamespacesOutput, error) { + if params == nil { + params = &ListIdNamespacesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIdNamespaces", params, optFns, c.addOperationListIdNamespacesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIdNamespacesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIdNamespacesInput struct { + + // The maximum number of IdNamespace objects returned per page. + MaxResults *int32 + + // The pagination token from the previous API call. + NextToken *string + + noSmithyDocumentSerde +} + +type ListIdNamespacesOutput struct { + + // A list of IdNamespaceSummaries objects. + IdNamespaceSummaries []types.IdNamespaceSummary + + // The pagination token from the previous API call. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListIdNamespacesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListIdNamespaces{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIdNamespaces{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListIdNamespaces"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdNamespaces(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListIdNamespacesAPIClient is a client that implements the ListIdNamespaces +// operation. +type ListIdNamespacesAPIClient interface { + ListIdNamespaces(context.Context, *ListIdNamespacesInput, ...func(*Options)) (*ListIdNamespacesOutput, error) +} + +var _ ListIdNamespacesAPIClient = (*Client)(nil) + +// ListIdNamespacesPaginatorOptions is the paginator options for ListIdNamespaces +type ListIdNamespacesPaginatorOptions struct { + // The maximum number of IdNamespace 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 +} + +// ListIdNamespacesPaginator is a paginator for ListIdNamespaces +type ListIdNamespacesPaginator struct { + options ListIdNamespacesPaginatorOptions + client ListIdNamespacesAPIClient + params *ListIdNamespacesInput + nextToken *string + firstPage bool +} + +// NewListIdNamespacesPaginator returns a new ListIdNamespacesPaginator +func NewListIdNamespacesPaginator(client ListIdNamespacesAPIClient, params *ListIdNamespacesInput, optFns ...func(*ListIdNamespacesPaginatorOptions)) *ListIdNamespacesPaginator { + if params == nil { + params = &ListIdNamespacesInput{} + } + + options := ListIdNamespacesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIdNamespacesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIdNamespacesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIdNamespaces page. +func (p *ListIdNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIdNamespacesOutput, 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.ListIdNamespaces(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_opListIdNamespaces(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListIdNamespaces", + } +} diff --git a/service/entityresolution/api_op_PutPolicy.go b/service/entityresolution/api_op_PutPolicy.go new file mode 100644 index 00000000000..d3b8803b8be --- /dev/null +++ b/service/entityresolution/api_op_PutPolicy.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the resource-based policy. +func (c *Client) PutPolicy(ctx context.Context, params *PutPolicyInput, optFns ...func(*Options)) (*PutPolicyOutput, error) { + if params == nil { + params = &PutPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutPolicy", params, optFns, c.addOperationPutPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutPolicyInput struct { + + // The Amazon Resource Name (ARN) of the resource for which the policy needs to be + // updated. + // + // This member is required. + Arn *string + + // The resource-based policy. + // + // This member is required. + Policy *string + + // A unique identifier for the current revision of the policy. + Token *string + + noSmithyDocumentSerde +} + +type PutPolicyOutput struct { + + // The Entity Resolution resource ARN. + // + // This member is required. + Arn *string + + // A unique identifier for the current revision of the policy. + // + // This member is required. + Token *string + + // The resource-based policy. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpPutPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutPolicy", + } +} diff --git a/service/entityresolution/api_op_StartIdMappingJob.go b/service/entityresolution/api_op_StartIdMappingJob.go index e202ce9b44d..a84219c65fa 100644 --- a/service/entityresolution/api_op_StartIdMappingJob.go +++ b/service/entityresolution/api_op_StartIdMappingJob.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -34,6 +35,9 @@ type StartIdMappingJobInput struct { // This member is required. WorkflowName *string + // A list of OutputSource objects. + OutputSourceConfig []types.IdMappingJobOutputSource + noSmithyDocumentSerde } @@ -44,6 +48,9 @@ type StartIdMappingJobOutput struct { // This member is required. JobId *string + // A list of OutputSource objects. + OutputSourceConfig []types.IdMappingJobOutputSource + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/entityresolution/api_op_UpdateIdMappingWorkflow.go b/service/entityresolution/api_op_UpdateIdMappingWorkflow.go index 66f1945a1f6..1efea9c3922 100644 --- a/service/entityresolution/api_op_UpdateIdMappingWorkflow.go +++ b/service/entityresolution/api_op_UpdateIdMappingWorkflow.go @@ -42,14 +42,8 @@ type UpdateIdMappingWorkflowInput struct { // 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. + // role to access Amazon Web Services resources on your behalf. // // This member is required. RoleArn *string @@ -62,6 +56,10 @@ type UpdateIdMappingWorkflowInput struct { // A description of the workflow. Description *string + // A list of OutputSource objects, each of which contains fields OutputS3Path and + // KMSArn . + OutputSourceConfig []types.IdMappingWorkflowOutputSource + noSmithyDocumentSerde } @@ -78,20 +76,14 @@ type UpdateIdMappingWorkflowOutput struct { // 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. + // role to access Amazon Web Services 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 role to access Amazon Web Services resources on your behalf. // // This member is required. WorkflowArn *string @@ -104,6 +96,10 @@ type UpdateIdMappingWorkflowOutput struct { // A description of the workflow. Description *string + // A list of OutputSource objects, each of which contains fields OutputS3Path and + // KMSArn . + OutputSourceConfig []types.IdMappingWorkflowOutputSource + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/entityresolution/api_op_UpdateIdNamespace.go b/service/entityresolution/api_op_UpdateIdNamespace.go new file mode 100644 index 00000000000..ea76bd09130 --- /dev/null +++ b/service/entityresolution/api_op_UpdateIdNamespace.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates an existing ID namespace. +func (c *Client) UpdateIdNamespace(ctx context.Context, params *UpdateIdNamespaceInput, optFns ...func(*Options)) (*UpdateIdNamespaceOutput, error) { + if params == nil { + params = &UpdateIdNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateIdNamespace", params, optFns, c.addOperationUpdateIdNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateIdNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateIdNamespaceInput struct { + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + // The description of the ID namespace. + Description *string + + // Determines the properties of IdMappingWorkflow where this IdNamespace can be + // used as a Source or a Target . + IdMappingWorkflowProperties []types.IdNamespaceIdMappingWorkflowProperties + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + InputSourceConfig []types.IdNamespaceInputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access the resources defined in this IdNamespace on your behalf as part + // of a workflow run. + RoleArn *string + + noSmithyDocumentSerde +} + +type UpdateIdNamespaceOutput struct { + + // The timestamp of when the ID namespace was created. + // + // This member is required. + CreatedAt *time.Time + + // The Amazon Resource Name (ARN) of the ID namespace. + // + // This member is required. + IdNamespaceArn *string + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + // The type of ID namespace. There are two types: SOURCE and TARGET . The SOURCE + // contains configurations for sourceId data that will be processed in an ID + // mapping workflow. The TARGET contains a configuration of targetId to which all + // sourceIds will resolve to. + // + // This member is required. + Type types.IdNamespaceType + + // The timestamp of when the ID namespace was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The description of the ID namespace. + Description *string + + // Determines the properties of IdMappingWorkflow where this IdNamespace can be + // used as a Source or a Target . + IdMappingWorkflowProperties []types.IdNamespaceIdMappingWorkflowProperties + + // A list of InputSource objects, which have the fields InputSourceARN and + // SchemaName . + InputSourceConfig []types.IdNamespaceInputSource + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access the resources defined in this IdNamespace on your behalf as part + // of a workflow run. + RoleArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateIdNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateIdNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateIdNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateIdNamespace"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateIdNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIdNamespace(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateIdNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateIdNamespace", + } +} diff --git a/service/entityresolution/deserializers.go b/service/entityresolution/deserializers.go index b2dfaa83efd..8ed7406a2e5 100644 --- a/service/entityresolution/deserializers.go +++ b/service/entityresolution/deserializers.go @@ -21,14 +21,14 @@ import ( "strings" ) -type awsRestjson1_deserializeOpCreateIdMappingWorkflow struct { +type awsRestjson1_deserializeOpAddPolicyStatement struct { } -func (*awsRestjson1_deserializeOpCreateIdMappingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpAddPolicyStatement) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateIdMappingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddPolicyStatement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -42,9 +42,9 @@ func (m *awsRestjson1_deserializeOpCreateIdMappingWorkflow) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateIdMappingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddPolicyStatement(response, &metadata) } - output := &CreateIdMappingWorkflowOutput{} + output := &AddPolicyStatementOutput{} out.Result = output var buff [1024]byte @@ -65,7 +65,7 @@ func (m *awsRestjson1_deserializeOpCreateIdMappingWorkflow) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateIdMappingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAddPolicyStatementOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -78,7 +78,7 @@ func (m *awsRestjson1_deserializeOpCreateIdMappingWorkflow) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateIdMappingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddPolicyStatement(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -125,12 +125,12 @@ func awsRestjson1_deserializeOpErrorCreateIdMappingWorkflow(response *smithyhttp 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) @@ -147,7 +147,7 @@ func awsRestjson1_deserializeOpErrorCreateIdMappingWorkflow(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentCreateIdMappingWorkflowOutput(v **CreateIdMappingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAddPolicyStatementOutput(v **AddPolicyStatementOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -160,64 +160,40 @@ func awsRestjson1_deserializeOpDocumentCreateIdMappingWorkflowOutput(v **CreateI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateIdMappingWorkflowOutput + var sv *AddPolicyStatementOutput if *v == nil { - sv = &CreateIdMappingWorkflowOutput{} + sv = &AddPolicyStatementOutput{} } 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": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + return fmt.Errorf("expected VeniceGlobalArn to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "workflowArn": + case "policy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdMappingWorkflowArn to be of type string, got %T instead", value) + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) } - sv.WorkflowArn = ptr.String(jtv) + sv.Policy = ptr.String(jtv) } - case "workflowName": + case "token": 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 PolicyToken to be of type string, got %T instead", value) } - sv.WorkflowName = ptr.String(jtv) + sv.Token = ptr.String(jtv) } default: @@ -229,14 +205,14 @@ func awsRestjson1_deserializeOpDocumentCreateIdMappingWorkflowOutput(v **CreateI return nil } -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) @@ -250,9 +226,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 @@ -273,7 +249,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) @@ -286,7 +262,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)} @@ -355,7 +331,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) } @@ -368,9 +344,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 } @@ -386,23 +362,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 } @@ -410,7 +381,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) } @@ -419,7 +390,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) } @@ -442,14 +413,14 @@ func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMa return nil } -type awsRestjson1_deserializeOpCreateSchemaMapping struct { +type awsRestjson1_deserializeOpCreateIdNamespace struct { } -func (*awsRestjson1_deserializeOpCreateSchemaMapping) ID() string { +func (*awsRestjson1_deserializeOpCreateIdNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateIdNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -463,9 +434,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_deserializeOpErrorCreateIdNamespace(response, &metadata) } - output := &CreateSchemaMappingOutput{} + output := &CreateIdNamespaceOutput{} out.Result = output var buff [1024]byte @@ -486,7 +457,7 @@ func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateIdNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -499,7 +470,7 @@ func (m *awsRestjson1_deserializeOpCreateSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateIdNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -568,7 +539,7 @@ func awsRestjson1_deserializeOpErrorCreateSchemaMapping(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchemaMappingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateIdNamespaceOutput(v **CreateIdNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -581,15 +552,31 @@ func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSchemaMappingOutput + var sv *CreateIdNamespaceOutput if *v == nil { - sv = &CreateSchemaMappingOutput{} + sv = &CreateIdNamespaceOutput{} } 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 "description": if value != nil { jtv, ok := value.(string) @@ -599,27 +586,71 @@ func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchem sv.Description = ptr.String(jtv) } - case "mappedInputFields": - if err := awsRestjson1_deserializeDocumentSchemaInputAttributes(&sv.MappedInputFields, value); err != nil { + case "idMappingWorkflowProperties": + if err := awsRestjson1_deserializeDocumentIdNamespaceIdMappingWorkflowPropertiesList(&sv.IdMappingWorkflowProperties, value); err != nil { return err } - case "schemaArn": + case "idNamespaceArn": 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 IdNamespaceArn to be of type string, got %T instead", value) } - sv.SchemaArn = ptr.String(jtv) + sv.IdNamespaceArn = ptr.String(jtv) } - case "schemaName": + case "idNamespaceName": 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.IdNamespaceName = ptr.String(jtv) + } + + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdNamespaceInputSourceConfig(&sv.InputSourceConfig, 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 "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdNamespaceType to be of type string, got %T instead", value) + } + sv.Type = types.IdNamespaceType(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) + + } } default: @@ -631,14 +662,14 @@ func awsRestjson1_deserializeOpDocumentCreateSchemaMappingOutput(v **CreateSchem return nil } -type awsRestjson1_deserializeOpDeleteIdMappingWorkflow struct { +type awsRestjson1_deserializeOpCreateMatchingWorkflow struct { } -func (*awsRestjson1_deserializeOpDeleteIdMappingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpCreateMatchingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteIdMappingWorkflow) 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) @@ -652,9 +683,9 @@ func (m *awsRestjson1_deserializeOpDeleteIdMappingWorkflow) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteIdMappingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMatchingWorkflow(response, &metadata) } - output := &DeleteIdMappingWorkflowOutput{} + output := &CreateMatchingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -675,7 +706,7 @@ func (m *awsRestjson1_deserializeOpDeleteIdMappingWorkflow) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteIdMappingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -688,7 +719,7 @@ func (m *awsRestjson1_deserializeOpDeleteIdMappingWorkflow) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteIdMappingWorkflow(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)} @@ -732,6 +763,12 @@ func awsRestjson1_deserializeOpErrorDeleteIdMappingWorkflow(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) @@ -751,7 +788,7 @@ func awsRestjson1_deserializeOpErrorDeleteIdMappingWorkflow(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentDeleteIdMappingWorkflowOutput(v **DeleteIdMappingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateMatchingWorkflowOutput(v **CreateMatchingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -764,22 +801,69 @@ func awsRestjson1_deserializeOpDocumentDeleteIdMappingWorkflowOutput(v **DeleteI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteIdMappingWorkflowOutput + var sv *CreateMatchingWorkflowOutput if *v == nil { - sv = &DeleteIdMappingWorkflowOutput{} + sv = &CreateMatchingWorkflowOutput{} } 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 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.Message = ptr.String(jtv) + sv.RoleArn = ptr.String(jtv) + } + + 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: @@ -791,14 +875,14 @@ func awsRestjson1_deserializeOpDocumentDeleteIdMappingWorkflowOutput(v **DeleteI 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) @@ -812,9 +896,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 @@ -835,7 +919,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) @@ -848,7 +932,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)} @@ -892,10 +976,16 @@ func awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): + case strings.EqualFold("ExceedsLimitException", errorCode): + return awsRestjson1_deserializeErrorExceedsLimitException(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): @@ -911,7 +1001,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) } @@ -924,22 +1014,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: @@ -951,14 +1064,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) @@ -972,9 +1085,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 @@ -995,7 +1108,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) @@ -1008,7 +1121,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)} @@ -1074,7 +1187,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) } @@ -1087,9 +1200,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 } @@ -1114,14 +1227,14 @@ func awsRestjson1_deserializeOpDocumentDeleteSchemaMappingOutput(v **DeleteSchem return nil } -type awsRestjson1_deserializeOpGetIdMappingJob struct { +type awsRestjson1_deserializeOpDeleteIdNamespace struct { } -func (*awsRestjson1_deserializeOpGetIdMappingJob) ID() string { +func (*awsRestjson1_deserializeOpDeleteIdNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetIdMappingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIdNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1135,9 +1248,9 @@ func (m *awsRestjson1_deserializeOpGetIdMappingJob) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetIdMappingJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIdNamespace(response, &metadata) } - output := &GetIdMappingJobOutput{} + output := &DeleteIdNamespaceOutput{} out.Result = output var buff [1024]byte @@ -1158,7 +1271,7 @@ func (m *awsRestjson1_deserializeOpGetIdMappingJob) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteIdNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1171,7 +1284,7 @@ func (m *awsRestjson1_deserializeOpGetIdMappingJob) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetIdMappingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIdNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1218,9 +1331,6 @@ func awsRestjson1_deserializeOpErrorGetIdMappingJob(response *smithyhttp.Respons 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) @@ -1237,7 +1347,7 @@ func awsRestjson1_deserializeOpErrorGetIdMappingJob(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(v **GetIdMappingJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteIdNamespaceOutput(v **DeleteIdNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1250,73 +1360,22 @@ func awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(v **GetIdMappingJob return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetIdMappingJobOutput + var sv *DeleteIdNamespaceOutput if *v == nil { - sv = &GetIdMappingJobOutput{} + sv = &DeleteIdNamespaceOutput{} } 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": - 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 "metrics": - if err := awsRestjson1_deserializeDocumentIdMappingJobMetrics(&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": + case "message": 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 String to be of type string, got %T instead", value) } - sv.Status = types.JobStatus(jtv) + sv.Message = ptr.String(jtv) } default: @@ -1328,14 +1387,14 @@ func awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(v **GetIdMappingJob return nil } -type awsRestjson1_deserializeOpGetIdMappingWorkflow struct { +type awsRestjson1_deserializeOpDeleteMatchingWorkflow struct { } -func (*awsRestjson1_deserializeOpGetIdMappingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpDeleteMatchingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetIdMappingWorkflow) 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) @@ -1349,9 +1408,9 @@ func (m *awsRestjson1_deserializeOpGetIdMappingWorkflow) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetIdMappingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteMatchingWorkflow(response, &metadata) } - output := &GetIdMappingWorkflowOutput{} + output := &DeleteMatchingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -1372,7 +1431,7 @@ func (m *awsRestjson1_deserializeOpGetIdMappingWorkflow) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1385,7 +1444,7 @@ func (m *awsRestjson1_deserializeOpGetIdMappingWorkflow) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetIdMappingWorkflow(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)} @@ -1429,12 +1488,12 @@ func awsRestjson1_deserializeOpErrorGetIdMappingWorkflow(response *smithyhttp.Re 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) @@ -1451,7 +1510,7 @@ func awsRestjson1_deserializeOpErrorGetIdMappingWorkflow(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(v **GetIdMappingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteMatchingWorkflowOutput(v **DeleteMatchingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1464,101 +1523,22 @@ func awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(v **GetIdMappi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetIdMappingWorkflowOutput + var sv *DeleteMatchingWorkflowOutput if *v == nil { - sv = &GetIdMappingWorkflowOutput{} + sv = &DeleteMatchingWorkflowOutput{} } 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 "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 "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 IdMappingWorkflowArn to be of type string, got %T instead", value) - } - sv.WorkflowArn = ptr.String(jtv) - } - - case "workflowName": + case "message": 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.Message = ptr.String(jtv) } default: @@ -1570,14 +1550,14 @@ func awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(v **GetIdMappi return nil } -type awsRestjson1_deserializeOpGetMatchId struct { +type awsRestjson1_deserializeOpDeletePolicyStatement struct { } -func (*awsRestjson1_deserializeOpGetMatchId) ID() string { +func (*awsRestjson1_deserializeOpDeletePolicyStatement) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMatchId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePolicyStatement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1591,9 +1571,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_deserializeOpErrorDeletePolicyStatement(response, &metadata) } - output := &GetMatchIdOutput{} + output := &DeletePolicyStatementOutput{} out.Result = output var buff [1024]byte @@ -1614,7 +1594,7 @@ func (m *awsRestjson1_deserializeOpGetMatchId) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMatchIdOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeletePolicyStatementOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1627,7 +1607,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_deserializeOpErrorDeletePolicyStatement(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1671,6 +1651,9 @@ func awsRestjson1_deserializeOpErrorGetMatchId(response *smithyhttp.Response, me 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) @@ -1693,7 +1676,7 @@ func awsRestjson1_deserializeOpErrorGetMatchId(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeletePolicyStatementOutput(v **DeletePolicyStatementOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1706,22 +1689,203 @@ func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMatchIdOutput + var sv *DeletePolicyStatementOutput if *v == nil { - sv = &GetMatchIdOutput{} + sv = &DeletePolicyStatementOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "matchId": + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VeniceGlobalArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + case "token": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyToken to be of type string, got %T instead", value) + } + sv.Token = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteSchemaMapping struct { +} + +func (*awsRestjson1_deserializeOpDeleteSchemaMapping) ID() string { + return "OperationDeserializer" +} + +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) + 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_deserializeOpErrorDeleteSchemaMapping(response, &metadata) + } + output := &DeleteSchemaMappingOutput{} + 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_deserializeOpDocumentDeleteSchemaMappingOutput(&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_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)} + } + 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("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_deserializeOpDocumentDeleteSchemaMappingOutput(v **DeleteSchemaMappingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteSchemaMappingOutput + if *v == nil { + sv = &DeleteSchemaMappingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.MatchId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -1733,14 +1897,14 @@ func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, va return nil } -type awsRestjson1_deserializeOpGetMatchingJob struct { +type awsRestjson1_deserializeOpGetIdMappingJob struct { } -func (*awsRestjson1_deserializeOpGetMatchingJob) ID() string { +func (*awsRestjson1_deserializeOpGetIdMappingJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMatchingJob) 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) @@ -1754,9 +1918,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_deserializeOpErrorGetIdMappingJob(response, &metadata) } - output := &GetMatchingJobOutput{} + output := &GetIdMappingJobOutput{} out.Result = output var buff [1024]byte @@ -1777,7 +1941,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingJob) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1790,7 +1954,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingJob) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMatchingJob(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)} @@ -1856,7 +2020,7 @@ func awsRestjson1_deserializeOpErrorGetMatchingJob(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIdMappingJobOutput(v **GetIdMappingJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1869,9 +2033,9 @@ func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMatchingJobOutput + var sv *GetIdMappingJobOutput if *v == nil { - sv = &GetMatchingJobOutput{} + sv = &GetIdMappingJobOutput{} } else { sv = *v } @@ -1909,7 +2073,12 @@ func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOu } case "metrics": - if err := awsRestjson1_deserializeDocumentJobMetrics(&sv.Metrics, value); err != nil { + if err := awsRestjson1_deserializeDocumentIdMappingJobMetrics(&sv.Metrics, value); err != nil { + return err + } + + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdMappingJobOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { return err } @@ -1947,14 +2116,14 @@ func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOu return nil } -type awsRestjson1_deserializeOpGetMatchingWorkflow struct { +type awsRestjson1_deserializeOpGetIdMappingWorkflow struct { } -func (*awsRestjson1_deserializeOpGetMatchingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpGetIdMappingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) 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) @@ -1968,9 +2137,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_deserializeOpErrorGetIdMappingWorkflow(response, &metadata) } - output := &GetMatchingWorkflowOutput{} + output := &GetIdMappingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -1991,7 +2160,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2004,7 +2173,7 @@ func (m *awsRestjson1_deserializeOpGetMatchingWorkflow) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMatchingWorkflow(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)} @@ -2070,7 +2239,7 @@ func awsRestjson1_deserializeOpErrorGetMatchingWorkflow(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatchingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIdMappingWorkflowOutput(v **GetIdMappingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2083,9 +2252,9 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMatchingWorkflowOutput + var sv *GetIdMappingWorkflowOutput if *v == nil { - sv = &GetMatchingWorkflowOutput{} + sv = &GetIdMappingWorkflowOutput{} } else { sv = *v } @@ -2117,23 +2286,18 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching 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 } @@ -2141,7 +2305,7 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching 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) } @@ -2171,7 +2335,7 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching 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) } @@ -2194,14 +2358,14 @@ func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatching return nil } -type awsRestjson1_deserializeOpGetProviderService struct { +type awsRestjson1_deserializeOpGetIdNamespace struct { } -func (*awsRestjson1_deserializeOpGetProviderService) ID() string { +func (*awsRestjson1_deserializeOpGetIdNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetProviderService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIdNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2215,9 +2379,9 @@ func (m *awsRestjson1_deserializeOpGetProviderService) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetProviderService(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIdNamespace(response, &metadata) } - output := &GetProviderServiceOutput{} + output := &GetIdNamespaceOutput{} out.Result = output var buff [1024]byte @@ -2238,7 +2402,7 @@ func (m *awsRestjson1_deserializeOpGetProviderService) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIdNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2251,7 +2415,7 @@ func (m *awsRestjson1_deserializeOpGetProviderService) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetProviderService(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIdNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2317,7 +2481,7 @@ func awsRestjson1_deserializeOpErrorGetProviderService(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(v **GetProviderServiceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIdNamespaceOutput(v **GetIdNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2330,87 +2494,105 @@ func awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(v **GetProviderS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetProviderServiceOutput + var sv *GetIdNamespaceOutput if *v == nil { - sv = &GetProviderServiceOutput{} + sv = &GetIdNamespaceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "anonymizedOutput": + case "createdAt": 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) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - case "providerConfigurationDefinition": - if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderConfigurationDefinition, value); err != nil { - return err - } + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - 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 "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 "providerIntermediateDataAccessConfiguration": - if err := awsRestjson1_deserializeDocumentProviderIntermediateDataAccessConfiguration(&sv.ProviderIntermediateDataAccessConfiguration, value); err != nil { + case "idMappingWorkflowProperties": + if err := awsRestjson1_deserializeDocumentIdNamespaceIdMappingWorkflowPropertiesList(&sv.IdMappingWorkflowProperties, value); err != nil { return err } - case "providerName": + case "idNamespaceArn": 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 IdNamespaceArn to be of type string, got %T instead", value) } - sv.ProviderName = ptr.String(jtv) + sv.IdNamespaceArn = ptr.String(jtv) } - case "providerServiceArn": + case "idNamespaceName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProviderServiceArn to be of type string, got %T instead", value) + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) } - sv.ProviderServiceArn = ptr.String(jtv) + sv.IdNamespaceName = ptr.String(jtv) } - case "providerServiceDisplayName": + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdNamespaceInputSourceConfig(&sv.InputSourceConfig, value); err != nil { + return err + } + + case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProviderServiceDisplayName to be of type string, got %T instead", value) + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } - sv.ProviderServiceDisplayName = ptr.String(jtv) + sv.RoleArn = ptr.String(jtv) } - case "providerServiceName": + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "type": 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 IdNamespaceType to be of type string, got %T instead", value) } - sv.ProviderServiceName = ptr.String(jtv) + sv.Type = types.IdNamespaceType(jtv) } - case "providerServiceType": + case "updatedAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServiceType to be of type string, got %T instead", value) + 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) + } - sv.ProviderServiceType = types.ServiceType(jtv) } default: @@ -2422,14 +2604,14 @@ func awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(v **GetProviderS return nil } -type awsRestjson1_deserializeOpGetSchemaMapping struct { +type awsRestjson1_deserializeOpGetMatchId struct { } -func (*awsRestjson1_deserializeOpGetSchemaMapping) ID() string { +func (*awsRestjson1_deserializeOpGetMatchId) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSchemaMapping) 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) @@ -2443,9 +2625,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_deserializeOpErrorGetMatchId(response, &metadata) } - output := &GetSchemaMappingOutput{} + output := &GetMatchIdOutput{} out.Result = output var buff [1024]byte @@ -2466,7 +2648,7 @@ func (m *awsRestjson1_deserializeOpGetSchemaMapping) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMatchIdOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2479,7 +2661,7 @@ func (m *awsRestjson1_deserializeOpGetSchemaMapping) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSchemaMapping(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)} @@ -2545,7 +2727,7 @@ func awsRestjson1_deserializeOpErrorGetSchemaMapping(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMatchIdOutput(v **GetMatchIdOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2558,91 +2740,31 @@ func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSchemaMappingOutput + var sv *GetMatchIdOutput if *v == nil { - sv = &GetSchemaMappingOutput{} + sv = &GetMatchIdOutput{} } 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 "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 "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 "mappedInputFields": - if err := awsRestjson1_deserializeDocumentSchemaInputAttributes(&sv.MappedInputFields, value); err != nil { - return err - } - - case "schemaArn": + case "matchId": 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.MatchId = ptr.String(jtv) } - case "schemaName": + case "matchRule": 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) - } - - 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) - + return fmt.Errorf("expected String to be of type string, got %T instead", value) } + sv.MatchRule = ptr.String(jtv) } default: @@ -2654,14 +2776,14 @@ func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappi return nil } -type awsRestjson1_deserializeOpListIdMappingJobs struct { +type awsRestjson1_deserializeOpGetMatchingJob struct { } -func (*awsRestjson1_deserializeOpListIdMappingJobs) ID() string { +func (*awsRestjson1_deserializeOpGetMatchingJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIdMappingJobs) 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) @@ -2675,9 +2797,9 @@ func (m *awsRestjson1_deserializeOpListIdMappingJobs) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIdMappingJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMatchingJob(response, &metadata) } - output := &ListIdMappingJobsOutput{} + output := &GetMatchingJobOutput{} out.Result = output var buff [1024]byte @@ -2698,7 +2820,7 @@ func (m *awsRestjson1_deserializeOpListIdMappingJobs) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIdMappingJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2711,7 +2833,7 @@ func (m *awsRestjson1_deserializeOpListIdMappingJobs) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIdMappingJobs(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)} @@ -2777,7 +2899,7 @@ func awsRestjson1_deserializeOpErrorListIdMappingJobs(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListIdMappingJobsOutput(v **ListIdMappingJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMatchingJobOutput(v **GetMatchingJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2790,27 +2912,78 @@ func awsRestjson1_deserializeOpDocumentListIdMappingJobsOutput(v **ListIdMapping return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIdMappingJobsOutput + var sv *GetMatchingJobOutput if *v == nil { - sv = &ListIdMappingJobsOutput{} + sv = &GetMatchingJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobs": - if err := awsRestjson1_deserializeDocumentJobList(&sv.Jobs, value); err != nil { + 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 "nextToken": + 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 "metrics": + if err := awsRestjson1_deserializeDocumentJobMetrics(&sv.Metrics, value); err != nil { + return err + } + + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentJobOutputSourceConfig(&sv.OutputSourceConfig, 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: @@ -2822,14 +2995,14 @@ func awsRestjson1_deserializeOpDocumentListIdMappingJobsOutput(v **ListIdMapping return nil } -type awsRestjson1_deserializeOpListIdMappingWorkflows struct { +type awsRestjson1_deserializeOpGetMatchingWorkflow struct { } -func (*awsRestjson1_deserializeOpListIdMappingWorkflows) ID() string { +func (*awsRestjson1_deserializeOpGetMatchingWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIdMappingWorkflows) 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) @@ -2843,9 +3016,9 @@ func (m *awsRestjson1_deserializeOpListIdMappingWorkflows) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIdMappingWorkflows(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMatchingWorkflow(response, &metadata) } - output := &ListIdMappingWorkflowsOutput{} + output := &GetMatchingWorkflowOutput{} out.Result = output var buff [1024]byte @@ -2866,7 +3039,7 @@ func (m *awsRestjson1_deserializeOpListIdMappingWorkflows) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIdMappingWorkflowsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2879,7 +3052,7 @@ func (m *awsRestjson1_deserializeOpListIdMappingWorkflows) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIdMappingWorkflows(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)} @@ -2926,6 +3099,9 @@ func awsRestjson1_deserializeOpErrorListIdMappingWorkflows(response *smithyhttp. 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) @@ -2942,7 +3118,7 @@ func awsRestjson1_deserializeOpErrorListIdMappingWorkflows(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListIdMappingWorkflowsOutput(v **ListIdMappingWorkflowsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMatchingWorkflowOutput(v **GetMatchingWorkflowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2955,29 +3131,108 @@ func awsRestjson1_deserializeOpDocumentListIdMappingWorkflowsOutput(v **ListIdMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIdMappingWorkflowsOutput + var sv *GetMatchingWorkflowOutput if *v == nil { - sv = &ListIdMappingWorkflowsOutput{} + 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 "workflowSummaries": - if err := awsRestjson1_deserializeDocumentIdMappingWorkflowList(&sv.WorkflowSummaries, 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 @@ -2987,14 +3242,14 @@ func awsRestjson1_deserializeOpDocumentListIdMappingWorkflowsOutput(v **ListIdMa return nil } -type awsRestjson1_deserializeOpListMatchingJobs struct { +type awsRestjson1_deserializeOpGetPolicy struct { } -func (*awsRestjson1_deserializeOpListMatchingJobs) ID() string { +func (*awsRestjson1_deserializeOpGetPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3008,9 +3263,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_deserializeOpErrorGetPolicy(response, &metadata) } - output := &ListMatchingJobsOutput{} + output := &GetPolicyOutput{} out.Result = output var buff [1024]byte @@ -3031,7 +3286,7 @@ func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3044,7 +3299,7 @@ func (m *awsRestjson1_deserializeOpListMatchingJobs) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMatchingJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3110,7 +3365,7 @@ func awsRestjson1_deserializeOpErrorListMatchingJobs(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPolicyOutput(v **GetPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3123,27 +3378,40 @@ func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMatchingJobsOutput + var sv *GetPolicyOutput if *v == nil { - sv = &ListMatchingJobsOutput{} + sv = &GetPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobs": - if err := awsRestjson1_deserializeDocumentJobList(&sv.Jobs, value); err != nil { - return err + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VeniceGlobalArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "nextToken": + case "policy": 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 PolicyDocument to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Policy = ptr.String(jtv) + } + + case "token": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyToken to be of type string, got %T instead", value) + } + sv.Token = ptr.String(jtv) } default: @@ -3155,14 +3423,14 @@ func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJo return nil } -type awsRestjson1_deserializeOpListMatchingWorkflows struct { +type awsRestjson1_deserializeOpGetProviderService struct { } -func (*awsRestjson1_deserializeOpListMatchingWorkflows) ID() string { +func (*awsRestjson1_deserializeOpGetProviderService) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMatchingWorkflows) 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) @@ -3176,9 +3444,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_deserializeOpErrorGetProviderService(response, &metadata) } - output := &ListMatchingWorkflowsOutput{} + output := &GetProviderServiceOutput{} out.Result = output var buff [1024]byte @@ -3199,7 +3467,7 @@ func (m *awsRestjson1_deserializeOpListMatchingWorkflows) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3212,7 +3480,7 @@ func (m *awsRestjson1_deserializeOpListMatchingWorkflows) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMatchingWorkflows(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)} @@ -3259,6 +3527,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) @@ -3275,7 +3546,7 @@ func awsRestjson1_deserializeOpErrorListMatchingWorkflows(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatchingWorkflowsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetProviderServiceOutput(v **GetProviderServiceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3288,29 +3559,104 @@ func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatch return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMatchingWorkflowsOutput + var sv *GetProviderServiceOutput if *v == nil { - sv = &ListMatchingWorkflowsOutput{} + sv = &GetProviderServiceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "anonymizedOutput": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.AnonymizedOutput = ptr.Bool(jtv) } - case "workflowSummaries": - if err := awsRestjson1_deserializeDocumentMatchingWorkflowList(&sv.WorkflowSummaries, value); err != nil { + case "providerComponentSchema": + if err := awsRestjson1_deserializeDocumentProviderComponentSchema(&sv.ProviderComponentSchema, value); err != nil { + return err + } + + 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 "providerIdNameSpaceConfiguration": + if err := awsRestjson1_deserializeDocumentProviderIdNameSpaceConfiguration(&sv.ProviderIdNameSpaceConfiguration, value); err != nil { return err } + case "providerIntermediateDataAccessConfiguration": + if err := awsRestjson1_deserializeDocumentProviderIntermediateDataAccessConfiguration(&sv.ProviderIntermediateDataAccessConfiguration, value); err != nil { + return err + } + + case "providerJobConfiguration": + if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderJobConfiguration, 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 @@ -3320,14 +3666,14 @@ func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatch return nil } -type awsRestjson1_deserializeOpListProviderServices struct { +type awsRestjson1_deserializeOpGetSchemaMapping struct { } -func (*awsRestjson1_deserializeOpListProviderServices) ID() string { +func (*awsRestjson1_deserializeOpGetSchemaMapping) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProviderServices) 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) @@ -3341,9 +3687,9 @@ func (m *awsRestjson1_deserializeOpListProviderServices) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProviderServices(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSchemaMapping(response, &metadata) } - output := &ListProviderServicesOutput{} + output := &GetSchemaMappingOutput{} out.Result = output var buff [1024]byte @@ -3364,7 +3710,7 @@ func (m *awsRestjson1_deserializeOpListProviderServices) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProviderServicesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3377,7 +3723,7 @@ func (m *awsRestjson1_deserializeOpListProviderServices) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProviderServices(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)} @@ -3424,6 +3770,9 @@ func awsRestjson1_deserializeOpErrorListProviderServices(response *smithyhttp.Re 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) @@ -3440,7 +3789,7 @@ func awsRestjson1_deserializeOpErrorListProviderServices(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListProviderServicesOutput(v **ListProviderServicesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSchemaMappingOutput(v **GetSchemaMappingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3453,29 +3802,93 @@ func awsRestjson1_deserializeOpDocumentListProviderServicesOutput(v **ListProvid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProviderServicesOutput + var sv *GetSchemaMappingOutput if *v == nil { - sv = &ListProviderServicesOutput{} + sv = &GetSchemaMappingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "createdAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + 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) + } - sv.NextToken = ptr.String(jtv) } - case "providerServiceSummaries": - if err := awsRestjson1_deserializeDocumentProviderServiceList(&sv.ProviderServiceSummaries, value); err != nil { + 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 "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 "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) + } + + 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 @@ -3485,14 +3898,14 @@ func awsRestjson1_deserializeOpDocumentListProviderServicesOutput(v **ListProvid return nil } -type awsRestjson1_deserializeOpListSchemaMappings struct { +type awsRestjson1_deserializeOpListIdMappingJobs struct { } -func (*awsRestjson1_deserializeOpListSchemaMappings) ID() string { +func (*awsRestjson1_deserializeOpListIdMappingJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -3506,9 +3919,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_deserializeOpErrorListIdMappingJobs(response, &metadata) } - output := &ListSchemaMappingsOutput{} + output := &ListIdMappingJobsOutput{} out.Result = output var buff [1024]byte @@ -3529,7 +3942,7 @@ func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIdMappingJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3542,7 +3955,7 @@ func (m *awsRestjson1_deserializeOpListSchemaMappings) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSchemaMappings(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)} @@ -3589,6 +4002,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) @@ -3605,7 +4021,7 @@ func awsRestjson1_deserializeOpErrorListSchemaMappings(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMappingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIdMappingJobsOutput(v **ListIdMappingJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3618,15 +4034,20 @@ func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSchemaMappingsOutput + var sv *ListIdMappingJobsOutput if *v == nil { - sv = &ListSchemaMappingsOutput{} + 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) @@ -3636,11 +4057,6 @@ func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMa sv.NextToken = ptr.String(jtv) } - case "schemaList": - if err := awsRestjson1_deserializeDocumentSchemaMappingList(&sv.SchemaList, value); err != nil { - return err - } - default: _, _ = key, value @@ -3650,14 +4066,14 @@ func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMa return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListIdMappingWorkflows struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListIdMappingWorkflows) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) 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) @@ -3671,9 +4087,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_deserializeOpErrorListIdMappingWorkflows(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListIdMappingWorkflowsOutput{} out.Result = output var buff [1024]byte @@ -3694,7 +4110,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIdMappingWorkflowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3707,7 +4123,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(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)} @@ -3748,11 +4164,14 @@ 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) @@ -3767,7 +4186,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIdMappingWorkflowsOutput(v **ListIdMappingWorkflowsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3780,17 +4199,26 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListIdMappingWorkflowsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListIdMappingWorkflowsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + 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 } @@ -3803,14 +4231,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpStartIdMappingJob struct { +type awsRestjson1_deserializeOpListIdNamespaces struct { } -func (*awsRestjson1_deserializeOpStartIdMappingJob) ID() string { +func (*awsRestjson1_deserializeOpListIdNamespaces) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartIdMappingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIdNamespaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3824,9 +4252,9 @@ func (m *awsRestjson1_deserializeOpStartIdMappingJob) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartIdMappingJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIdNamespaces(response, &metadata) } - output := &StartIdMappingJobOutput{} + output := &ListIdNamespacesOutput{} out.Result = output var buff [1024]byte @@ -3847,7 +4275,7 @@ func (m *awsRestjson1_deserializeOpStartIdMappingJob) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartIdMappingJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIdNamespacesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3860,7 +4288,7 @@ func (m *awsRestjson1_deserializeOpStartIdMappingJob) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartIdMappingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIdNamespaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3904,18 +4332,9 @@ func awsRestjson1_deserializeOpErrorStartIdMappingJob(response *smithyhttp.Respo 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) @@ -3932,7 +4351,7 @@ func awsRestjson1_deserializeOpErrorStartIdMappingJob(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentStartIdMappingJobOutput(v **StartIdMappingJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIdNamespacesOutput(v **ListIdNamespacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3945,22 +4364,27 @@ func awsRestjson1_deserializeOpDocumentStartIdMappingJobOutput(v **StartIdMappin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartIdMappingJobOutput + var sv *ListIdNamespacesOutput if *v == nil { - sv = &StartIdMappingJobOutput{} + sv = &ListIdNamespacesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobId": + case "idNamespaceSummaries": + if err := awsRestjson1_deserializeDocumentIdNamespaceList(&sv.IdNamespaceSummaries, value); err != nil { + return err + } + + case "nextToken": 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 NextToken to be of type string, got %T instead", value) } - sv.JobId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -3972,14 +4396,14 @@ func awsRestjson1_deserializeOpDocumentStartIdMappingJobOutput(v **StartIdMappin return nil } -type awsRestjson1_deserializeOpStartMatchingJob struct { +type awsRestjson1_deserializeOpListMatchingJobs struct { } -func (*awsRestjson1_deserializeOpStartMatchingJob) ID() string { +func (*awsRestjson1_deserializeOpListMatchingJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartMatchingJob) 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) @@ -3993,9 +4417,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_deserializeOpErrorListMatchingJobs(response, &metadata) } - output := &StartMatchingJobOutput{} + output := &ListMatchingJobsOutput{} out.Result = output var buff [1024]byte @@ -4016,7 +4440,7 @@ func (m *awsRestjson1_deserializeOpStartMatchingJob) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4029,7 +4453,7 @@ func (m *awsRestjson1_deserializeOpStartMatchingJob) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartMatchingJob(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)} @@ -4073,12 +4497,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) @@ -4101,7 +4519,7 @@ func awsRestjson1_deserializeOpErrorStartMatchingJob(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(v **StartMatchingJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListMatchingJobsOutput(v **ListMatchingJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4114,22 +4532,27 @@ func awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(v **StartMatchingJ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartMatchingJobOutput + var sv *ListMatchingJobsOutput if *v == nil { - sv = &StartMatchingJobOutput{} + sv = &ListMatchingJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobId": + 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 JobId to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.JobId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -4141,14 +4564,14 @@ func awsRestjson1_deserializeOpDocumentStartMatchingJobOutput(v **StartMatchingJ return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpListMatchingWorkflows struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpListMatchingWorkflows) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -4162,15 +4585,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_deserializeOpErrorListMatchingWorkflows(response, &metadata) } - output := &TagResourceOutput{} + output := &ListMatchingWorkflowsOutput{} 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_deserializeOpDocumentListMatchingWorkflowsOutput(&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_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)} @@ -4211,11 +4662,14 @@ 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) @@ -4230,100 +4684,59 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -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) +func awsRestjson1_deserializeOpDocumentListMatchingWorkflowsOutput(v **ListMatchingWorkflowsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - 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)} + if value == nil { + return nil } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - 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 + var sv *ListMatchingWorkflowsOutput + if *v == nil { + sv = &ListMatchingWorkflowsOutput{} + } else { + sv = *v } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + 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) + } - switch { - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case "workflowSummaries": + if err := awsRestjson1_deserializeDocumentMatchingWorkflowList(&sv.WorkflowSummaries, value); err != nil { + return err + } - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpUpdateIdMappingWorkflow struct { +type awsRestjson1_deserializeOpListProviderServices struct { } -func (*awsRestjson1_deserializeOpUpdateIdMappingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpListProviderServices) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateIdMappingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -4337,9 +4750,9 @@ func (m *awsRestjson1_deserializeOpUpdateIdMappingWorkflow) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateIdMappingWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProviderServices(response, &metadata) } - output := &UpdateIdMappingWorkflowOutput{} + output := &ListProviderServicesOutput{} out.Result = output var buff [1024]byte @@ -4360,7 +4773,7 @@ func (m *awsRestjson1_deserializeOpUpdateIdMappingWorkflow) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateIdMappingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProviderServicesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4373,7 +4786,7 @@ func (m *awsRestjson1_deserializeOpUpdateIdMappingWorkflow) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateIdMappingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -4420,9 +4833,6 @@ func awsRestjson1_deserializeOpErrorUpdateIdMappingWorkflow(response *smithyhttp 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) @@ -4439,7 +4849,7 @@ func awsRestjson1_deserializeOpErrorUpdateIdMappingWorkflow(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentUpdateIdMappingWorkflowOutput(v **UpdateIdMappingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProviderServicesOutput(v **ListProviderServicesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4452,66 +4862,29 @@ func awsRestjson1_deserializeOpDocumentUpdateIdMappingWorkflowOutput(v **UpdateI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateIdMappingWorkflowOutput + var sv *ListProviderServicesOutput if *v == nil { - sv = &UpdateIdMappingWorkflowOutput{} + sv = &ListProviderServicesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "description": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken 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 + sv.NextToken = ptr.String(jtv) } - case "outputSourceConfig": - if err := awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { + case "providerServiceSummaries": + if err := awsRestjson1_deserializeDocumentProviderServiceList(&sv.ProviderServiceSummaries, 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 @@ -4521,14 +4894,14 @@ func awsRestjson1_deserializeOpDocumentUpdateIdMappingWorkflowOutput(v **UpdateI return nil } -type awsRestjson1_deserializeOpUpdateMatchingWorkflow struct { +type awsRestjson1_deserializeOpListSchemaMappings struct { } -func (*awsRestjson1_deserializeOpUpdateMatchingWorkflow) ID() string { +func (*awsRestjson1_deserializeOpListSchemaMappings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -4542,9 +4915,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_deserializeOpErrorListSchemaMappings(response, &metadata) } - output := &UpdateMatchingWorkflowOutput{} + output := &ListSchemaMappingsOutput{} out.Result = output var buff [1024]byte @@ -4565,7 +4938,7 @@ func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4578,7 +4951,7 @@ func (m *awsRestjson1_deserializeOpUpdateMatchingWorkflow) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateMatchingWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -4625,9 +4998,6 @@ func awsRestjson1_deserializeOpErrorUpdateMatchingWorkflow(response *smithyhttp. 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) @@ -4644,7 +5014,7 @@ func awsRestjson1_deserializeOpErrorUpdateMatchingWorkflow(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(v **UpdateMatchingWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSchemaMappingsOutput(v **ListSchemaMappingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4657,62 +5027,29 @@ func awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(v **UpdateMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateMatchingWorkflowOutput + var sv *ListSchemaMappingsOutput if *v == nil { - sv = &UpdateMatchingWorkflowOutput{} + sv = &ListSchemaMappingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "description": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken 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 + sv.NextToken = ptr.String(jtv) } - case "resolutionTechniques": - if err := awsRestjson1_deserializeDocumentResolutionTechniques(&sv.ResolutionTechniques, value); err != nil { + case "schemaList": + if err := awsRestjson1_deserializeDocumentSchemaMappingList(&sv.SchemaList, 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 @@ -4722,14 +5059,14 @@ func awsRestjson1_deserializeOpDocumentUpdateMatchingWorkflowOutput(v **UpdateMa return nil } -type awsRestjson1_deserializeOpUpdateSchemaMapping struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpUpdateSchemaMapping) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSchemaMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -4743,9 +5080,9 @@ func (m *awsRestjson1_deserializeOpUpdateSchemaMapping) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSchemaMapping(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &UpdateSchemaMappingOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -4766,7 +5103,7 @@ func (m *awsRestjson1_deserializeOpUpdateSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateSchemaMappingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4779,7 +5116,1509 @@ func (m *awsRestjson1_deserializeOpUpdateSchemaMapping) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateSchemaMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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_deserializeOpPutPolicy struct { +} + +func (*awsRestjson1_deserializeOpPutPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutPolicy) HandleDeserialize(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_deserializeOpErrorPutPolicy(response, &metadata) + } + output := &PutPolicyOutput{} + 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_deserializeOpDocumentPutPolicyOutput(&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_deserializeOpErrorPutPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentPutPolicyOutput(v **PutPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutPolicyOutput + if *v == nil { + sv = &PutPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VeniceGlobalArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + case "token": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyToken to be of type string, got %T instead", value) + } + sv.Token = ptr.String(jtv) + } + + 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) + } + + case "outputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdMappingJobOutputSourceConfig(&sv.OutputSourceConfig, value); err != nil { + return err + } + + 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_deserializeOpUpdateIdNamespace struct { +} + +func (*awsRestjson1_deserializeOpUpdateIdNamespace) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateIdNamespace) HandleDeserialize(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_deserializeOpErrorUpdateIdNamespace(response, &metadata) + } + output := &UpdateIdNamespaceOutput{} + 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_deserializeOpDocumentUpdateIdNamespaceOutput(&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_deserializeOpErrorUpdateIdNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentUpdateIdNamespaceOutput(v **UpdateIdNamespaceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateIdNamespaceOutput + if *v == nil { + sv = &UpdateIdNamespaceOutput{} + } 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 "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 "idMappingWorkflowProperties": + if err := awsRestjson1_deserializeDocumentIdNamespaceIdMappingWorkflowPropertiesList(&sv.IdMappingWorkflowProperties, value); err != nil { + return err + } + + case "idNamespaceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdNamespaceArn to be of type string, got %T instead", value) + } + sv.IdNamespaceArn = ptr.String(jtv) + } + + case "idNamespaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.IdNamespaceName = ptr.String(jtv) + } + + case "inputSourceConfig": + if err := awsRestjson1_deserializeDocumentIdNamespaceInputSourceConfig(&sv.InputSourceConfig, 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 "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdNamespaceType to be of type string, got %T instead", value) + } + sv.Type = types.IdNamespaceType(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) + + } + } + + 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)} @@ -5275,11 +7114,275 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti } } - *v = sv + *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_deserializeDocumentIdMappingJobOutputSource(v **types.IdMappingJobOutputSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IdMappingJobOutputSource + if *v == nil { + sv = &types.IdMappingJobOutputSource{} + } 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) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdMappingJobOutputSourceConfig(v *[]types.IdMappingJobOutputSource, 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.IdMappingJobOutputSource + if *v == nil { + cv = []types.IdMappingJobOutputSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdMappingJobOutputSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdMappingJobOutputSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv return nil } -func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { +func awsRestjson1_deserializeDocumentIdMappingTechniques(v **types.IdMappingTechniques, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5292,22 +7395,27 @@ func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ErrorDetails + var sv *types.IdMappingTechniques if *v == nil { - sv = &types.ErrorDetails{} + sv = &types.IdMappingTechniques{} } else { sv = *v } for key, value := range shape { switch key { - case "errorMessage": + case "idMappingType": 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 IdMappingType to be of type string, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.IdMappingType = types.IdMappingType(jtv) + } + + case "providerProperties": + if err := awsRestjson1_deserializeDocumentProviderProperties(&sv.ProviderProperties, value); err != nil { + return err } default: @@ -5319,7 +7427,7 @@ func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value return nil } -func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimitException, value interface{}) error { +func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSource(v **types.IdMappingWorkflowInputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5332,44 +7440,40 @@ func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ExceedsLimitException + var sv *types.IdMappingWorkflowInputSource if *v == nil { - sv = &types.ExceedsLimitException{} + sv = &types.IdMappingWorkflowInputSource{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + 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 "quotaName": + case "schemaName": 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 EntityName to be of type string, got %T instead", value) } - sv.QuotaName = ptr.String(jtv) + sv.SchemaName = ptr.String(jtv) } - case "quotaValue": + case "type": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected IdNamespaceType to be of type string, got %T instead", value) } - sv.QuotaValue = ptr.Int32(int32(i64)) + sv.Type = types.IdNamespaceType(jtv) } default: @@ -5381,7 +7485,7 @@ func awsRestjson1_deserializeDocumentExceedsLimitException(v **types.ExceedsLimi return nil } -func awsRestjson1_deserializeDocumentIdMappingJobMetrics(v **types.IdMappingJobMetrics, value interface{}) error { +func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSourceConfig(v *[]types.IdMappingWorkflowInputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5389,69 +7493,67 @@ func awsRestjson1_deserializeDocumentIdMappingJobMetrics(v **types.IdMappingJobM 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.IdMappingJobMetrics + var cv []types.IdMappingWorkflowInputSource if *v == nil { - sv = &types.IdMappingJobMetrics{} + cv = []types.IdMappingWorkflowInputSource{} } 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)) - } + 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) - 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)) - } + } + *v = cv + return nil +} - 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)) - } +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 + } - default: - _, _ = key, value + 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 = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentIdMappingTechniques(v **types.IdMappingTechniques, value interface{}) error { +func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSource(v **types.IdMappingWorkflowOutputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5464,27 +7566,31 @@ func awsRestjson1_deserializeDocumentIdMappingTechniques(v **types.IdMappingTech return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdMappingTechniques + var sv *types.IdMappingWorkflowOutputSource if *v == nil { - sv = &types.IdMappingTechniques{} + sv = &types.IdMappingWorkflowOutputSource{} } else { sv = *v } for key, value := range shape { switch key { - case "idMappingType": + case "KMSArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdMappingType to be of type string, got %T instead", value) + return fmt.Errorf("expected KMSArn to be of type string, got %T instead", value) } - sv.IdMappingType = types.IdMappingType(jtv) + sv.KMSArn = ptr.String(jtv) } - case "providerProperties": - if err := awsRestjson1_deserializeDocumentProviderProperties(&sv.ProviderProperties, value); err != nil { - return err + 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: @@ -5496,7 +7602,41 @@ func awsRestjson1_deserializeDocumentIdMappingTechniques(v **types.IdMappingTech return nil } -func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSource(v **types.IdMappingWorkflowInputSource, value interface{}) error { +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) } @@ -5509,31 +7649,63 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSource(v **types.IdMa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdMappingWorkflowInputSource + var sv *types.IdMappingWorkflowSummary if *v == nil { - sv = &types.IdMappingWorkflowInputSource{} + sv = &types.IdMappingWorkflowSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "inputSourceARN": + 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 String to be of type string, got %T instead", value) + return fmt.Errorf("expected IdMappingWorkflowArn to be of type string, got %T instead", value) } - sv.InputSourceARN = ptr.String(jtv) + sv.WorkflowArn = ptr.String(jtv) } - case "schemaName": + 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: @@ -5545,7 +7717,7 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSource(v **types.IdMa return nil } -func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSourceConfig(v *[]types.IdMappingWorkflowInputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentIdNamespaceIdMappingWorkflowProperties(v **types.IdNamespaceIdMappingWorkflowProperties, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5553,33 +7725,44 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowInputSourceConfig(v *[]typ 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.IdMappingWorkflowInputSource + var sv *types.IdNamespaceIdMappingWorkflowProperties if *v == nil { - cv = []types.IdMappingWorkflowInputSource{} + sv = &types.IdNamespaceIdMappingWorkflowProperties{} } else { - cv = *v + sv = *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) + 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_deserializeDocumentNamespaceProviderProperties(&sv.ProviderProperties, value); err != nil { + return err + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentIdMappingWorkflowList(v *[]types.IdMappingWorkflowSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentIdNamespaceIdMappingWorkflowPropertiesList(v *[]types.IdNamespaceIdMappingWorkflowProperties, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5592,17 +7775,17 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowList(v *[]types.IdMappingW return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.IdMappingWorkflowSummary + var cv []types.IdNamespaceIdMappingWorkflowProperties if *v == nil { - cv = []types.IdMappingWorkflowSummary{} + cv = []types.IdNamespaceIdMappingWorkflowProperties{} } else { cv = *v } for _, value := range shape { - var col types.IdMappingWorkflowSummary + var col types.IdNamespaceIdMappingWorkflowProperties destAddr := &col - if err := awsRestjson1_deserializeDocumentIdMappingWorkflowSummary(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentIdNamespaceIdMappingWorkflowProperties(&destAddr, value); err != nil { return err } col = *destAddr @@ -5613,7 +7796,7 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowList(v *[]types.IdMappingW return nil } -func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSource(v **types.IdMappingWorkflowOutputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentIdNamespaceInputSource(v **types.IdNamespaceInputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5626,31 +7809,31 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSource(v **types.IdM return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdMappingWorkflowOutputSource + var sv *types.IdNamespaceInputSource if *v == nil { - sv = &types.IdMappingWorkflowOutputSource{} + sv = &types.IdNamespaceInputSource{} } else { sv = *v } for key, value := range shape { switch key { - case "KMSArn": + case "inputSourceARN": 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 String to be of type string, got %T instead", value) } - sv.KMSArn = ptr.String(jtv) + sv.InputSourceARN = ptr.String(jtv) } - case "outputS3Path": + case "schemaName": 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.SchemaName = ptr.String(jtv) } default: @@ -5662,7 +7845,7 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSource(v **types.IdM return nil } -func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(v *[]types.IdMappingWorkflowOutputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentIdNamespaceInputSourceConfig(v *[]types.IdNamespaceInputSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5675,17 +7858,17 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(v *[]ty return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.IdMappingWorkflowOutputSource + var cv []types.IdNamespaceInputSource if *v == nil { - cv = []types.IdMappingWorkflowOutputSource{} + cv = []types.IdNamespaceInputSource{} } else { cv = *v } for _, value := range shape { - var col types.IdMappingWorkflowOutputSource + var col types.IdNamespaceInputSource destAddr := &col - if err := awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSource(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentIdNamespaceInputSource(&destAddr, value); err != nil { return err } col = *destAddr @@ -5696,7 +7879,41 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowOutputSourceConfig(v *[]ty return nil } -func awsRestjson1_deserializeDocumentIdMappingWorkflowSummary(v **types.IdMappingWorkflowSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentIdNamespaceList(v *[]types.IdNamespaceSummary, 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.IdNamespaceSummary + if *v == nil { + cv = []types.IdNamespaceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdNamespaceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdNamespaceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIdNamespaceSummary(v **types.IdNamespaceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5709,9 +7926,9 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowSummary(v **types.IdMappin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdMappingWorkflowSummary + var sv *types.IdNamespaceSummary if *v == nil { - sv = &types.IdMappingWorkflowSummary{} + sv = &types.IdNamespaceSummary{} } else { sv = *v } @@ -5734,38 +7951,56 @@ func awsRestjson1_deserializeDocumentIdMappingWorkflowSummary(v **types.IdMappin } } - case "updatedAt": + case "description": 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 Description to be of type string, got %T instead", value) } + sv.Description = ptr.String(jtv) } - case "workflowArn": + case "idNamespaceArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdMappingWorkflowArn to be of type string, got %T instead", value) + return fmt.Errorf("expected IdNamespaceArn to be of type string, got %T instead", value) } - sv.WorkflowArn = ptr.String(jtv) + sv.IdNamespaceArn = ptr.String(jtv) } - case "workflowName": + case "idNamespaceName": 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.IdNamespaceName = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdNamespaceType to be of type string, got %T instead", value) + } + sv.Type = types.IdNamespaceType(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) + + } } default: @@ -6106,6 +8341,98 @@ func awsRestjson1_deserializeDocumentJobMetrics(v **types.JobMetrics, value inte return nil } +func awsRestjson1_deserializeDocumentJobOutputSource(v **types.JobOutputSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.JobOutputSource + if *v == nil { + sv = &types.JobOutputSource{} + } 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) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentJobOutputSourceConfig(v *[]types.JobOutputSource, 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.JobOutputSource + if *v == nil { + cv = []types.JobOutputSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.JobOutputSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentJobOutputSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentJobSummary(v **types.JobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6317,25 +8644,70 @@ func awsRestjson1_deserializeDocumentMatchingWorkflowSummary(v **types.MatchingW 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 + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNamespaceProviderProperties(v **types.NamespaceProviderProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.NamespaceProviderProperties + if *v == nil { + sv = &types.NamespaceProviderProperties{} + } else { + sv = *v + } - 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) + for key, value := range shape { + switch key { + case "providerConfiguration": + if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderConfiguration, value); err != nil { + return err } - case "workflowName": + case "providerServiceArn": 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 ProviderServiceArn to be of type string, got %T instead", value) } - sv.WorkflowName = ptr.String(jtv) + sv.ProviderServiceArn = ptr.String(jtv) } default: @@ -6527,6 +8899,47 @@ func awsRestjson1_deserializeDocumentOutputSourceConfig(v *[]types.OutputSource, return nil } +func awsRestjson1_deserializeDocumentProviderComponentSchema(v **types.ProviderComponentSchema, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProviderComponentSchema + if *v == nil { + sv = &types.ProviderComponentSchema{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "providerSchemaAttributes": + if err := awsRestjson1_deserializeDocumentProviderSchemaAttributes(&sv.ProviderSchemaAttributes, value); err != nil { + return err + } + + case "schemas": + if err := awsRestjson1_deserializeDocumentSchemas(&sv.Schemas, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentProviderEndpointConfiguration(v *types.ProviderEndpointConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6567,6 +8980,56 @@ loop: return nil } +func awsRestjson1_deserializeDocumentProviderIdNameSpaceConfiguration(v **types.ProviderIdNameSpaceConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProviderIdNameSpaceConfiguration + if *v == nil { + sv = &types.ProviderIdNameSpaceConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "providerSourceConfigurationDefinition": + if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderSourceConfigurationDefinition, value); err != nil { + return err + } + + case "providerTargetConfigurationDefinition": + if err := awsRestjson1_deserializeDocumentDocument(&sv.ProviderTargetConfigurationDefinition, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentProviderIntermediateDataAccessConfiguration(v **types.ProviderIntermediateDataAccessConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6725,6 +9188,107 @@ func awsRestjson1_deserializeDocumentProviderProperties(v **types.ProviderProper return nil } +func awsRestjson1_deserializeDocumentProviderSchemaAttribute(v **types.ProviderSchemaAttribute, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProviderSchemaAttribute + if *v == nil { + sv = &types.ProviderSchemaAttribute{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fieldName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeName to be of type string, got %T instead", value) + } + sv.FieldName = ptr.String(jtv) + } + + case "hashing": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Hashing = ptr.Bool(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) + if !ok { + return fmt.Errorf("expected SchemaAttributeType to be of type string, got %T instead", value) + } + sv.Type = types.SchemaAttributeType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentProviderSchemaAttributes(v *[]types.ProviderSchemaAttribute, 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.ProviderSchemaAttribute + if *v == nil { + cv = []types.ProviderSchemaAttribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProviderSchemaAttribute + destAddr := &col + if err := awsRestjson1_deserializeDocumentProviderSchemaAttribute(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentProviderServiceList(v *[]types.ProviderServiceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7195,6 +9759,42 @@ func awsRestjson1_deserializeDocumentSchemaInputAttributes(v *[]types.SchemaInpu return nil } +func awsRestjson1_deserializeDocumentSchemaList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSchemaMappingList(v *[]types.SchemaMappingSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7319,6 +9919,38 @@ func awsRestjson1_deserializeDocumentSchemaMappingSummary(v **types.SchemaMappin return nil } +func awsRestjson1_deserializeDocumentSchemas(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 err := awsRestjson1_deserializeDocumentSchemaList(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/entityresolution/generated.json b/service/entityresolution/generated.json index 7fc8856702c..735cbc0c712 100644 --- a/service/entityresolution/generated.json +++ b/service/entityresolution/generated.json @@ -8,31 +8,40 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AddPolicyStatement.go", "api_op_CreateIdMappingWorkflow.go", + "api_op_CreateIdNamespace.go", "api_op_CreateMatchingWorkflow.go", "api_op_CreateSchemaMapping.go", "api_op_DeleteIdMappingWorkflow.go", + "api_op_DeleteIdNamespace.go", "api_op_DeleteMatchingWorkflow.go", + "api_op_DeletePolicyStatement.go", "api_op_DeleteSchemaMapping.go", "api_op_GetIdMappingJob.go", "api_op_GetIdMappingWorkflow.go", + "api_op_GetIdNamespace.go", "api_op_GetMatchId.go", "api_op_GetMatchingJob.go", "api_op_GetMatchingWorkflow.go", + "api_op_GetPolicy.go", "api_op_GetProviderService.go", "api_op_GetSchemaMapping.go", "api_op_ListIdMappingJobs.go", "api_op_ListIdMappingWorkflows.go", + "api_op_ListIdNamespaces.go", "api_op_ListMatchingJobs.go", "api_op_ListMatchingWorkflows.go", "api_op_ListProviderServices.go", "api_op_ListSchemaMappings.go", "api_op_ListTagsForResource.go", + "api_op_PutPolicy.go", "api_op_StartIdMappingJob.go", "api_op_StartMatchingJob.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateIdMappingWorkflow.go", + "api_op_UpdateIdNamespace.go", "api_op_UpdateMatchingWorkflow.go", "api_op_UpdateSchemaMapping.go", "auth.go", diff --git a/service/entityresolution/serializers.go b/service/entityresolution/serializers.go index 813f293c4db..de6d7aae5b2 100644 --- a/service/entityresolution/serializers.go +++ b/service/entityresolution/serializers.go @@ -16,6 +16,122 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpAddPolicyStatement struct { +} + +func (*awsRestjson1_serializeOpAddPolicyStatement) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddPolicyStatement) 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.(*AddPolicyStatementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/policies/{arn}/{statementId}") + 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_serializeOpHttpBindingsAddPolicyStatementInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAddPolicyStatementInput(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_serializeOpHttpBindingsAddPolicyStatementInput(v *AddPolicyStatementInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn == nil || len(*v.Arn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member arn must not be empty")} + } + if v.Arn != nil { + if err := encoder.SetURI("arn").String(*v.Arn); err != nil { + return err + } + } + + if v.StatementId == nil || len(*v.StatementId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member statementId must not be empty")} + } + if v.StatementId != nil { + if err := encoder.SetURI("statementId").String(*v.StatementId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddPolicyStatementInput(v *AddPolicyStatementInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Action != nil { + ok := object.Key("action") + if err := awsRestjson1_serializeDocumentStatementActionList(v.Action, ok); err != nil { + return err + } + } + + if v.Condition != nil { + ok := object.Key("condition") + ok.String(*v.Condition) + } + + if len(v.Effect) > 0 { + ok := object.Key("effect") + ok.String(string(v.Effect)) + } + + if v.Principal != nil { + ok := object.Key("principal") + if err := awsRestjson1_serializeDocumentStatementPrincipalList(v.Principal, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateIdMappingWorkflow struct { } @@ -129,6 +245,117 @@ func awsRestjson1_serializeOpDocumentCreateIdMappingWorkflowInput(v *CreateIdMap return nil } +type awsRestjson1_serializeOpCreateIdNamespace struct { +} + +func (*awsRestjson1_serializeOpCreateIdNamespace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateIdNamespace) 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.(*CreateIdNamespaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idnamespaces") + 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_serializeOpDocumentCreateIdNamespaceInput(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_serializeOpHttpBindingsCreateIdNamespaceInput(v *CreateIdNamespaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateIdNamespaceInput(v *CreateIdNamespaceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.IdMappingWorkflowProperties != nil { + ok := object.Key("idMappingWorkflowProperties") + if err := awsRestjson1_serializeDocumentIdNamespaceIdMappingWorkflowPropertiesList(v.IdMappingWorkflowProperties, ok); err != nil { + return err + } + } + + if v.IdNamespaceName != nil { + ok := object.Key("idNamespaceName") + ok.String(*v.IdNamespaceName) + } + + if v.InputSourceConfig != nil { + ok := object.Key("inputSourceConfig") + if err := awsRestjson1_serializeDocumentIdNamespaceInputSourceConfig(v.InputSourceConfig, 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 len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + type awsRestjson1_serializeOpCreateMatchingWorkflow struct { } @@ -391,7 +618,137 @@ func (m *awsRestjson1_serializeOpDeleteIdMappingWorkflow) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteIdMappingWorkflowInput(v *DeleteIdMappingWorkflowInput, 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) + } + + 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_serializeOpDeleteIdNamespace struct { +} + +func (*awsRestjson1_serializeOpDeleteIdNamespace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteIdNamespace) 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.(*DeleteIdNamespaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idnamespaces/{idNamespaceName}") + 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_serializeOpHttpBindingsDeleteIdNamespaceInput(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_serializeOpHttpBindingsDeleteIdNamespaceInput(v *DeleteIdNamespaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IdNamespaceName == nil || len(*v.IdNamespaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member idNamespaceName must not be empty")} + } + if v.IdNamespaceName != nil { + if err := encoder.SetURI("idNamespaceName").String(*v.IdNamespaceName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteMatchingWorkflow struct { +} + +func (*awsRestjson1_serializeOpDeleteMatchingWorkflow) ID() string { + return "OperationSerializer" +} + +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) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + 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("/matchingworkflows/{workflowName}") + 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_serializeOpHttpBindingsDeleteMatchingWorkflowInput(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_serializeOpHttpBindingsDeleteMatchingWorkflowInput(v *DeleteMatchingWorkflowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -408,14 +765,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteIdMappingWorkflowInput(v *DeleteI return nil } -type awsRestjson1_serializeOpDeleteMatchingWorkflow struct { +type awsRestjson1_serializeOpDeletePolicyStatement struct { } -func (*awsRestjson1_serializeOpDeleteMatchingWorkflow) ID() string { +func (*awsRestjson1_serializeOpDeletePolicyStatement) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteMatchingWorkflow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeletePolicyStatement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -423,13 +780,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.(*DeletePolicyStatementInput) _ = 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("/policies/{arn}/{statementId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -445,7 +802,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_serializeOpHttpBindingsDeletePolicyStatementInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -456,16 +813,25 @@ func (m *awsRestjson1_serializeOpDeleteMatchingWorkflow) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteMatchingWorkflowInput(v *DeleteMatchingWorkflowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeletePolicyStatementInput(v *DeletePolicyStatementInput, 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.Arn == nil || len(*v.Arn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member arn must not be empty")} } - if v.WorkflowName != nil { - if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + if v.Arn != nil { + if err := encoder.SetURI("arn").String(*v.Arn); err != nil { + return err + } + } + + if v.StatementId == nil || len(*v.StatementId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member statementId must not be empty")} + } + if v.StatementId != nil { + if err := encoder.SetURI("statementId").String(*v.StatementId); err != nil { return err } } @@ -677,6 +1043,71 @@ func awsRestjson1_serializeOpHttpBindingsGetIdMappingWorkflowInput(v *GetIdMappi return nil } +type awsRestjson1_serializeOpGetIdNamespace struct { +} + +func (*awsRestjson1_serializeOpGetIdNamespace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetIdNamespace) 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.(*GetIdNamespaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idnamespaces/{idNamespaceName}") + 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_serializeOpHttpBindingsGetIdNamespaceInput(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_serializeOpHttpBindingsGetIdNamespaceInput(v *GetIdNamespaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IdNamespaceName == nil || len(*v.IdNamespaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member idNamespaceName must not be empty")} + } + if v.IdNamespaceName != nil { + if err := encoder.SetURI("idNamespaceName").String(*v.IdNamespaceName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetMatchId struct { } @@ -757,6 +1188,11 @@ func awsRestjson1_serializeOpDocumentGetMatchIdInput(v *GetMatchIdInput, value s object := value.Object() defer object.Close() + if v.ApplyNormalization != nil { + ok := object.Key("applyNormalization") + ok.Boolean(*v.ApplyNormalization) + } + if v.Record != nil { ok := object.Key("record") if err := awsRestjson1_serializeDocumentRecordAttributeMap(v.Record, ok); err != nil { @@ -906,6 +1342,71 @@ func awsRestjson1_serializeOpHttpBindingsGetMatchingWorkflowInput(v *GetMatching return nil } +type awsRestjson1_serializeOpGetPolicy struct { +} + +func (*awsRestjson1_serializeOpGetPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPolicy) 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.(*GetPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/policies/{arn}") + 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_serializeOpHttpBindingsGetPolicyInput(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_serializeOpHttpBindingsGetPolicyInput(v *GetPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn == nil || len(*v.Arn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member arn must not be empty")} + } + if v.Arn != nil { + if err := encoder.SetURI("arn").String(*v.Arn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetProviderService struct { } @@ -1182,6 +1683,70 @@ func awsRestjson1_serializeOpHttpBindingsListIdMappingWorkflowsInput(v *ListIdMa return nil } +type awsRestjson1_serializeOpListIdNamespaces struct { +} + +func (*awsRestjson1_serializeOpListIdNamespaces) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListIdNamespaces) 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.(*ListIdNamespacesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idnamespaces") + 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_serializeOpHttpBindingsListIdNamespacesInput(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_serializeOpHttpBindingsListIdNamespacesInput(v *ListIdNamespacesInput, 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 { } @@ -1504,11 +2069,87 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor 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 || 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 +} + +type awsRestjson1_serializeOpPutPolicy struct { +} + +func (*awsRestjson1_serializeOpPutPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutPolicy) 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.(*PutPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/policies/{arn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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_serializeOpHttpBindingsPutPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutPolicyInput(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_serializeOpHttpBindingsPutPolicyInput(v *PutPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn == nil || len(*v.Arn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member arn must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + if v.Arn != nil { + if err := encoder.SetURI("arn").String(*v.Arn); err != nil { return err } } @@ -1516,6 +2157,23 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } +func awsRestjson1_serializeOpDocumentPutPolicyInput(v *PutPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Policy != nil { + ok := object.Key("policy") + ok.String(*v.Policy) + } + + if v.Token != nil { + ok := object.Key("token") + ok.String(*v.Token) + } + + return nil +} + type awsRestjson1_serializeOpStartIdMappingJob struct { } @@ -1557,6 +2215,17 @@ func (m *awsRestjson1_serializeOpStartIdMappingJob) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartIdMappingJobInput(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} } @@ -1581,6 +2250,20 @@ func awsRestjson1_serializeOpHttpBindingsStartIdMappingJobInput(v *StartIdMappin return nil } +func awsRestjson1_serializeOpDocumentStartIdMappingJobInput(v *StartIdMappingJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OutputSourceConfig != nil { + ok := object.Key("outputSourceConfig") + if err := awsRestjson1_serializeDocumentIdMappingJobOutputSourceConfig(v.OutputSourceConfig, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpStartMatchingJob struct { } @@ -1921,6 +2604,113 @@ func awsRestjson1_serializeOpDocumentUpdateIdMappingWorkflowInput(v *UpdateIdMap return nil } +type awsRestjson1_serializeOpUpdateIdNamespace struct { +} + +func (*awsRestjson1_serializeOpUpdateIdNamespace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateIdNamespace) 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.(*UpdateIdNamespaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/idnamespaces/{idNamespaceName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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_serializeOpHttpBindingsUpdateIdNamespaceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateIdNamespaceInput(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_serializeOpHttpBindingsUpdateIdNamespaceInput(v *UpdateIdNamespaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IdNamespaceName == nil || len(*v.IdNamespaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member idNamespaceName must not be empty")} + } + if v.IdNamespaceName != nil { + if err := encoder.SetURI("idNamespaceName").String(*v.IdNamespaceName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateIdNamespaceInput(v *UpdateIdNamespaceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.IdMappingWorkflowProperties != nil { + ok := object.Key("idMappingWorkflowProperties") + if err := awsRestjson1_serializeDocumentIdNamespaceIdMappingWorkflowPropertiesList(v.IdMappingWorkflowProperties, ok); err != nil { + return err + } + } + + if v.InputSourceConfig != nil { + ok := object.Key("inputSourceConfig") + if err := awsRestjson1_serializeDocumentIdNamespaceInputSourceConfig(v.InputSourceConfig, ok); err != nil { + return err + } + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + return nil +} + type awsRestjson1_serializeOpUpdateMatchingWorkflow struct { } @@ -2137,6 +2927,41 @@ func awsRestjson1_serializeOpDocumentUpdateSchemaMappingInput(v *UpdateSchemaMap return nil } +func awsRestjson1_serializeDocumentIdMappingJobOutputSource(v *types.IdMappingJobOutputSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KMSArn != nil { + ok := object.Key("KMSArn") + ok.String(*v.KMSArn) + } + + if v.OutputS3Path != nil { + ok := object.Key("outputS3Path") + ok.String(*v.OutputS3Path) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentIdMappingJobOutputSourceConfig(v []types.IdMappingJobOutputSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIdMappingJobOutputSource(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentIdMappingTechniques(v *types.IdMappingTechniques, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2170,6 +2995,11 @@ func awsRestjson1_serializeDocumentIdMappingWorkflowInputSource(v *types.IdMappi ok.String(*v.SchemaName) } + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + return nil } @@ -2216,6 +3046,68 @@ func awsRestjson1_serializeDocumentIdMappingWorkflowOutputSourceConfig(v []types return nil } +func awsRestjson1_serializeDocumentIdNamespaceIdMappingWorkflowProperties(v *types.IdNamespaceIdMappingWorkflowProperties, 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.ProviderProperties != nil { + ok := object.Key("providerProperties") + if err := awsRestjson1_serializeDocumentNamespaceProviderProperties(v.ProviderProperties, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIdNamespaceIdMappingWorkflowPropertiesList(v []types.IdNamespaceIdMappingWorkflowProperties, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIdNamespaceIdMappingWorkflowProperties(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentIdNamespaceInputSource(v *types.IdNamespaceInputSource, 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_serializeDocumentIdNamespaceInputSourceConfig(v []types.IdNamespaceInputSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIdNamespaceInputSource(&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() @@ -2286,6 +3178,25 @@ func awsRestjson1_serializeDocumentMatchingKeys(v []string, value smithyjson.Val return nil } +func awsRestjson1_serializeDocumentNamespaceProviderProperties(v *types.NamespaceProviderProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + 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_serializeDocumentOutputAttribute(v *types.OutputAttribute, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2517,6 +3428,28 @@ func awsRestjson1_serializeDocumentSchemaInputAttributes(v []types.SchemaInputAt return nil } +func awsRestjson1_serializeDocumentStatementActionList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentStatementPrincipalList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/entityresolution/snapshot_test.go b/service/entityresolution/snapshot_test.go index 02bc33986e0..c20e19e5b7e 100644 --- a/service/entityresolution/snapshot_test.go +++ b/service/entityresolution/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_AddPolicyStatement(t *testing.T) { + svc := New(Options{}) + _, err := svc.AddPolicyStatement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AddPolicyStatement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateIdMappingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIdMappingWorkflow(context.Background(), nil, func(o *Options) { @@ -74,6 +86,18 @@ func TestCheckSnapshot_CreateIdMappingWorkflow(t *testing.T) { } } +func TestCheckSnapshot_CreateIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateMatchingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateMatchingWorkflow(context.Background(), nil, func(o *Options) { @@ -110,6 +134,18 @@ func TestCheckSnapshot_DeleteIdMappingWorkflow(t *testing.T) { } } +func TestCheckSnapshot_DeleteIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteMatchingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteMatchingWorkflow(context.Background(), nil, func(o *Options) { @@ -122,6 +158,18 @@ func TestCheckSnapshot_DeleteMatchingWorkflow(t *testing.T) { } } +func TestCheckSnapshot_DeletePolicyStatement(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeletePolicyStatement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeletePolicyStatement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteSchemaMapping(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteSchemaMapping(context.Background(), nil, func(o *Options) { @@ -158,6 +206,18 @@ func TestCheckSnapshot_GetIdMappingWorkflow(t *testing.T) { } } +func TestCheckSnapshot_GetIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetMatchId(t *testing.T) { svc := New(Options{}) _, err := svc.GetMatchId(context.Background(), nil, func(o *Options) { @@ -194,6 +254,18 @@ func TestCheckSnapshot_GetMatchingWorkflow(t *testing.T) { } } +func TestCheckSnapshot_GetPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetProviderService(t *testing.T) { svc := New(Options{}) _, err := svc.GetProviderService(context.Background(), nil, func(o *Options) { @@ -242,6 +314,18 @@ func TestCheckSnapshot_ListIdMappingWorkflows(t *testing.T) { } } +func TestCheckSnapshot_ListIdNamespaces(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListIdNamespaces(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListIdNamespaces") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListMatchingJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListMatchingJobs(context.Background(), nil, func(o *Options) { @@ -302,6 +386,18 @@ func TestCheckSnapshot_ListTagsForResource(t *testing.T) { } } +func TestCheckSnapshot_PutPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "PutPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartIdMappingJob(t *testing.T) { svc := New(Options{}) _, err := svc.StartIdMappingJob(context.Background(), nil, func(o *Options) { @@ -362,6 +458,18 @@ func TestCheckSnapshot_UpdateIdMappingWorkflow(t *testing.T) { } } +func TestCheckSnapshot_UpdateIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateMatchingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateMatchingWorkflow(context.Background(), nil, func(o *Options) { @@ -385,6 +493,18 @@ func TestCheckSnapshot_UpdateSchemaMapping(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_AddPolicyStatement(t *testing.T) { + svc := New(Options{}) + _, err := svc.AddPolicyStatement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AddPolicyStatement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateIdMappingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIdMappingWorkflow(context.Background(), nil, func(o *Options) { @@ -397,6 +517,18 @@ func TestUpdateSnapshot_CreateIdMappingWorkflow(t *testing.T) { } } +func TestUpdateSnapshot_CreateIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateMatchingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateMatchingWorkflow(context.Background(), nil, func(o *Options) { @@ -433,6 +565,18 @@ func TestUpdateSnapshot_DeleteIdMappingWorkflow(t *testing.T) { } } +func TestUpdateSnapshot_DeleteIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteMatchingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteMatchingWorkflow(context.Background(), nil, func(o *Options) { @@ -445,6 +589,18 @@ func TestUpdateSnapshot_DeleteMatchingWorkflow(t *testing.T) { } } +func TestUpdateSnapshot_DeletePolicyStatement(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeletePolicyStatement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeletePolicyStatement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteSchemaMapping(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteSchemaMapping(context.Background(), nil, func(o *Options) { @@ -481,6 +637,18 @@ func TestUpdateSnapshot_GetIdMappingWorkflow(t *testing.T) { } } +func TestUpdateSnapshot_GetIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetMatchId(t *testing.T) { svc := New(Options{}) _, err := svc.GetMatchId(context.Background(), nil, func(o *Options) { @@ -517,6 +685,18 @@ func TestUpdateSnapshot_GetMatchingWorkflow(t *testing.T) { } } +func TestUpdateSnapshot_GetPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetProviderService(t *testing.T) { svc := New(Options{}) _, err := svc.GetProviderService(context.Background(), nil, func(o *Options) { @@ -565,6 +745,18 @@ func TestUpdateSnapshot_ListIdMappingWorkflows(t *testing.T) { } } +func TestUpdateSnapshot_ListIdNamespaces(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListIdNamespaces(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListIdNamespaces") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListMatchingJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListMatchingJobs(context.Background(), nil, func(o *Options) { @@ -625,6 +817,18 @@ func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { } } +func TestUpdateSnapshot_PutPolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutPolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "PutPolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartIdMappingJob(t *testing.T) { svc := New(Options{}) _, err := svc.StartIdMappingJob(context.Background(), nil, func(o *Options) { @@ -685,6 +889,18 @@ func TestUpdateSnapshot_UpdateIdMappingWorkflow(t *testing.T) { } } +func TestUpdateSnapshot_UpdateIdNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateIdNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateIdNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateMatchingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateMatchingWorkflow(context.Background(), nil, func(o *Options) { diff --git a/service/entityresolution/types/enums.go b/service/entityresolution/types/enums.go index 7362c3fb0f1..121e6336d5b 100644 --- a/service/entityresolution/types/enums.go +++ b/service/entityresolution/types/enums.go @@ -36,6 +36,24 @@ func (IdMappingType) Values() []IdMappingType { } } +type IdNamespaceType string + +// Enum values for IdNamespaceType +const ( + IdNamespaceTypeSource IdNamespaceType = "SOURCE" + IdNamespaceTypeTarget IdNamespaceType = "TARGET" +) + +// Values returns all known values for IdNamespaceType. 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 (IdNamespaceType) Values() []IdNamespaceType { + return []IdNamespaceType{ + "SOURCE", + "TARGET", + } +} + type IncrementalRunType string // Enum values for IncrementalRunType @@ -165,3 +183,21 @@ func (ServiceType) Values() []ServiceType { "ID_MAPPING", } } + +type StatementEffect string + +// Enum values for StatementEffect +const ( + StatementEffectAllow StatementEffect = "Allow" + StatementEffectDeny StatementEffect = "Deny" +) + +// Values returns all known values for StatementEffect. 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 (StatementEffect) Values() []StatementEffect { + return []StatementEffect{ + "Allow", + "Deny", + } +} diff --git a/service/entityresolution/types/types.go b/service/entityresolution/types/types.go index e26114d47cc..805362ddec2 100644 --- a/service/entityresolution/types/types.go +++ b/service/entityresolution/types/types.go @@ -33,6 +33,28 @@ type IdMappingJobMetrics struct { noSmithyDocumentSerde } +// An object containing KMSArn , OutputS3Path , and RoleARN . +type IdMappingJobOutputSource struct { + + // The S3 path to which Entity Resolution will write the output table. + // + // This member is required. + OutputS3Path *string + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access Amazon Web Services resources on your behalf as part of workflow + // execution. + // + // This member is required. + RoleArn *string + + // Customer KMS ARN for encryption at rest. If not provided, system will use an + // Entity Resolution managed KMS key. + KMSArn *string + + noSmithyDocumentSerde +} + // An object which defines the ID mapping techniques and provider configurations. type IdMappingTechniques struct { @@ -43,26 +65,28 @@ type IdMappingTechniques struct { // 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 . +// An object containing InputSourceARN , SchemaName , and Type . type IdMappingWorkflowInputSource struct { - // An Gluetable ARN for the input source table. + // An Glue table 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 + // The type of ID namespace. There are two types: SOURCE and TARGET . The SOURCE + // contains configurations for sourceId data that will be processed in an ID + // mapping workflow. The TARGET contains a configuration of targetId to which all + // sourceIds will resolve to. + Type IdNamespaceType + noSmithyDocumentSerde } @@ -109,6 +133,72 @@ type IdMappingWorkflowSummary struct { noSmithyDocumentSerde } +// An object containing IdMappingType and ProviderProperties . +type IdNamespaceIdMappingWorkflowProperties struct { + + // The type of ID mapping. + // + // This member is required. + IdMappingType IdMappingType + + // An object which defines any additional configurations required by the provider + // service. + ProviderProperties *NamespaceProviderProperties + + noSmithyDocumentSerde +} + +// An object containing InputSourceARN and SchemaName . +type IdNamespaceInputSource struct { + + // An Glue table ARN for the input source table. + // + // This member is required. + InputSourceARN *string + + // The name of the schema. + SchemaName *string + + noSmithyDocumentSerde +} + +// A summary of ID namespaces. +type IdNamespaceSummary struct { + + // The timestamp of when the ID namespace was created. + // + // This member is required. + CreatedAt *time.Time + + // The Amazon Resource Name (ARN) of the ID namespace. + // + // This member is required. + IdNamespaceArn *string + + // The name of the ID namespace. + // + // This member is required. + IdNamespaceName *string + + // The type of ID namespace. There are two types: SOURCE and TARGET . The SOURCE + // contains configurations for sourceId data that will be processed in an ID + // mapping workflow. The TARGET contains a configuration of targetId to which all + // sourceIds will resolve to. + // + // This member is required. + Type IdNamespaceType + + // The timestamp of when the ID namespace was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The description of the ID namespace. + Description *string + + noSmithyDocumentSerde +} + // An object which defines an incremental run type and has only incrementalRunType // as a field. type IncrementalRunConfig struct { @@ -173,6 +263,28 @@ type JobMetrics struct { noSmithyDocumentSerde } +// An object containing KMSArn , OutputS3Path , and RoleArn . +type JobOutputSource struct { + + // The S3 path to which Entity Resolution will write the output table. + // + // This member is required. + OutputS3Path *string + + // The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this + // role to access Amazon Web Services resources on your behalf as part of workflow + // execution. + // + // This member is required. + RoleArn *string + + // Customer KMS ARN for encryption at rest. If not provided, system will use an + // Entity Resolution managed KMS key. + KMSArn *string + + noSmithyDocumentSerde +} + // An object containing the JobId , Status , StartTime , and EndTime of a job. type JobSummary struct { @@ -231,6 +343,21 @@ type MatchingWorkflowSummary struct { noSmithyDocumentSerde } +// An object containing ProviderConfiguration and ProviderServiceArn . +type NamespaceProviderProperties struct { + + // The Amazon Resource Name (ARN) of the provider service. + // + // This member is required. + ProviderServiceArn *string + + // An object which defines any additional configurations required by the provider + // service. + ProviderConfiguration document.Interface + + noSmithyDocumentSerde +} + // A list of OutputAttribute objects, each of which have the fields Name and Hashed // . Each of these objects selects a column to be included in the output table, and // whether the values of the column should be hashed. @@ -278,6 +405,18 @@ type OutputSource struct { noSmithyDocumentSerde } +// The input schema supported by provider service. +type ProviderComponentSchema struct { + + // The provider schema attributes. + ProviderSchemaAttributes []ProviderSchemaAttribute + + // Input schema for the provider service. + Schemas [][]string + + noSmithyDocumentSerde +} + // The required configuration fields to use with the provider service. // // The following types satisfy this interface: @@ -297,6 +436,21 @@ type ProviderEndpointConfigurationMemberMarketplaceConfiguration struct { func (*ProviderEndpointConfigurationMemberMarketplaceConfiguration) isProviderEndpointConfiguration() { } +// The provider configuration required for different ID namespace types. +type ProviderIdNameSpaceConfiguration struct { + + // The description of the ID namespace. + Description *string + + // Configurations required for the source ID namespace. + ProviderSourceConfigurationDefinition document.Interface + + // Configurations required for the target ID namespace. + ProviderTargetConfigurationDefinition document.Interface + + noSmithyDocumentSerde +} + // The required configuration fields to give intermediate access to a provider // service. type ProviderIntermediateDataAccessConfiguration struct { @@ -356,6 +510,28 @@ type ProviderProperties struct { noSmithyDocumentSerde } +// The provider schema attribute. +type ProviderSchemaAttribute struct { + + // The field name. + // + // This member is required. + FieldName *string + + // The type of the provider schema attribute. + // + // This member is required. + Type SchemaAttributeType + + // The hashing attribute of the provider schema. + Hashing *bool + + // The sub type of the provider schema attribute. + SubType *string + + noSmithyDocumentSerde +} + // A list of ProviderService objects, each of which contain the fields providerName // , providerServiceArn , providerServiceName , and providerServiceType . type ProviderServiceSummary struct { @@ -392,8 +568,8 @@ type ProviderServiceSummary struct { // An object which defines the resolutionType and the ruleBasedProperties . type ResolutionTechniques struct { - // The type of matching. There are two types of matching: RULE_MATCHING and - // ML_MATCHING . + // The type of matching. There are three types of matching: RULE_MATCHING , + // ML_MATCHING , and PROVIDER . // // This member is required. ResolutionType ResolutionType @@ -451,7 +627,7 @@ type RuleBasedProperties struct { noSmithyDocumentSerde } -// An object containing FieldName , Type , GroupName , and MatchKey . +// An object containing FieldName , Type , GroupName , MatchKey , and SubType . type SchemaInputAttribute struct { // A string containing the field name. @@ -464,19 +640,20 @@ type SchemaInputAttribute struct { // This member is required. Type SchemaAttributeType - // Instruct Entity Resolution to combine several columns into a unified column - // with the identical attribute type. For example, when working with columns such - // as first_name, middle_name, and last_name, assigning them a common GroupName - // will prompt Entity Resolution to concatenate them into a single value. + // A string that instructs Entity Resolution to combine several columns into a + // unified column with the identical attribute type. For example, when working with + // columns such as first_name , middle_name , and last_name , assigning them a + // common groupName will prompt Entity Resolution to concatenate them into a + // single value. GroupName *string // 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 - // 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. + // group. For example, consider a scenario where the source table contains various + // addresses, such as business_address and shipping_address . By assigning a + // matchKey called 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. diff --git a/service/entityresolution/validators.go b/service/entityresolution/validators.go index 5d9a15a8d8b..8481ffb3590 100644 --- a/service/entityresolution/validators.go +++ b/service/entityresolution/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAddPolicyStatement struct { +} + +func (*validateOpAddPolicyStatement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddPolicyStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddPolicyStatementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddPolicyStatementInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateIdMappingWorkflow struct { } @@ -30,6 +50,26 @@ func (m *validateOpCreateIdMappingWorkflow) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpCreateIdNamespace struct { +} + +func (*validateOpCreateIdNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateIdNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateIdNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateIdNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateMatchingWorkflow struct { } @@ -90,6 +130,26 @@ func (m *validateOpDeleteIdMappingWorkflow) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDeleteIdNamespace struct { +} + +func (*validateOpDeleteIdNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIdNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIdNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIdNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteMatchingWorkflow struct { } @@ -110,6 +170,26 @@ func (m *validateOpDeleteMatchingWorkflow) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeletePolicyStatement struct { +} + +func (*validateOpDeletePolicyStatement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePolicyStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePolicyStatementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePolicyStatementInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteSchemaMapping struct { } @@ -170,6 +250,26 @@ func (m *validateOpGetIdMappingWorkflow) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpGetIdNamespace struct { +} + +func (*validateOpGetIdNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetIdNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetIdNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetIdNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetMatchId struct { } @@ -230,6 +330,26 @@ func (m *validateOpGetMatchingWorkflow) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetPolicy struct { +} + +func (*validateOpGetPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetProviderService struct { } @@ -330,6 +450,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpPutPolicy struct { +} + +func (*validateOpPutPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartIdMappingJob struct { } @@ -430,6 +570,26 @@ func (m *validateOpUpdateIdMappingWorkflow) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpUpdateIdNamespace struct { +} + +func (*validateOpUpdateIdNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateIdNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateIdNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateIdNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateMatchingWorkflow struct { } @@ -470,10 +630,18 @@ func (m *validateOpUpdateSchemaMapping) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +func addOpAddPolicyStatementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddPolicyStatement{}, middleware.After) +} + func addOpCreateIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIdMappingWorkflow{}, middleware.After) } +func addOpCreateIdNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateIdNamespace{}, middleware.After) +} + func addOpCreateMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMatchingWorkflow{}, middleware.After) } @@ -486,10 +654,18 @@ func addOpDeleteIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDeleteIdMappingWorkflow{}, middleware.After) } +func addOpDeleteIdNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIdNamespace{}, middleware.After) +} + func addOpDeleteMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMatchingWorkflow{}, middleware.After) } +func addOpDeletePolicyStatementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePolicyStatement{}, middleware.After) +} + func addOpDeleteSchemaMappingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSchemaMapping{}, middleware.After) } @@ -502,6 +678,10 @@ func addOpGetIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpGetIdMappingWorkflow{}, middleware.After) } +func addOpGetIdNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetIdNamespace{}, middleware.After) +} + func addOpGetMatchIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMatchId{}, middleware.After) } @@ -514,6 +694,10 @@ func addOpGetMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetMatchingWorkflow{}, middleware.After) } +func addOpGetPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPolicy{}, middleware.After) +} + func addOpGetProviderServiceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetProviderService{}, middleware.After) } @@ -534,6 +718,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpPutPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutPolicy{}, middleware.After) +} + func addOpStartIdMappingJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartIdMappingJob{}, middleware.After) } @@ -554,6 +742,10 @@ func addOpUpdateIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpUpdateIdMappingWorkflow{}, middleware.After) } +func addOpUpdateIdNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateIdNamespace{}, middleware.After) +} + func addOpUpdateMatchingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMatchingWorkflow{}, middleware.After) } @@ -562,6 +754,41 @@ func addOpUpdateSchemaMappingValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpUpdateSchemaMapping{}, middleware.After) } +func validateIdMappingJobOutputSource(v *types.IdMappingJobOutputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdMappingJobOutputSource"} + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if v.OutputS3Path == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputS3Path")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdMappingJobOutputSourceConfig(v []types.IdMappingJobOutputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdMappingJobOutputSourceConfig"} + for i := range v { + if err := validateIdMappingJobOutputSource(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIdMappingTechniques(v *types.IdMappingTechniques) error { if v == nil { return nil @@ -570,9 +797,7 @@ func validateIdMappingTechniques(v *types.IdMappingTechniques) error { 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 v.ProviderProperties != nil { if err := validateProviderProperties(v.ProviderProperties); err != nil { invalidParams.AddNested("ProviderProperties", err.(smithy.InvalidParamsError)) } @@ -592,9 +817,6 @@ func validateIdMappingWorkflowInputSource(v *types.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 { @@ -651,6 +873,75 @@ func validateIdMappingWorkflowOutputSourceConfig(v []types.IdMappingWorkflowOutp } } +func validateIdNamespaceIdMappingWorkflowProperties(v *types.IdNamespaceIdMappingWorkflowProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdNamespaceIdMappingWorkflowProperties"} + if len(v.IdMappingType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("IdMappingType")) + } + if v.ProviderProperties != nil { + if err := validateNamespaceProviderProperties(v.ProviderProperties); err != nil { + invalidParams.AddNested("ProviderProperties", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdNamespaceIdMappingWorkflowPropertiesList(v []types.IdNamespaceIdMappingWorkflowProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdNamespaceIdMappingWorkflowPropertiesList"} + for i := range v { + if err := validateIdNamespaceIdMappingWorkflowProperties(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdNamespaceInputSource(v *types.IdNamespaceInputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdNamespaceInputSource"} + if v.InputSourceARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("InputSourceARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdNamespaceInputSourceConfig(v []types.IdNamespaceInputSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdNamespaceInputSourceConfig"} + for i := range v { + if err := validateIdNamespaceInputSource(&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 @@ -701,6 +992,21 @@ func validateIntermediateSourceConfiguration(v *types.IntermediateSourceConfigur } } +func validateNamespaceProviderProperties(v *types.NamespaceProviderProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NamespaceProviderProperties"} + if v.ProviderServiceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProviderServiceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOutputAttribute(v *types.OutputAttribute) error { if v == nil { return nil @@ -909,6 +1215,33 @@ func validateSchemaInputAttributes(v []types.SchemaInputAttribute) error { } } +func validateOpAddPolicyStatementInput(v *AddPolicyStatementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddPolicyStatementInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.StatementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatementId")) + } + if len(v.Effect) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Effect")) + } + if v.Action == nil { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if v.Principal == nil { + invalidParams.Add(smithy.NewErrParamRequired("Principal")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateIdMappingWorkflowInput(v *CreateIdMappingWorkflowInput) error { if v == nil { return nil @@ -924,9 +1257,7 @@ func validateOpCreateIdMappingWorkflowInput(v *CreateIdMappingWorkflowInput) err invalidParams.AddNested("InputSourceConfig", err.(smithy.InvalidParamsError)) } } - if v.OutputSourceConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("OutputSourceConfig")) - } else if v.OutputSourceConfig != nil { + if v.OutputSourceConfig != nil { if err := validateIdMappingWorkflowOutputSourceConfig(v.OutputSourceConfig); err != nil { invalidParams.AddNested("OutputSourceConfig", err.(smithy.InvalidParamsError)) } @@ -948,6 +1279,34 @@ func validateOpCreateIdMappingWorkflowInput(v *CreateIdMappingWorkflowInput) err } } +func validateOpCreateIdNamespaceInput(v *CreateIdNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateIdNamespaceInput"} + if v.IdNamespaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdNamespaceName")) + } + if v.InputSourceConfig != nil { + if err := validateIdNamespaceInputSourceConfig(v.InputSourceConfig); err != nil { + invalidParams.AddNested("InputSourceConfig", err.(smithy.InvalidParamsError)) + } + } + if v.IdMappingWorkflowProperties != nil { + if err := validateIdNamespaceIdMappingWorkflowPropertiesList(v.IdMappingWorkflowProperties); err != nil { + invalidParams.AddNested("IdMappingWorkflowProperties", err.(smithy.InvalidParamsError)) + } + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateMatchingWorkflowInput(v *CreateMatchingWorkflowInput) error { if v == nil { return nil @@ -1024,6 +1383,21 @@ func validateOpDeleteIdMappingWorkflowInput(v *DeleteIdMappingWorkflowInput) err } } +func validateOpDeleteIdNamespaceInput(v *DeleteIdNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIdNamespaceInput"} + if v.IdNamespaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdNamespaceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteMatchingWorkflowInput(v *DeleteMatchingWorkflowInput) error { if v == nil { return nil @@ -1039,6 +1413,24 @@ func validateOpDeleteMatchingWorkflowInput(v *DeleteMatchingWorkflowInput) error } } +func validateOpDeletePolicyStatementInput(v *DeletePolicyStatementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyStatementInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.StatementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatementId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteSchemaMappingInput(v *DeleteSchemaMappingInput) error { if v == nil { return nil @@ -1087,6 +1479,21 @@ func validateOpGetIdMappingWorkflowInput(v *GetIdMappingWorkflowInput) error { } } +func validateOpGetIdNamespaceInput(v *GetIdNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetIdNamespaceInput"} + if v.IdNamespaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdNamespaceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetMatchIdInput(v *GetMatchIdInput) error { if v == nil { return nil @@ -1138,6 +1545,21 @@ func validateOpGetMatchingWorkflowInput(v *GetMatchingWorkflowInput) error { } } +func validateOpGetPolicyInput(v *GetPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPolicyInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetProviderServiceInput(v *GetProviderServiceInput) error { if v == nil { return nil @@ -1216,6 +1638,24 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpPutPolicyInput(v *PutPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutPolicyInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartIdMappingJobInput(v *StartIdMappingJobInput) error { if v == nil { return nil @@ -1224,6 +1664,11 @@ func validateOpStartIdMappingJobInput(v *StartIdMappingJobInput) error { if v.WorkflowName == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) } + if v.OutputSourceConfig != nil { + if err := validateIdMappingJobOutputSourceConfig(v.OutputSourceConfig); err != nil { + invalidParams.AddNested("OutputSourceConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1297,9 +1742,7 @@ func validateOpUpdateIdMappingWorkflowInput(v *UpdateIdMappingWorkflowInput) err invalidParams.AddNested("InputSourceConfig", err.(smithy.InvalidParamsError)) } } - if v.OutputSourceConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("OutputSourceConfig")) - } else if v.OutputSourceConfig != nil { + if v.OutputSourceConfig != nil { if err := validateIdMappingWorkflowOutputSourceConfig(v.OutputSourceConfig); err != nil { invalidParams.AddNested("OutputSourceConfig", err.(smithy.InvalidParamsError)) } @@ -1321,6 +1764,31 @@ func validateOpUpdateIdMappingWorkflowInput(v *UpdateIdMappingWorkflowInput) err } } +func validateOpUpdateIdNamespaceInput(v *UpdateIdNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateIdNamespaceInput"} + if v.IdNamespaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdNamespaceName")) + } + if v.InputSourceConfig != nil { + if err := validateIdNamespaceInputSourceConfig(v.InputSourceConfig); err != nil { + invalidParams.AddNested("InputSourceConfig", err.(smithy.InvalidParamsError)) + } + } + if v.IdMappingWorkflowProperties != nil { + if err := validateIdNamespaceIdMappingWorkflowPropertiesList(v.IdMappingWorkflowProperties); err != nil { + invalidParams.AddNested("IdMappingWorkflowProperties", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateMatchingWorkflowInput(v *UpdateMatchingWorkflowInput) error { if v == nil { return nil diff --git a/service/firehose/internal/endpoints/endpoints.go b/service/firehose/internal/endpoints/endpoints.go index d13d8b8f058..f38844bc5b3 100644 --- a/service/firehose/internal/endpoints/endpoints.go +++ b/service/firehose/internal/endpoints/endpoints.go @@ -392,6 +392,11 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isob-east-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso-e", diff --git a/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go b/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go index 9209ba28191..6a700546890 100644 --- a/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go +++ b/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go @@ -34,10 +34,15 @@ type AssociateAwsAccountWithPartnerAccountInput struct { // This member is required. Sidewalk *types.SidewalkAccountInfo - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The tags to attach to the specified resource. Tags are metadata that you can diff --git a/service/iotwireless/api_op_CreateDestination.go b/service/iotwireless/api_op_CreateDestination.go index b6c4a63f413..08f925fecc7 100644 --- a/service/iotwireless/api_op_CreateDestination.go +++ b/service/iotwireless/api_op_CreateDestination.go @@ -49,10 +49,15 @@ type CreateDestinationInput struct { // This member is required. RoleArn *string - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The description of the new resource. diff --git a/service/iotwireless/api_op_CreateDeviceProfile.go b/service/iotwireless/api_op_CreateDeviceProfile.go index 562f9af9b64..f97a2c1141f 100644 --- a/service/iotwireless/api_op_CreateDeviceProfile.go +++ b/service/iotwireless/api_op_CreateDeviceProfile.go @@ -29,10 +29,15 @@ func (c *Client) CreateDeviceProfile(ctx context.Context, params *CreateDevicePr type CreateDeviceProfileInput struct { - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The device profile information to use to create the device profile. diff --git a/service/iotwireless/api_op_CreateFuotaTask.go b/service/iotwireless/api_op_CreateFuotaTask.go index 28b5a01c3c4..dda30808863 100644 --- a/service/iotwireless/api_op_CreateFuotaTask.go +++ b/service/iotwireless/api_op_CreateFuotaTask.go @@ -40,10 +40,15 @@ type CreateFuotaTaskInput struct { // This member is required. FirmwareUpdateRole *string - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The description of the new resource. diff --git a/service/iotwireless/api_op_CreateMulticastGroup.go b/service/iotwireless/api_op_CreateMulticastGroup.go index 4c3a2194d58..00654c0b970 100644 --- a/service/iotwireless/api_op_CreateMulticastGroup.go +++ b/service/iotwireless/api_op_CreateMulticastGroup.go @@ -34,10 +34,15 @@ type CreateMulticastGroupInput struct { // This member is required. LoRaWAN *types.LoRaWANMulticast - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The description of the multicast group. diff --git a/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go b/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go index 1fb42cd9e2f..1f340e6b6b0 100644 --- a/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go +++ b/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go @@ -34,10 +34,15 @@ type CreateNetworkAnalyzerConfigurationInput struct { // This member is required. Name *string - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The description of the new resource. diff --git a/service/iotwireless/api_op_CreateServiceProfile.go b/service/iotwireless/api_op_CreateServiceProfile.go index d0f0a1643f4..637407b9418 100644 --- a/service/iotwireless/api_op_CreateServiceProfile.go +++ b/service/iotwireless/api_op_CreateServiceProfile.go @@ -29,10 +29,15 @@ func (c *Client) CreateServiceProfile(ctx context.Context, params *CreateService type CreateServiceProfileInput struct { - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The service profile information to use to create the service profile. diff --git a/service/iotwireless/api_op_CreateWirelessDevice.go b/service/iotwireless/api_op_CreateWirelessDevice.go index 1cbc48c04c5..e4133ff20e6 100644 --- a/service/iotwireless/api_op_CreateWirelessDevice.go +++ b/service/iotwireless/api_op_CreateWirelessDevice.go @@ -39,10 +39,15 @@ type CreateWirelessDeviceInput struct { // This member is required. Type types.WirelessDeviceType - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The description of the new resource. diff --git a/service/iotwireless/api_op_CreateWirelessGateway.go b/service/iotwireless/api_op_CreateWirelessGateway.go index 2ecb78743a7..970d654ab5c 100644 --- a/service/iotwireless/api_op_CreateWirelessGateway.go +++ b/service/iotwireless/api_op_CreateWirelessGateway.go @@ -11,7 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Provisions a wireless gateway. +// Provisions a wireless gateway. When provisioning a wireless gateway, you might +// run into duplication errors for the following reasons. +// - If you specify a GatewayEui value that already exists. +// - If you used a ClientRequestToken with the same parameters within the last 10 +// minutes. +// +// To avoid this error, make sure that you use unique identifiers and parameters +// for each request within the specified time period. func (c *Client) CreateWirelessGateway(ctx context.Context, params *CreateWirelessGatewayInput, optFns ...func(*Options)) (*CreateWirelessGatewayOutput, error) { if params == nil { params = &CreateWirelessGatewayInput{} @@ -34,10 +41,15 @@ type CreateWirelessGatewayInput struct { // This member is required. LoRaWAN *types.LoRaWANGateway - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The description of the new resource. diff --git a/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go b/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go index c6b7291efa2..7e57dbc2d70 100644 --- a/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go +++ b/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go @@ -36,10 +36,15 @@ type CreateWirelessGatewayTaskDefinitionInput struct { // This member is required. AutoCreateTasks bool - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The name of the new resource. diff --git a/service/iotwireless/api_op_DeleteWirelessGateway.go b/service/iotwireless/api_op_DeleteWirelessGateway.go index 551255f1874..c18a357b9f9 100644 --- a/service/iotwireless/api_op_DeleteWirelessGateway.go +++ b/service/iotwireless/api_op_DeleteWirelessGateway.go @@ -10,7 +10,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a wireless gateway. +// Deletes a wireless gateway. When deleting a wireless gateway, you might run +// into duplication errors for the following reasons. +// - If you specify a GatewayEui value that already exists. +// - If you used a ClientRequestToken with the same parameters within the last 10 +// minutes. +// +// To avoid this error, make sure that you use unique identifiers and parameters +// for each request within the specified time period. func (c *Client) DeleteWirelessGateway(ctx context.Context, params *DeleteWirelessGatewayInput, optFns ...func(*Options)) (*DeleteWirelessGatewayOutput, error) { if params == nil { params = &DeleteWirelessGatewayInput{} diff --git a/service/iotwireless/api_op_GetMetricConfiguration.go b/service/iotwireless/api_op_GetMetricConfiguration.go index 4e906559bdf..9fe7bb279df 100644 --- a/service/iotwireless/api_op_GetMetricConfiguration.go +++ b/service/iotwireless/api_op_GetMetricConfiguration.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Get the metric configuration status for this account. +// Get the metric configuration status for this AWS account. func (c *Client) GetMetricConfiguration(ctx context.Context, params *GetMetricConfigurationInput, optFns ...func(*Options)) (*GetMetricConfigurationOutput, error) { if params == nil { params = &GetMetricConfigurationInput{} @@ -33,7 +33,7 @@ type GetMetricConfigurationInput struct { type GetMetricConfigurationOutput struct { - // The account's configuration status for summary metric aggregation. + // The configuration status of the AWS account for summary metric aggregation. SummaryMetric *types.SummaryMetricConfiguration // Metadata pertaining to the operation's result. diff --git a/service/iotwireless/api_op_GetMetrics.go b/service/iotwireless/api_op_GetMetrics.go index 413f4147999..a2a20ccb9cb 100644 --- a/service/iotwireless/api_op_GetMetrics.go +++ b/service/iotwireless/api_op_GetMetrics.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Get metrics. +// Get the summary metrics for this AWS account. func (c *Client) GetMetrics(ctx context.Context, params *GetMetricsInput, optFns ...func(*Options)) (*GetMetricsOutput, error) { if params == nil { params = &GetMetricsInput{} @@ -29,7 +29,7 @@ func (c *Client) GetMetrics(ctx context.Context, params *GetMetricsInput, optFns type GetMetricsInput struct { - // The list of queries to retrieve summary metrics. + // The list of queries to retrieve the summary metrics. SummaryMetricQueries []types.SummaryMetricQuery noSmithyDocumentSerde @@ -37,7 +37,7 @@ type GetMetricsInput struct { type GetMetricsOutput struct { - // The list of retrieved metrics. + // The list of summary metrics that were retrieved. SummaryMetricQueryResults []types.SummaryMetricQueryResult // Metadata pertaining to the operation's result. diff --git a/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go b/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go index 6a933ce8338..f1779972fc2 100644 --- a/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go @@ -41,10 +41,15 @@ type StartSingleWirelessDeviceImportTaskInput struct { // This member is required. Sidewalk *types.SidewalkSingleStartImportInfo - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The name of the wireless device for which an import task is being started. diff --git a/service/iotwireless/api_op_StartWirelessDeviceImportTask.go b/service/iotwireless/api_op_StartWirelessDeviceImportTask.go index c19eede66ad..e977c726a8a 100644 --- a/service/iotwireless/api_op_StartWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_StartWirelessDeviceImportTask.go @@ -43,10 +43,15 @@ type StartWirelessDeviceImportTaskInput struct { // This member is required. Sidewalk *types.SidewalkStartImportInfo - // Each resource must have a unique client request token. If you try to create a - // new resource with the same token as a resource that already exists, an exception - // occurs. If you omit this value, AWS SDKs will automatically generate a unique - // client request. + // Each resource must have a unique client request token. The client token is used + // to implement idempotency. It ensures that the request completes no more than one + // time. If you retry a request with the same token and the same parameters, the + // request will complete successfully. However, if you try to create a new resource + // using the same token but different parameters, an HTTP 409 conflict occurs. If + // you omit this value, AWS SDKs will automatically generate a unique client + // request. For more information about idempotency, see Ensuring idempotency in + // Amazon EC2 API requests (https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html) + // . ClientRequestToken *string // The tag to attach to the specified resource. Tags are metadata that you can use diff --git a/service/iotwireless/api_op_UpdateMetricConfiguration.go b/service/iotwireless/api_op_UpdateMetricConfiguration.go index 89435481361..1d174dd0c5f 100644 --- a/service/iotwireless/api_op_UpdateMetricConfiguration.go +++ b/service/iotwireless/api_op_UpdateMetricConfiguration.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Update the metric configuration. +// Update the summary metric configuration. func (c *Client) UpdateMetricConfiguration(ctx context.Context, params *UpdateMetricConfigurationInput, optFns ...func(*Options)) (*UpdateMetricConfigurationOutput, error) { if params == nil { params = &UpdateMetricConfigurationInput{} diff --git a/service/iotwireless/deserializers.go b/service/iotwireless/deserializers.go index c457299e77c..0f07ff222b1 100644 --- a/service/iotwireless/deserializers.go +++ b/service/iotwireless/deserializers.go @@ -18349,6 +18349,11 @@ func awsRestjson1_deserializeDocumentLoRaWANDeviceMetadata(v **types.LoRaWANDevi return err } + case "PublicGateways": + if err := awsRestjson1_deserializeDocumentLoRaWANPublicGatewayMetadataList(&sv.PublicGateways, value); err != nil { + return err + } + case "Timestamp": if value != nil { jtv, ok := value.(string) @@ -19530,6 +19535,175 @@ func awsRestjson1_deserializeDocumentLoRaWANMulticastSession(v **types.LoRaWANMu return nil } +func awsRestjson1_deserializeDocumentLoRaWANPublicGatewayMetadata(v **types.LoRaWANPublicGatewayMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LoRaWANPublicGatewayMetadata + if *v == nil { + sv = &types.LoRaWANPublicGatewayMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DlAllowed": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected DlAllowed to be of type *bool, got %T instead", value) + } + sv.DlAllowed = ptr.Bool(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "ProviderNetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProviderNetId to be of type string, got %T instead", value) + } + sv.ProviderNetId = ptr.String(jtv) + } + + case "RfRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RfRegion to be of type string, got %T instead", value) + } + sv.RfRegion = ptr.String(jtv) + } + + case "Rssi": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Rssi = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Rssi = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "Snr": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Snr = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Snr = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLoRaWANPublicGatewayMetadataList(v *[]types.LoRaWANPublicGatewayMetadata, 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.LoRaWANPublicGatewayMetadata + if *v == nil { + cv = []types.LoRaWANPublicGatewayMetadata{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LoRaWANPublicGatewayMetadata + destAddr := &col + if err := awsRestjson1_deserializeDocumentLoRaWANPublicGatewayMetadata(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentLoRaWANSendDataToDevice(v **types.LoRaWANSendDataToDevice, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iotwireless/types/types.go b/service/iotwireless/types/types.go index 2a1640787b2..7b929331995 100644 --- a/service/iotwireless/types/types.go +++ b/service/iotwireless/types/types.go @@ -703,6 +703,9 @@ type LoRaWANDeviceMetadata struct { // Information about the gateways accessed by the device. Gateways []LoRaWANGatewayMetadata + // Information about the LoRaWAN public network accessed by the device. + PublicGateways []LoRaWANPublicGatewayMetadata + // The date and time of the metadata. Timestamp *string @@ -1013,6 +1016,30 @@ type LoRaWANMulticastSession struct { noSmithyDocumentSerde } +// LoRaWAN public gateway metadata. +type LoRaWANPublicGatewayMetadata struct { + + // Boolean that indicates whether downlink is allowed using the network. + DlAllowed *bool + + // The ID of the gateways that are operated by the network provider. + Id *string + + // The ID of the LoRaWAN public network provider. + ProviderNetId *string + + // The frequency band (RFRegion) value. + RfRegion *string + + // The RSSI (received signal strength indicator) value. + Rssi *float64 + + // The SNR (signal to noise ratio) value. + Snr *float64 + + noSmithyDocumentSerde +} + // LoRaWAN router info. type LoRaWANSendDataToDevice struct { @@ -1228,24 +1255,28 @@ type MessageDeliveryStatusResourceTypeEventConfiguration struct { // The aggregated values of the metric. type MetricQueryValue struct { - // The average of the values of the all data points collected during the period. + // The average of the values of all data points collected during the aggregation + // period. Avg *float64 - // The maximum of the values of the all data points collected during the period. + // The maximum of the values of all the data points collected during the + // aggregation period. Max *float64 - // The minimum of the values of the all data points collected during the period. + // The minimum of the values of all data points collected during the aggregation + // period. Min *float64 - // The 90th percentile of the values of the all data points collected during the - // period. + // The 90th percentile of the values of all data points collected during the + // aggregation period. P90 *float64 - // The standard deviation of the values of the all data points collected during - // the period. + // The standard deviation of the values of all data points collected during the + // aggregation period. Std *float64 - // The sum of the values of the all data points collected during the period. + // The sum of the values of all data points collected during the aggregation + // period. Sum *float64 noSmithyDocumentSerde @@ -1732,40 +1763,40 @@ type SidewalkUpdateImportInfo struct { noSmithyDocumentSerde } -// The configuration of summary metric. +// The configuration of summary metrics. type SummaryMetricConfiguration struct { - // The configuration of summary metric. + // The status of the configuration of summary metrics. Status SummaryMetricConfigurationStatus noSmithyDocumentSerde } -// The metric query object. +// The summary metric query object. type SummaryMetricQuery struct { - // The aggregation period of the metric. + // The aggregation period of the summary metric. AggregationPeriod AggregationPeriod - // The dimensions of the metric. + // The dimensions of the summary metric. Dimensions []Dimension - // The end timestamp for summary metric query. + // The end timestamp for the summary metric query. EndTimestamp *time.Time // The name of the metric. MetricName MetricName - // The id of the query. + // The id of the summary metric query. QueryId *string - // The start timestamp for summary metric query. + // The start timestamp for the summary metric query. StartTimestamp *time.Time noSmithyDocumentSerde } -// The result of metrics aggregation operation. +// The result of the summary metrics aggregation operation. type SummaryMetricQueryResult struct { // The aggregation period of the metric. @@ -1774,22 +1805,22 @@ type SummaryMetricQueryResult struct { // The dimensions of the metric. Dimensions []Dimension - // The end timestamp for summary metric query. + // The end timestamp for the summary metric query. EndTimestamp *time.Time - // The error message for the summary metric query. + // The error message for the summary metric query result. Error *string - // The name of the metric. + // The name of the summary metric query result. MetricName MetricName - // The id of the query. + // The ID of the summary metric results query operation. QueryId *string - // The status of the metric query. + // The status of the summary metric query result. QueryStatus MetricQueryStatus - // The start timestamp for summary metric query. + // The start timestamp for the summary metric query. StartTimestamp *time.Time // The timestamp of each aggregation result. @@ -1798,7 +1829,7 @@ type SummaryMetricQueryResult struct { // The units of measurement to be used for interpreting the aggregation result. Unit *string - // The list of aggregated metrics. + // The list of aggregated summary metric query results. Values []MetricQueryValue noSmithyDocumentSerde diff --git a/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go b/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go index 6fa022c055b..7e196db9b41 100644 --- a/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go +++ b/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go @@ -46,12 +46,21 @@ type CreateLakeFormationIdentityCenterConfigurationInput struct { // Reference. InstanceArn *string + // A list of Amazon Web Services account IDs and/or Amazon Web Services + // organization/organizational unit ARNs that are allowed to access data managed by + // Lake Formation. If the ShareRecipients list includes valid values, a resource + // share is created with the principals you want to have access to the resources. + // If the ShareRecipients value is null or the list is empty, no resource share is + // created. + ShareRecipients []types.DataLakePrincipal + noSmithyDocumentSerde } type CreateLakeFormationIdentityCenterConfigurationOutput struct { - // The Amazon Resource Name (ARN) of the integrated application. + // The Amazon Resource Name (ARN) of the Lake Formation application integrated + // with IAM Identity Center. ApplicationArn *string // Metadata pertaining to the operation's result. diff --git a/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go b/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go index 61848dca889..01aefb68b5d 100644 --- a/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go +++ b/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go @@ -40,7 +40,8 @@ type DescribeLakeFormationIdentityCenterConfigurationInput struct { type DescribeLakeFormationIdentityCenterConfigurationOutput struct { - // The Amazon Resource Name (ARN) of the integrated application. + // The Amazon Resource Name (ARN) of the Lake Formation application integrated + // with IAM Identity Center. ApplicationArn *string // The identifier for the Data Catalog. By default, the account ID. The Data @@ -55,6 +56,17 @@ type DescribeLakeFormationIdentityCenterConfigurationOutput struct { // The Amazon Resource Name (ARN) of the connection. InstanceArn *string + // The Amazon Resource Name (ARN) of the RAM share. + ResourceShare *string + + // A list of Amazon Web Services account IDs or Amazon Web Services + // organization/organizational unit ARNs that are allowed to access data managed by + // Lake Formation. If the ShareRecipients list includes valid values, a resource + // share is created with the principals you want to have access to the resources as + // the ShareRecipients . If the ShareRecipients value is null or the list is + // empty, no resource share is created. + ShareRecipients []types.DataLakePrincipal + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go b/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go index 2b1142c7717..492ae1efd1e 100644 --- a/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go +++ b/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go @@ -42,6 +42,16 @@ type UpdateLakeFormationIdentityCenterConfigurationInput struct { // applications that are allowed to access data managed by Lake Formation. ExternalFiltering *types.ExternalFilteringConfiguration + // A list of Amazon Web Services account IDs or Amazon Web Services + // organization/organizational unit ARNs that are allowed to access to access data + // managed by Lake Formation. If the ShareRecipients list includes valid values, + // then the resource share is updated with the principals you want to have access + // to the resources. If the ShareRecipients value is null, both the list of share + // recipients and the resource share remain unchanged. If the ShareRecipients + // value is an empty list, then the existing share recipients list will be cleared, + // and the resource share will be deleted. + ShareRecipients []types.DataLakePrincipal + noSmithyDocumentSerde } diff --git a/service/lakeformation/deserializers.go b/service/lakeformation/deserializers.go index cb734daeb33..c0036d6b100 100644 --- a/service/lakeformation/deserializers.go +++ b/service/lakeformation/deserializers.go @@ -2167,6 +2167,20 @@ func awsRestjson1_deserializeOpDocumentDescribeLakeFormationIdentityCenterConfig sv.InstanceArn = ptr.String(jtv) } + case "ResourceShare": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RAMResourceShareArn to be of type string, got %T instead", value) + } + sv.ResourceShare = ptr.String(jtv) + } + + case "ShareRecipients": + if err := awsRestjson1_deserializeDocumentDataLakePrincipalList(&sv.ShareRecipients, value); err != nil { + return err + } + default: _, _ = key, value diff --git a/service/lakeformation/serializers.go b/service/lakeformation/serializers.go index 453f5346e86..7415323f967 100644 --- a/service/lakeformation/serializers.go +++ b/service/lakeformation/serializers.go @@ -669,6 +669,13 @@ func awsRestjson1_serializeOpDocumentCreateLakeFormationIdentityCenterConfigurat ok.String(*v.InstanceArn) } + if v.ShareRecipients != nil { + ok := object.Key("ShareRecipients") + if err := awsRestjson1_serializeDocumentDataLakePrincipalList(v.ShareRecipients, ok); err != nil { + return err + } + } + return nil } @@ -4348,6 +4355,13 @@ func awsRestjson1_serializeOpDocumentUpdateLakeFormationIdentityCenterConfigurat } } + if v.ShareRecipients != nil { + ok := object.Key("ShareRecipients") + if err := awsRestjson1_serializeDocumentDataLakePrincipalList(v.ShareRecipients, ok); err != nil { + return err + } + } + return nil } diff --git a/service/m2/api_op_GetBatchJobExecution.go b/service/m2/api_op_GetBatchJobExecution.go index b60484c571e..34a85fb6d9e 100644 --- a/service/m2/api_op_GetBatchJobExecution.go +++ b/service/m2/api_op_GetBatchJobExecution.go @@ -77,6 +77,9 @@ type GetBatchJobExecutionOutput struct { // The name of this batch job. JobName *string + // The restart steps information for the most recent restart operation. + JobStepRestartMarker *types.JobStepRestartMarker + // The type of job. JobType types.BatchJobType diff --git a/service/m2/api_op_ListBatchJobRestartPoints.go b/service/m2/api_op_ListBatchJobRestartPoints.go new file mode 100644 index 00000000000..6a422af014f --- /dev/null +++ b/service/m2/api_op_ListBatchJobRestartPoints.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package m2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/m2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the job steps for JCL files to restart a batch job. This is only +// applicable for Micro Focus engine with versions 8.0.6 and above. +func (c *Client) ListBatchJobRestartPoints(ctx context.Context, params *ListBatchJobRestartPointsInput, optFns ...func(*Options)) (*ListBatchJobRestartPointsOutput, error) { + if params == nil { + params = &ListBatchJobRestartPointsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBatchJobRestartPoints", params, optFns, c.addOperationListBatchJobRestartPointsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBatchJobRestartPointsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBatchJobRestartPointsInput struct { + + // The unique identifier of the application. + // + // This member is required. + ApplicationId *string + + // The unique identifier of each batch job execution. + // + // This member is required. + ExecutionId *string + + noSmithyDocumentSerde +} + +type ListBatchJobRestartPointsOutput struct { + + // Returns all the batch job steps and related information for a batch job that + // previously ran. + BatchJobSteps []types.JobStep + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBatchJobRestartPointsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListBatchJobRestartPoints{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListBatchJobRestartPoints{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBatchJobRestartPoints"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpListBatchJobRestartPointsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBatchJobRestartPoints(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListBatchJobRestartPoints(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBatchJobRestartPoints", + } +} diff --git a/service/m2/deserializers.go b/service/m2/deserializers.go index 6647106494a..d95bb16eb4d 100644 --- a/service/m2/deserializers.go +++ b/service/m2/deserializers.go @@ -1848,6 +1848,11 @@ func awsRestjson1_deserializeOpDocumentGetBatchJobExecutionOutput(v **GetBatchJo sv.JobName = ptr.String(jtv) } + case "jobStepRestartMarker": + if err := awsRestjson1_deserializeDocumentJobStepRestartMarker(&sv.JobStepRestartMarker, value); err != nil { + return err + } + case "jobType": if value != nil { jtv, ok := value.(string) @@ -3761,6 +3766,168 @@ func awsRestjson1_deserializeOpDocumentListBatchJobExecutionsOutput(v **ListBatc return nil } +type awsRestjson1_deserializeOpListBatchJobRestartPoints struct { +} + +func (*awsRestjson1_deserializeOpListBatchJobRestartPoints) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListBatchJobRestartPoints) HandleDeserialize(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_deserializeOpErrorListBatchJobRestartPoints(response, &metadata) + } + output := &ListBatchJobRestartPointsOutput{} + 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_deserializeOpDocumentListBatchJobRestartPointsOutput(&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_deserializeOpErrorListBatchJobRestartPoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentListBatchJobRestartPointsOutput(v **ListBatchJobRestartPointsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListBatchJobRestartPointsOutput + if *v == nil { + sv = &ListBatchJobRestartPointsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "batchJobSteps": + if err := awsRestjson1_deserializeDocumentBatchJobStepList(&sv.BatchJobSteps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListDataSetImportHistory struct { } @@ -6795,6 +6962,16 @@ loop: uv = &types.BatchJobIdentifierMemberFileBatchJobIdentifier{Value: mv} break loop + case "restartBatchJobIdentifier": + var mv types.RestartBatchJobIdentifier + destAddr := &mv + if err := awsRestjson1_deserializeDocumentRestartBatchJobIdentifier(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.BatchJobIdentifierMemberRestartBatchJobIdentifier{Value: mv} + break loop + case "s3BatchJobIdentifier": var mv types.S3BatchJobIdentifier destAddr := &mv @@ -6825,6 +7002,40 @@ loop: return nil } +func awsRestjson1_deserializeDocumentBatchJobStepList(v *[]types.JobStep, 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.JobStep + if *v == nil { + cv = []types.JobStep{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.JobStep + destAddr := &col + if err := awsRestjson1_deserializeDocumentJobStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + 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) @@ -8154,6 +8365,166 @@ loop: return nil } +func awsRestjson1_deserializeDocumentJobStep(v **types.JobStep, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.JobStep + if *v == nil { + sv = &types.JobStep{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "procStepName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ProcStepName = ptr.String(jtv) + } + + case "procStepNumber": + 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.ProcStepNumber = int32(i64) + } + + case "stepCondCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StepCondCode = ptr.String(jtv) + } + + case "stepName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StepName = ptr.String(jtv) + } + + case "stepNumber": + 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.StepNumber = int32(i64) + } + + case "stepRestartable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.StepRestartable = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentJobStepRestartMarker(v **types.JobStepRestartMarker, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.JobStepRestartMarker + if *v == nil { + sv = &types.JobStepRestartMarker{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fromProcStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FromProcStep = ptr.String(jtv) + } + + case "fromStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FromStep = ptr.String(jtv) + } + + case "toProcStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ToProcStep = ptr.String(jtv) + } + + case "toStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ToStep = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLogGroupSummaries(v *[]types.LogGroupSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8607,6 +8978,51 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentRestartBatchJobIdentifier(v **types.RestartBatchJobIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RestartBatchJobIdentifier + if *v == nil { + sv = &types.RestartBatchJobIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "executionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Identifier to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "jobStepRestartMarker": + if err := awsRestjson1_deserializeDocumentJobStepRestartMarker(&sv.JobStepRestartMarker, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentS3BatchJobIdentifier(v **types.S3BatchJobIdentifier, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/m2/generated.json b/service/m2/generated.json index aef42a6be30..be346ded7ea 100644 --- a/service/m2/generated.json +++ b/service/m2/generated.json @@ -28,6 +28,7 @@ "api_op_ListApplications.go", "api_op_ListBatchJobDefinitions.go", "api_op_ListBatchJobExecutions.go", + "api_op_ListBatchJobRestartPoints.go", "api_op_ListDataSetImportHistory.go", "api_op_ListDataSets.go", "api_op_ListDeployments.go", diff --git a/service/m2/serializers.go b/service/m2/serializers.go index 38f0ca050a5..b60911ff491 100644 --- a/service/m2/serializers.go +++ b/service/m2/serializers.go @@ -1621,6 +1621,80 @@ func awsRestjson1_serializeOpHttpBindingsListBatchJobExecutionsInput(v *ListBatc return nil } +type awsRestjson1_serializeOpListBatchJobRestartPoints struct { +} + +func (*awsRestjson1_serializeOpListBatchJobRestartPoints) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListBatchJobRestartPoints) 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.(*ListBatchJobRestartPointsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/applications/{applicationId}/batch-job-executions/{executionId}/steps") + 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_serializeOpHttpBindingsListBatchJobRestartPointsInput(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_serializeOpHttpBindingsListBatchJobRestartPointsInput(v *ListBatchJobRestartPointsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationId == nil || len(*v.ApplicationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member applicationId must not be empty")} + } + if v.ApplicationId != nil { + if err := encoder.SetURI("applicationId").String(*v.ApplicationId); err != nil { + return err + } + } + + if v.ExecutionId == nil || len(*v.ExecutionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member executionId must not be empty")} + } + if v.ExecutionId != nil { + if err := encoder.SetURI("executionId").String(*v.ExecutionId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListDataSetImportHistory struct { } @@ -2730,6 +2804,12 @@ func awsRestjson1_serializeDocumentBatchJobIdentifier(v types.BatchJobIdentifier return err } + case *types.BatchJobIdentifierMemberRestartBatchJobIdentifier: + av := object.Key("restartBatchJobIdentifier") + if err := awsRestjson1_serializeDocumentRestartBatchJobIdentifier(&uv.Value, av); err != nil { + return err + } + case *types.BatchJobIdentifierMemberS3BatchJobIdentifier: av := object.Key("s3BatchJobIdentifier") if err := awsRestjson1_serializeDocumentS3BatchJobIdentifier(&uv.Value, av); err != nil { @@ -3024,6 +3104,33 @@ func awsRestjson1_serializeDocumentJobIdentifier(v types.JobIdentifier, value sm return nil } +func awsRestjson1_serializeDocumentJobStepRestartMarker(v *types.JobStepRestartMarker, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FromProcStep != nil { + ok := object.Key("fromProcStep") + ok.String(*v.FromProcStep) + } + + if v.FromStep != nil { + ok := object.Key("fromStep") + ok.String(*v.FromStep) + } + + if v.ToProcStep != nil { + ok := object.Key("toProcStep") + ok.String(*v.ToProcStep) + } + + if v.ToStep != nil { + ok := object.Key("toStep") + ok.String(*v.ToStep) + } + + return nil +} + func awsRestjson1_serializeDocumentPoAttributes(v *types.PoAttributes, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3104,6 +3211,25 @@ func awsRestjson1_serializeDocumentRecordLength(v *types.RecordLength, value smi return nil } +func awsRestjson1_serializeDocumentRestartBatchJobIdentifier(v *types.RestartBatchJobIdentifier, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExecutionId != nil { + ok := object.Key("executionId") + ok.String(*v.ExecutionId) + } + + if v.JobStepRestartMarker != nil { + ok := object.Key("jobStepRestartMarker") + if err := awsRestjson1_serializeDocumentJobStepRestartMarker(v.JobStepRestartMarker, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentS3BatchJobIdentifier(v *types.S3BatchJobIdentifier, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/m2/snapshot_test.go b/service/m2/snapshot_test.go index 5051fafa38f..fc026e13626 100644 --- a/service/m2/snapshot_test.go +++ b/service/m2/snapshot_test.go @@ -302,6 +302,18 @@ func TestCheckSnapshot_ListBatchJobExecutions(t *testing.T) { } } +func TestCheckSnapshot_ListBatchJobRestartPoints(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBatchJobRestartPoints(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBatchJobRestartPoints") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDataSetImportHistory(t *testing.T) { svc := New(Options{}) _, err := svc.ListDataSetImportHistory(context.Background(), nil, func(o *Options) { @@ -697,6 +709,18 @@ func TestUpdateSnapshot_ListBatchJobExecutions(t *testing.T) { } } +func TestUpdateSnapshot_ListBatchJobRestartPoints(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBatchJobRestartPoints(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBatchJobRestartPoints") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDataSetImportHistory(t *testing.T) { svc := New(Options{}) _, err := svc.ListDataSetImportHistory(context.Background(), nil, func(o *Options) { diff --git a/service/m2/types/enums.go b/service/m2/types/enums.go index a630afdb756..91690c92209 100644 --- a/service/m2/types/enums.go +++ b/service/m2/types/enums.go @@ -89,6 +89,7 @@ const ( BatchJobExecutionStatusCancelled BatchJobExecutionStatus = "Cancelled" BatchJobExecutionStatusSucceeded BatchJobExecutionStatus = "Succeeded" BatchJobExecutionStatusFailed BatchJobExecutionStatus = "Failed" + BatchJobExecutionStatusPurged BatchJobExecutionStatus = "Purged" BatchJobExecutionStatusSucceededWithWarning BatchJobExecutionStatus = "Succeeded With Warning" ) @@ -105,6 +106,7 @@ func (BatchJobExecutionStatus) Values() []BatchJobExecutionStatus { "Cancelled", "Succeeded", "Failed", + "Purged", "Succeeded With Warning", } } @@ -219,10 +221,12 @@ type ValidationExceptionReason string // Enum values for ValidationExceptionReason const ( - ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "unknownOperation" - ValidationExceptionReasonCannotParse ValidationExceptionReason = "cannotParse" - ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "fieldValidationFailed" - ValidationExceptionReasonOther ValidationExceptionReason = "other" + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "unknownOperation" + ValidationExceptionReasonCannotParse ValidationExceptionReason = "cannotParse" + ValidationExceptionReasonFeatureNotAvailable ValidationExceptionReason = "featureNotAvailable" + ValidationExceptionReasonUnsupportedEngineVersion ValidationExceptionReason = "unsupportedEngineVersion" + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "fieldValidationFailed" + ValidationExceptionReasonOther ValidationExceptionReason = "other" ) // Values returns all known values for ValidationExceptionReason. Note that this @@ -232,6 +236,8 @@ func (ValidationExceptionReason) Values() []ValidationExceptionReason { return []ValidationExceptionReason{ "unknownOperation", "cannotParse", + "featureNotAvailable", + "unsupportedEngineVersion", "fieldValidationFailed", "other", } diff --git a/service/m2/types/types.go b/service/m2/types/types.go index a90ba64f375..f3fe8832c72 100644 --- a/service/m2/types/types.go +++ b/service/m2/types/types.go @@ -197,6 +197,7 @@ type BatchJobExecutionSummary struct { // The following types satisfy this interface: // // BatchJobIdentifierMemberFileBatchJobIdentifier +// BatchJobIdentifierMemberRestartBatchJobIdentifier // BatchJobIdentifierMemberS3BatchJobIdentifier // BatchJobIdentifierMemberScriptBatchJobIdentifier type BatchJobIdentifier interface { @@ -212,6 +213,16 @@ type BatchJobIdentifierMemberFileBatchJobIdentifier struct { func (*BatchJobIdentifierMemberFileBatchJobIdentifier) isBatchJobIdentifier() {} +// Specifies the required information for restart, including execution ID and +// jobsteprestartmarker. +type BatchJobIdentifierMemberRestartBatchJobIdentifier struct { + Value RestartBatchJobIdentifier + + noSmithyDocumentSerde +} + +func (*BatchJobIdentifierMemberRestartBatchJobIdentifier) isBatchJobIdentifier() {} + // Specifies an Amazon S3 location that identifies the batch jobs that you want to // run. Use this identifier to run ad hoc batch jobs. type BatchJobIdentifierMemberS3BatchJobIdentifier struct { @@ -790,6 +801,50 @@ type JobIdentifierMemberScriptName struct { func (*JobIdentifierMemberScriptName) isJobIdentifier() {} +// Provides information related to a job step. +type JobStep struct { + + // The name of a procedure step. + ProcStepName *string + + // The number of a procedure step. + ProcStepNumber int32 + + // The condition code of a step. + StepCondCode *string + + // The name of a step. + StepName *string + + // The number of a step. + StepNumber int32 + + // Specifies if a step can be restarted or not. + StepRestartable bool + + noSmithyDocumentSerde +} + +// Provides restart step information for the most recent restart operation. +type JobStepRestartMarker struct { + + // The step name that a batch job restart was from. + // + // This member is required. + FromStep *string + + // The procedure step name that a job was restarted from. + FromProcStep *string + + // The procedure step name that a batch job was restarted to. + ToProcStep *string + + // The step name that a job was restarted to. + ToStep *string + + noSmithyDocumentSerde +} + // A subset of the attributes that describe a log group. In CloudWatch a log group // is a group of log streams that share the same retention, monitoring, and access // control settings. @@ -935,6 +990,23 @@ type RecordLength struct { noSmithyDocumentSerde } +// An identifier for the StartBatchJob API to show that it is a restart operation. +type RestartBatchJobIdentifier struct { + + // The executionId from the StartBatchJob response when the job ran for the first + // time. + // + // This member is required. + ExecutionId *string + + // The restart step information for the most recent restart operation. + // + // This member is required. + JobStepRestartMarker *JobStepRestartMarker + + noSmithyDocumentSerde +} + // A batch job identifier in which the batch jobs to run are identified by an // Amazon S3 location. type S3BatchJobIdentifier struct { diff --git a/service/m2/types/types_exported_test.go b/service/m2/types/types_exported_test.go index 616fdaf541e..da655fa0781 100644 --- a/service/m2/types/types_exported_test.go +++ b/service/m2/types/types_exported_test.go @@ -36,6 +36,9 @@ func ExampleBatchJobIdentifier_outputUsage() { case *types.BatchJobIdentifierMemberFileBatchJobIdentifier: _ = v.Value // Value is types.FileBatchJobIdentifier + case *types.BatchJobIdentifierMemberRestartBatchJobIdentifier: + _ = v.Value // Value is types.RestartBatchJobIdentifier + case *types.BatchJobIdentifierMemberS3BatchJobIdentifier: _ = v.Value // Value is types.S3BatchJobIdentifier @@ -52,6 +55,7 @@ func ExampleBatchJobIdentifier_outputUsage() { } var _ *types.S3BatchJobIdentifier +var _ *types.RestartBatchJobIdentifier var _ *types.FileBatchJobIdentifier var _ *types.ScriptBatchJobIdentifier diff --git a/service/m2/validators.go b/service/m2/validators.go index 38079299df1..b2d8599b6e8 100644 --- a/service/m2/validators.go +++ b/service/m2/validators.go @@ -370,6 +370,26 @@ func (m *validateOpListBatchJobExecutions) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpListBatchJobRestartPoints struct { +} + +func (*validateOpListBatchJobRestartPoints) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBatchJobRestartPoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBatchJobRestartPointsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBatchJobRestartPointsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListDataSetImportHistory struct { } @@ -662,6 +682,10 @@ func addOpListBatchJobExecutionsValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpListBatchJobExecutions{}, middleware.After) } +func addOpListBatchJobRestartPointsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBatchJobRestartPoints{}, middleware.After) +} + func addOpListDataSetImportHistoryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDataSetImportHistory{}, middleware.After) } @@ -746,6 +770,11 @@ func validateBatchJobIdentifier(v types.BatchJobIdentifier) error { invalidParams.AddNested("[fileBatchJobIdentifier]", err.(smithy.InvalidParamsError)) } + case *types.BatchJobIdentifierMemberRestartBatchJobIdentifier: + if err := validateRestartBatchJobIdentifier(&uv.Value); err != nil { + invalidParams.AddNested("[restartBatchJobIdentifier]", err.(smithy.InvalidParamsError)) + } + case *types.BatchJobIdentifierMemberS3BatchJobIdentifier: if err := validateS3BatchJobIdentifier(&uv.Value); err != nil { invalidParams.AddNested("[s3BatchJobIdentifier]", err.(smithy.InvalidParamsError)) @@ -946,6 +975,21 @@ func validateHighAvailabilityConfig(v *types.HighAvailabilityConfig) error { } } +func validateJobStepRestartMarker(v *types.JobStepRestartMarker) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "JobStepRestartMarker"} + if v.FromStep == nil { + invalidParams.Add(smithy.NewErrParamRequired("FromStep")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePoAttributes(v *types.PoAttributes) error { if v == nil { return nil @@ -1003,6 +1047,28 @@ func validateRecordLength(v *types.RecordLength) error { } } +func validateRestartBatchJobIdentifier(v *types.RestartBatchJobIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RestartBatchJobIdentifier"} + if v.ExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionId")) + } + if v.JobStepRestartMarker == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobStepRestartMarker")) + } else if v.JobStepRestartMarker != nil { + if err := validateJobStepRestartMarker(v.JobStepRestartMarker); err != nil { + invalidParams.AddNested("JobStepRestartMarker", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateS3BatchJobIdentifier(v *types.S3BatchJobIdentifier) error { if v == nil { return nil @@ -1428,6 +1494,24 @@ func validateOpListBatchJobExecutionsInput(v *ListBatchJobExecutionsInput) error } } +func validateOpListBatchJobRestartPointsInput(v *ListBatchJobRestartPointsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBatchJobRestartPointsInput"} + if v.ApplicationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationId")) + } + if v.ExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListDataSetImportHistoryInput(v *ListDataSetImportHistoryInput) error { if v == nil { return nil diff --git a/service/mediapackagev2/api_op_CreateOriginEndpoint.go b/service/mediapackagev2/api_op_CreateOriginEndpoint.go index 6887fa1f30a..c351c96135a 100644 --- a/service/mediapackagev2/api_op_CreateOriginEndpoint.go +++ b/service/mediapackagev2/api_op_CreateOriginEndpoint.go @@ -67,6 +67,9 @@ type CreateOriginEndpointInput struct { // the request. ClientToken *string + // A DASH manifest configuration. + DashManifests []types.CreateDashManifestConfiguration + // Enter any descriptive text that helps you to identify the origin endpoint. Description *string @@ -142,6 +145,9 @@ type CreateOriginEndpointOutput struct { // This member is required. Segment *types.Segment + // A DASH manifest configuration. + DashManifests []types.GetDashManifestConfiguration + // The description for your origin endpoint. Description *string diff --git a/service/mediapackagev2/api_op_GetOriginEndpoint.go b/service/mediapackagev2/api_op_GetOriginEndpoint.go index 929882ce11f..f4a2cc7991e 100644 --- a/service/mediapackagev2/api_op_GetOriginEndpoint.go +++ b/service/mediapackagev2/api_op_GetOriginEndpoint.go @@ -103,6 +103,9 @@ type GetOriginEndpointOutput struct { // This member is required. Segment *types.Segment + // A DASH manifest configuration. + DashManifests []types.GetDashManifestConfiguration + // The description for your origin endpoint. Description *string diff --git a/service/mediapackagev2/api_op_UpdateOriginEndpoint.go b/service/mediapackagev2/api_op_UpdateOriginEndpoint.go index c5f7e305747..bf2b5791a5d 100644 --- a/service/mediapackagev2/api_op_UpdateOriginEndpoint.go +++ b/service/mediapackagev2/api_op_UpdateOriginEndpoint.go @@ -60,6 +60,9 @@ type UpdateOriginEndpointInput struct { // This member is required. OriginEndpointName *string + // A DASH manifest configuration. + DashManifests []types.CreateDashManifestConfiguration + // Any descriptive information that you want to add to the origin endpoint for // future identification purposes. Description *string @@ -136,6 +139,9 @@ type UpdateOriginEndpointOutput struct { // This member is required. Segment *types.Segment + // A DASH manifest configuration. + DashManifests []types.GetDashManifestConfiguration + // The description of the origin endpoint. Description *string diff --git a/service/mediapackagev2/deserializers.go b/service/mediapackagev2/deserializers.go index b6111c0ec8a..520e1256d22 100644 --- a/service/mediapackagev2/deserializers.go +++ b/service/mediapackagev2/deserializers.go @@ -712,6 +712,11 @@ func awsRestjson1_deserializeOpDocumentCreateOriginEndpointOutput(v **CreateOrig } } + case "DashManifests": + if err := awsRestjson1_deserializeDocumentGetDashManifests(&sv.DashManifests, value); err != nil { + return err + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -2124,6 +2129,11 @@ func awsRestjson1_deserializeOpDocumentGetOriginEndpointOutput(v **GetOriginEndp } } + case "DashManifests": + if err := awsRestjson1_deserializeDocumentGetDashManifests(&sv.DashManifests, value); err != nil { + return err + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -4107,6 +4117,11 @@ func awsRestjson1_deserializeOpDocumentUpdateOriginEndpointOutput(v **UpdateOrig } } + case "DashManifests": + if err := awsRestjson1_deserializeDocumentGetDashManifests(&sv.DashManifests, value); err != nil { + return err + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -4790,6 +4805,91 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentDashPeriodTriggers(v *[]types.DashPeriodTrigger, 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.DashPeriodTrigger + if *v == nil { + cv = []types.DashPeriodTrigger{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DashPeriodTrigger + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashPeriodTrigger to be of type string, got %T instead", value) + } + col = types.DashPeriodTrigger(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDashUtcTiming(v **types.DashUtcTiming, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.DashUtcTiming + if *v == nil { + sv = &types.DashUtcTiming{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TimingMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashUtcTimingMode to be of type string, got %T instead", value) + } + sv.TimingMode = types.DashUtcTimingMode(jtv) + } + + case "TimingSource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TimingSource = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDrmSystems(v *[]types.DrmSystem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5072,6 +5172,179 @@ func awsRestjson1_deserializeDocumentFilterConfiguration(v **types.FilterConfigu return nil } +func awsRestjson1_deserializeDocumentGetDashManifestConfiguration(v **types.GetDashManifestConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.GetDashManifestConfiguration + if *v == nil { + sv = &types.GetDashManifestConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DrmSignaling": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashDrmSignaling to be of type string, got %T instead", value) + } + sv.DrmSignaling = types.DashDrmSignaling(jtv) + } + + case "FilterConfiguration": + if err := awsRestjson1_deserializeDocumentFilterConfiguration(&sv.FilterConfiguration, value); err != nil { + return err + } + + case "ManifestName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.ManifestName = ptr.String(jtv) + } + + case "ManifestWindowSeconds": + 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.ManifestWindowSeconds = ptr.Int32(int32(i64)) + } + + case "MinBufferTimeSeconds": + 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.MinBufferTimeSeconds = ptr.Int32(int32(i64)) + } + + case "MinUpdatePeriodSeconds": + 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.MinUpdatePeriodSeconds = ptr.Int32(int32(i64)) + } + + case "PeriodTriggers": + if err := awsRestjson1_deserializeDocumentDashPeriodTriggers(&sv.PeriodTriggers, value); err != nil { + return err + } + + case "ScteDash": + if err := awsRestjson1_deserializeDocumentScteDash(&sv.ScteDash, value); err != nil { + return err + } + + case "SegmentTemplateFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashSegmentTemplateFormat to be of type string, got %T instead", value) + } + sv.SegmentTemplateFormat = types.DashSegmentTemplateFormat(jtv) + } + + case "SuggestedPresentationDelaySeconds": + 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.SuggestedPresentationDelaySeconds = ptr.Int32(int32(i64)) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + case "UtcTiming": + if err := awsRestjson1_deserializeDocumentDashUtcTiming(&sv.UtcTiming, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGetDashManifests(v *[]types.GetDashManifestConfiguration, 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.GetDashManifestConfiguration + if *v == nil { + cv = []types.GetDashManifestConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GetDashManifestConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentGetDashManifestConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentGetHlsManifestConfiguration(v **types.GetHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5451,6 +5724,89 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentListDashManifestConfiguration(v **types.ListDashManifestConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ListDashManifestConfiguration + if *v == nil { + sv = &types.ListDashManifestConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ManifestName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.ManifestName = ptr.String(jtv) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentListDashManifests(v *[]types.ListDashManifestConfiguration, 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.ListDashManifestConfiguration + if *v == nil { + cv = []types.ListDashManifestConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListDashManifestConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentListDashManifestConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentListHlsManifestConfiguration(v **types.ListHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5709,6 +6065,11 @@ func awsRestjson1_deserializeDocumentOriginEndpointListConfiguration(v **types.O } } + case "DashManifests": + if err := awsRestjson1_deserializeDocumentListDashManifests(&sv.DashManifests, value); err != nil { + return err + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -5881,6 +6242,46 @@ func awsRestjson1_deserializeDocumentScte(v **types.Scte, value interface{}) err return nil } +func awsRestjson1_deserializeDocumentScteDash(v **types.ScteDash, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ScteDash + if *v == nil { + sv = &types.ScteDash{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdMarkerDash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AdMarkerDash to be of type string, got %T instead", value) + } + sv.AdMarkerDash = types.AdMarkerDash(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentScteFilterList(v *[]types.ScteFilter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/mediapackagev2/serializers.go b/service/mediapackagev2/serializers.go index 24456f7bb1c..038e561e23a 100644 --- a/service/mediapackagev2/serializers.go +++ b/service/mediapackagev2/serializers.go @@ -315,6 +315,13 @@ func awsRestjson1_serializeOpDocumentCreateOriginEndpointInput(v *CreateOriginEn ok.String(string(v.ContainerType)) } + if v.DashManifests != nil { + ok := object.Key("DashManifests") + if err := awsRestjson1_serializeDocumentCreateDashManifests(v.DashManifests, ok); err != nil { + return err + } + } + if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) @@ -2070,6 +2077,13 @@ func awsRestjson1_serializeOpDocumentUpdateOriginEndpointInput(v *UpdateOriginEn ok.String(string(v.ContainerType)) } + if v.DashManifests != nil { + ok := object.Key("DashManifests") + if err := awsRestjson1_serializeDocumentCreateDashManifests(v.DashManifests, ok); err != nil { + return err + } + } + if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) @@ -2104,6 +2118,89 @@ func awsRestjson1_serializeOpDocumentUpdateOriginEndpointInput(v *UpdateOriginEn return nil } +func awsRestjson1_serializeDocumentCreateDashManifestConfiguration(v *types.CreateDashManifestConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DrmSignaling) > 0 { + ok := object.Key("DrmSignaling") + ok.String(string(v.DrmSignaling)) + } + + if v.FilterConfiguration != nil { + ok := object.Key("FilterConfiguration") + if err := awsRestjson1_serializeDocumentFilterConfiguration(v.FilterConfiguration, ok); err != nil { + return err + } + } + + if v.ManifestName != nil { + ok := object.Key("ManifestName") + ok.String(*v.ManifestName) + } + + if v.ManifestWindowSeconds != nil { + ok := object.Key("ManifestWindowSeconds") + ok.Integer(*v.ManifestWindowSeconds) + } + + if v.MinBufferTimeSeconds != nil { + ok := object.Key("MinBufferTimeSeconds") + ok.Integer(*v.MinBufferTimeSeconds) + } + + if v.MinUpdatePeriodSeconds != nil { + ok := object.Key("MinUpdatePeriodSeconds") + ok.Integer(*v.MinUpdatePeriodSeconds) + } + + if v.PeriodTriggers != nil { + ok := object.Key("PeriodTriggers") + if err := awsRestjson1_serializeDocumentDashPeriodTriggers(v.PeriodTriggers, ok); err != nil { + return err + } + } + + if v.ScteDash != nil { + ok := object.Key("ScteDash") + if err := awsRestjson1_serializeDocumentScteDash(v.ScteDash, ok); err != nil { + return err + } + } + + if len(v.SegmentTemplateFormat) > 0 { + ok := object.Key("SegmentTemplateFormat") + ok.String(string(v.SegmentTemplateFormat)) + } + + if v.SuggestedPresentationDelaySeconds != nil { + ok := object.Key("SuggestedPresentationDelaySeconds") + ok.Integer(*v.SuggestedPresentationDelaySeconds) + } + + if v.UtcTiming != nil { + ok := object.Key("UtcTiming") + if err := awsRestjson1_serializeDocumentDashUtcTiming(v.UtcTiming, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCreateDashManifests(v []types.CreateDashManifestConfiguration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentCreateDashManifestConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentCreateHlsManifestConfiguration(v *types.CreateHlsManifestConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2212,6 +2309,34 @@ func awsRestjson1_serializeDocumentCreateLowLatencyHlsManifests(v []types.Create return nil } +func awsRestjson1_serializeDocumentDashPeriodTriggers(v []types.DashPeriodTrigger, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentDashUtcTiming(v *types.DashUtcTiming, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.TimingMode) > 0 { + ok := object.Key("TimingMode") + ok.String(string(v.TimingMode)) + } + + if v.TimingSource != nil { + ok := object.Key("TimingSource") + ok.String(*v.TimingSource) + } + + return nil +} + func awsRestjson1_serializeDocumentDrmSystems(v []types.DrmSystem, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -2329,6 +2454,18 @@ func awsRestjson1_serializeDocumentScte(v *types.Scte, value smithyjson.Value) e return nil } +func awsRestjson1_serializeDocumentScteDash(v *types.ScteDash, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AdMarkerDash) > 0 { + ok := object.Key("AdMarkerDash") + ok.String(string(v.AdMarkerDash)) + } + + return nil +} + func awsRestjson1_serializeDocumentScteFilterList(v []types.ScteFilter, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/mediapackagev2/types/enums.go b/service/mediapackagev2/types/enums.go index 64730f85c84..008585a14ff 100644 --- a/service/mediapackagev2/types/enums.go +++ b/service/mediapackagev2/types/enums.go @@ -2,6 +2,24 @@ package types +type AdMarkerDash string + +// Enum values for AdMarkerDash +const ( + AdMarkerDashBinary AdMarkerDash = "BINARY" + AdMarkerDashXml AdMarkerDash = "XML" +) + +// Values returns all known values for AdMarkerDash. 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 (AdMarkerDash) Values() []AdMarkerDash { + return []AdMarkerDash{ + "BINARY", + "XML", + } +} + type AdMarkerHls string // Enum values for AdMarkerHls @@ -76,6 +94,86 @@ func (ContainerType) Values() []ContainerType { } } +type DashDrmSignaling string + +// Enum values for DashDrmSignaling +const ( + DashDrmSignalingIndividual DashDrmSignaling = "INDIVIDUAL" + DashDrmSignalingReferenced DashDrmSignaling = "REFERENCED" +) + +// Values returns all known values for DashDrmSignaling. 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 (DashDrmSignaling) Values() []DashDrmSignaling { + return []DashDrmSignaling{ + "INDIVIDUAL", + "REFERENCED", + } +} + +type DashPeriodTrigger string + +// Enum values for DashPeriodTrigger +const ( + DashPeriodTriggerAvails DashPeriodTrigger = "AVAILS" + DashPeriodTriggerDrmKeyRotation DashPeriodTrigger = "DRM_KEY_ROTATION" + DashPeriodTriggerSourceChanges DashPeriodTrigger = "SOURCE_CHANGES" + DashPeriodTriggerSourceDisruptions DashPeriodTrigger = "SOURCE_DISRUPTIONS" + DashPeriodTriggerNone DashPeriodTrigger = "NONE" +) + +// Values returns all known values for DashPeriodTrigger. 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 (DashPeriodTrigger) Values() []DashPeriodTrigger { + return []DashPeriodTrigger{ + "AVAILS", + "DRM_KEY_ROTATION", + "SOURCE_CHANGES", + "SOURCE_DISRUPTIONS", + "NONE", + } +} + +type DashSegmentTemplateFormat string + +// Enum values for DashSegmentTemplateFormat +const ( + DashSegmentTemplateFormatNumberWithTimeline DashSegmentTemplateFormat = "NUMBER_WITH_TIMELINE" +) + +// Values returns all known values for DashSegmentTemplateFormat. 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 (DashSegmentTemplateFormat) Values() []DashSegmentTemplateFormat { + return []DashSegmentTemplateFormat{ + "NUMBER_WITH_TIMELINE", + } +} + +type DashUtcTimingMode string + +// Enum values for DashUtcTimingMode +const ( + DashUtcTimingModeHttpHead DashUtcTimingMode = "HTTP_HEAD" + DashUtcTimingModeHttpIso DashUtcTimingMode = "HTTP_ISO" + DashUtcTimingModeHttpXsdate DashUtcTimingMode = "HTTP_XSDATE" + DashUtcTimingModeUtcDirect DashUtcTimingMode = "UTC_DIRECT" +) + +// Values returns all known values for DashUtcTimingMode. 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 (DashUtcTimingMode) Values() []DashUtcTimingMode { + return []DashUtcTimingMode{ + "HTTP_HEAD", + "HTTP_ISO", + "HTTP_XSDATE", + "UTC_DIRECT", + } +} + type DrmSystem string // Enum values for DrmSystem @@ -243,6 +341,7 @@ const ( ValidationExceptionTypeEncryptionContractShared ValidationExceptionType = "ENCRYPTION_CONTRACT_SHARED" ValidationExceptionTypeNumManifestsLow ValidationExceptionType = "NUM_MANIFESTS_LOW" ValidationExceptionTypeNumManifestsHigh ValidationExceptionType = "NUM_MANIFESTS_HIGH" + ValidationExceptionTypeManifestDrmSystemsIncompatible ValidationExceptionType = "MANIFEST_DRM_SYSTEMS_INCOMPATIBLE" ValidationExceptionTypeDrmSystemsEncryptionMethodIncompatible ValidationExceptionType = "DRM_SYSTEMS_ENCRYPTION_METHOD_INCOMPATIBLE" ValidationExceptionTypeRoleArnNotAssumable ValidationExceptionType = "ROLE_ARN_NOT_ASSUMABLE" ValidationExceptionTypeRoleArnLengthOutOfRange ValidationExceptionType = "ROLE_ARN_LENGTH_OUT_OF_RANGE" @@ -267,6 +366,13 @@ const ( ValidationExceptionTypeInvalidManifestFilter ValidationExceptionType = "INVALID_MANIFEST_FILTER" ValidationExceptionTypeInvalidTimeDelaySeconds ValidationExceptionType = "INVALID_TIME_DELAY_SECONDS" ValidationExceptionTypeEndTimeEarlierThanStartTime ValidationExceptionType = "END_TIME_EARLIER_THAN_START_TIME" + ValidationExceptionTypeTsContainerTypeWithDashManifest ValidationExceptionType = "TS_CONTAINER_TYPE_WITH_DASH_MANIFEST" + ValidationExceptionTypeDirectModeWithTimingSource ValidationExceptionType = "DIRECT_MODE_WITH_TIMING_SOURCE" + ValidationExceptionTypeNoneModeWithTimingSource ValidationExceptionType = "NONE_MODE_WITH_TIMING_SOURCE" + ValidationExceptionTypeTimingSourceMissing ValidationExceptionType = "TIMING_SOURCE_MISSING" + ValidationExceptionTypeUpdatePeriodSmallerThanSegmentDuration ValidationExceptionType = "UPDATE_PERIOD_SMALLER_THAN_SEGMENT_DURATION" + ValidationExceptionTypePeriodTriggersNoneSpecifiedWithAdditionalValues ValidationExceptionType = "PERIOD_TRIGGERS_NONE_SPECIFIED_WITH_ADDITIONAL_VALUES" + ValidationExceptionTypeDrmSignalingMismatchSegmentEncryptionStatus ValidationExceptionType = "DRM_SIGNALING_MISMATCH_SEGMENT_ENCRYPTION_STATUS" ) // Values returns all known values for ValidationExceptionType. Note that this can @@ -287,6 +393,7 @@ func (ValidationExceptionType) Values() []ValidationExceptionType { "ENCRYPTION_CONTRACT_SHARED", "NUM_MANIFESTS_LOW", "NUM_MANIFESTS_HIGH", + "MANIFEST_DRM_SYSTEMS_INCOMPATIBLE", "DRM_SYSTEMS_ENCRYPTION_METHOD_INCOMPATIBLE", "ROLE_ARN_NOT_ASSUMABLE", "ROLE_ARN_LENGTH_OUT_OF_RANGE", @@ -311,5 +418,12 @@ func (ValidationExceptionType) Values() []ValidationExceptionType { "INVALID_MANIFEST_FILTER", "INVALID_TIME_DELAY_SECONDS", "END_TIME_EARLIER_THAN_START_TIME", + "TS_CONTAINER_TYPE_WITH_DASH_MANIFEST", + "DIRECT_MODE_WITH_TIMING_SOURCE", + "NONE_MODE_WITH_TIMING_SOURCE", + "TIMING_SOURCE_MISSING", + "UPDATE_PERIOD_SMALLER_THAN_SEGMENT_DURATION", + "PERIOD_TRIGGERS_NONE_SPECIFIED_WITH_ADDITIONAL_VALUES", + "DRM_SIGNALING_MISMATCH_SEGMENT_ENCRYPTION_STATUS", } } diff --git a/service/mediapackagev2/types/types.go b/service/mediapackagev2/types/types.go index 60604b751a0..0b4b0e32635 100644 --- a/service/mediapackagev2/types/types.go +++ b/service/mediapackagev2/types/types.go @@ -76,6 +76,66 @@ type ChannelListConfiguration struct { noSmithyDocumentSerde } +// Create a DASH manifest configuration. +type CreateDashManifestConfiguration struct { + + // A short string that's appended to the endpoint URL. The child manifest name + // creates a unique path to this endpoint. + // + // This member is required. + ManifestName *string + + // Determines how the DASH manifest signals the DRM content. + DrmSignaling DashDrmSignaling + + // Filter configuration includes settings for manifest filtering, start and end + // times, and time delay that apply to all of your egress requests for this + // manifest. + FilterConfiguration *FilterConfiguration + + // The total duration (in seconds) of the manifest's content. + ManifestWindowSeconds *int32 + + // Minimum amount of content (in seconds) that a player must keep available in the + // buffer. + MinBufferTimeSeconds *int32 + + // Minimum amount of time (in seconds) that the player should wait before + // requesting updates to the manifest. + MinUpdatePeriodSeconds *int32 + + // A list of triggers that controls when AWS Elemental MediaPackage separates the + // MPEG-DASH manifest into multiple periods. Type ADS to indicate that AWS + // Elemental MediaPackage must create periods in the output manifest that + // correspond to SCTE-35 ad markers in the input source. Leave this value empty to + // indicate that the manifest is contained all in one period. For more information + // about periods in the DASH manifest, see Multi-period DASH in AWS Elemental + // MediaPackage (https://docs.aws.amazon.com/mediapackage/latest/userguide/multi-period.html) + // . + PeriodTriggers []DashPeriodTrigger + + // The SCTE configuration. + ScteDash *ScteDash + + // Determines the type of variable used in the media URL of the SegmentTemplate + // tag in the manifest. Also specifies if segment timeline information is included + // in SegmentTimeline or SegmentTemplate . Value description: + // - NUMBER_WITH_TIMELINE - The $Number$ variable is used in the media URL. The + // value of this variable is the sequential number of the segment. A full + // SegmentTimeline object is presented in each SegmentTemplate . + SegmentTemplateFormat DashSegmentTemplateFormat + + // The amount of time (in seconds) that the player should be from the end of the + // manifest. + SuggestedPresentationDelaySeconds *int32 + + // Determines the type of UTC timing included in the DASH Media Presentation + // Description (MPD). + UtcTiming *DashUtcTiming + + noSmithyDocumentSerde +} + // Create an HTTP live streaming (HLS) manifest configuration. type CreateHlsManifestConfiguration struct { @@ -162,6 +222,20 @@ type CreateLowLatencyHlsManifestConfiguration struct { noSmithyDocumentSerde } +// Determines the type of UTC timing included in the DASH Media Presentation +// Description (MPD). +type DashUtcTiming struct { + + // The UTC timing mode. + TimingMode DashUtcTimingMode + + // The the method that the player uses to synchronize to coordinated universal + // time (UTC) wall clock time. + TimingSource *string + + noSmithyDocumentSerde +} + // The parameters for encrypting content. type Encryption struct { @@ -289,6 +363,70 @@ type FilterConfiguration struct { noSmithyDocumentSerde } +// Retrieve the DASH manifest configuration. +type GetDashManifestConfiguration struct { + + // A short string that's appended to the endpoint URL. The manifest name creates a + // unique path to this endpoint. If you don't enter a value, MediaPackage uses the + // default manifest name, index. + // + // This member is required. + ManifestName *string + + // The egress domain URL for stream delivery from MediaPackage. + // + // This member is required. + Url *string + + // Determines how the DASH manifest signals the DRM content. + DrmSignaling DashDrmSignaling + + // Filter configuration includes settings for manifest filtering, start and end + // times, and time delay that apply to all of your egress requests for this + // manifest. + FilterConfiguration *FilterConfiguration + + // The total duration (in seconds) of the manifest's content. + ManifestWindowSeconds *int32 + + // Minimum amount of content (in seconds) that a player must keep available in the + // buffer. + MinBufferTimeSeconds *int32 + + // Minimum amount of time (in seconds) that the player should wait before + // requesting updates to the manifest. + MinUpdatePeriodSeconds *int32 + + // A list of triggers that controls when AWS Elemental MediaPackage separates the + // MPEG-DASH manifest into multiple periods. Leave this value empty to indicate + // that the manifest is contained all in one period. For more information about + // periods in the DASH manifest, see Multi-period DASH in AWS Elemental + // MediaPackage (https://docs.aws.amazon.com/mediapackage/latest/userguide/multi-period.html) + // . + PeriodTriggers []DashPeriodTrigger + + // The SCTE configuration. + ScteDash *ScteDash + + // Determines the type of variable used in the media URL of the SegmentTemplate + // tag in the manifest. Also specifies if segment timeline information is included + // in SegmentTimeline or SegmentTemplate . Value description: + // - NUMBER_WITH_TIMELINE - The $Number$ variable is used in the media URL. The + // value of this variable is the sequential number of the segment. A full + // SegmentTimeline object is presented in each SegmentTemplate . + SegmentTemplateFormat DashSegmentTemplateFormat + + // The amount of time (in seconds) that the player should be from the end of the + // manifest. + SuggestedPresentationDelaySeconds *int32 + + // Determines the type of UTC timing included in the DASH Media Presentation + // Description (MPD). + UtcTiming *DashUtcTiming + + noSmithyDocumentSerde +} + // Retrieve the HTTP live streaming (HLS) manifest configuration. type GetHlsManifestConfiguration struct { @@ -397,6 +535,22 @@ type IngestEndpoint struct { noSmithyDocumentSerde } +// List the DASH manifest configuration. +type ListDashManifestConfiguration struct { + + // A short string that's appended to the endpoint URL. The manifest name creates a + // unique path to this endpoint. If you don't enter a value, MediaPackage uses the + // default manifest name, index. + // + // This member is required. + ManifestName *string + + // The egress domain URL for stream delivery from MediaPackage. + Url *string + + noSmithyDocumentSerde +} + // List the HTTP live streaming (HLS) manifest configuration. type ListHlsManifestConfiguration struct { @@ -487,6 +641,9 @@ type OriginEndpointListConfiguration struct { // The date and time the origin endpoint was created. CreatedAt *time.Time + // A DASH manifest configuration. + DashManifests []ListDashManifestConfiguration + // Any descriptive information that you want to add to the origin endpoint for // future identification purposes. Description *string @@ -513,6 +670,20 @@ type Scte struct { noSmithyDocumentSerde } +// The SCTE configuration. +type ScteDash struct { + + // Choose how ad markers are included in the packaged content. If you include ad + // markers in the content stream in your upstream encoders, then you need to inform + // MediaPackage what to do with the ad markers in the output. Value description: + // - Binary - The SCTE-35 marker is expressed as a hex-string (Base64 string) + // rather than full XML. + // - XML - The SCTE marker is expressed fully in XML. + AdMarkerDash AdMarkerDash + + noSmithyDocumentSerde +} + // The SCTE configuration. type ScteHls struct { diff --git a/service/mediapackagev2/validators.go b/service/mediapackagev2/validators.go index b3fce510cbe..7fe3b6be7bf 100644 --- a/service/mediapackagev2/validators.go +++ b/service/mediapackagev2/validators.go @@ -562,6 +562,38 @@ func addOpUpdateOriginEndpointValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpUpdateOriginEndpoint{}, middleware.After) } +func validateCreateDashManifestConfiguration(v *types.CreateDashManifestConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDashManifestConfiguration"} + if v.ManifestName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ManifestName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCreateDashManifests(v []types.CreateDashManifestConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDashManifests"} + for i := range v { + if err := validateCreateDashManifestConfiguration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCreateHlsManifestConfiguration(v *types.CreateHlsManifestConfiguration) error { if v == nil { return nil @@ -779,6 +811,11 @@ func validateOpCreateOriginEndpointInput(v *CreateOriginEndpointInput) error { invalidParams.AddNested("LowLatencyHlsManifests", err.(smithy.InvalidParamsError)) } } + if v.DashManifests != nil { + if err := validateCreateDashManifests(v.DashManifests); err != nil { + invalidParams.AddNested("DashManifests", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1166,6 +1203,11 @@ func validateOpUpdateOriginEndpointInput(v *UpdateOriginEndpointInput) error { invalidParams.AddNested("LowLatencyHlsManifests", err.(smithy.InvalidParamsError)) } } + if v.DashManifests != nil { + if err := validateCreateDashManifests(v.DashManifests); err != nil { + invalidParams.AddNested("DashManifests", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/outposts/api_op_CancelCapacityTask.go b/service/outposts/api_op_CancelCapacityTask.go new file mode 100644 index 00000000000..251fc8d2e80 --- /dev/null +++ b/service/outposts/api_op_CancelCapacityTask.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancels the capacity task. +func (c *Client) CancelCapacityTask(ctx context.Context, params *CancelCapacityTaskInput, optFns ...func(*Options)) (*CancelCapacityTaskOutput, error) { + if params == nil { + params = &CancelCapacityTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelCapacityTask", params, optFns, c.addOperationCancelCapacityTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelCapacityTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelCapacityTaskInput struct { + + // ID of the capacity task that you want to cancel. + // + // This member is required. + CapacityTaskId *string + + // ID or ARN of the Outpost associated with the capacity task that you want to + // cancel. + // + // This member is required. + OutpostIdentifier *string + + noSmithyDocumentSerde +} + +type CancelCapacityTaskOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelCapacityTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelCapacityTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelCapacityTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CancelCapacityTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCancelCapacityTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelCapacityTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelCapacityTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CancelCapacityTask", + } +} diff --git a/service/outposts/api_op_DeleteOutpost.go b/service/outposts/api_op_DeleteOutpost.go index 282301210b4..a4b3f4d7fd6 100644 --- a/service/outposts/api_op_DeleteOutpost.go +++ b/service/outposts/api_op_DeleteOutpost.go @@ -28,7 +28,7 @@ func (c *Client) DeleteOutpost(ctx context.Context, params *DeleteOutpostInput, type DeleteOutpostInput struct { - // The ID or the Amazon Resource Name (ARN) of the Outpost. + // The ID or ARN of the Outpost. // // This member is required. OutpostId *string diff --git a/service/outposts/api_op_GetCapacityTask.go b/service/outposts/api_op_GetCapacityTask.go new file mode 100644 index 00000000000..121aa23551f --- /dev/null +++ b/service/outposts/api_op_GetCapacityTask.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets details of the specified capacity task. +func (c *Client) GetCapacityTask(ctx context.Context, params *GetCapacityTaskInput, optFns ...func(*Options)) (*GetCapacityTaskOutput, error) { + if params == nil { + params = &GetCapacityTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCapacityTask", params, optFns, c.addOperationGetCapacityTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCapacityTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCapacityTaskInput struct { + + // ID of the capacity task. + // + // This member is required. + CapacityTaskId *string + + // ID or ARN of the Outpost associated with the specified capacity task. + // + // This member is required. + OutpostIdentifier *string + + noSmithyDocumentSerde +} + +type GetCapacityTaskOutput struct { + + // ID of the capacity task. + CapacityTaskId *string + + // Status of the capacity task. A capacity task can have one of the following + // statuses: + // - REQUESTED - The capacity task was created and is awaiting the next step by + // Amazon Web Services Outposts. + // - IN_PROGRESS - The capacity task is running and cannot be cancelled. + // - WAITING_FOR_EVACUATION - The capacity task requires capacity to run. You + // must stop the recommended EC2 running instances to free up capacity for the task + // to run. + CapacityTaskStatus types.CapacityTaskStatus + + // The date the capacity task ran successfully. + CompletionDate *time.Time + + // The date the capacity task was created. + CreationDate *time.Time + + // Performs a dry run to determine if you are above or below instance capacity. + DryRun bool + + // Reason why the capacity task failed. + Failed *types.CapacityTaskFailure + + // The date the capacity task was last modified. + LastModifiedDate *time.Time + + // ID of the Amazon Web Services Outposts order associated with the specified + // capacity task. + OrderId *string + + // ID of the Outpost associated with the specified capacity task. + OutpostId *string + + // List of instance pools requested in the capacity task. + RequestedInstancePools []types.InstanceTypeCapacity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCapacityTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCapacityTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCapacityTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCapacityTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetCapacityTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCapacityTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCapacityTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCapacityTask", + } +} diff --git a/service/outposts/api_op_GetOutpost.go b/service/outposts/api_op_GetOutpost.go index 8a16cf5fe07..c7e1507f314 100644 --- a/service/outposts/api_op_GetOutpost.go +++ b/service/outposts/api_op_GetOutpost.go @@ -29,7 +29,7 @@ func (c *Client) GetOutpost(ctx context.Context, params *GetOutpostInput, optFns type GetOutpostInput struct { - // The ID or the Amazon Resource Name (ARN) of the Outpost. + // The ID or ARN of the Outpost. // // This member is required. OutpostId *string diff --git a/service/outposts/api_op_GetOutpostInstanceTypes.go b/service/outposts/api_op_GetOutpostInstanceTypes.go index 7a749940c2c..928eabccdc9 100644 --- a/service/outposts/api_op_GetOutpostInstanceTypes.go +++ b/service/outposts/api_op_GetOutpostInstanceTypes.go @@ -29,7 +29,7 @@ func (c *Client) GetOutpostInstanceTypes(ctx context.Context, params *GetOutpost type GetOutpostInstanceTypesInput struct { - // The ID or the Amazon Resource Name (ARN) of the Outpost. + // The ID or ARN of the Outpost. // // This member is required. OutpostId *string diff --git a/service/outposts/api_op_GetOutpostSupportedInstanceTypes.go b/service/outposts/api_op_GetOutpostSupportedInstanceTypes.go new file mode 100644 index 00000000000..24a1a687b8c --- /dev/null +++ b/service/outposts/api_op_GetOutpostSupportedInstanceTypes.go @@ -0,0 +1,245 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the instance types that an Outpost can support in InstanceTypeCapacity . +// This will generally include instance types that are not currently configured and +// therefore cannot be launched with the current Outpost capacity configuration. +func (c *Client) GetOutpostSupportedInstanceTypes(ctx context.Context, params *GetOutpostSupportedInstanceTypesInput, optFns ...func(*Options)) (*GetOutpostSupportedInstanceTypesOutput, error) { + if params == nil { + params = &GetOutpostSupportedInstanceTypesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOutpostSupportedInstanceTypes", params, optFns, c.addOperationGetOutpostSupportedInstanceTypesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOutpostSupportedInstanceTypesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOutpostSupportedInstanceTypesInput struct { + + // The ID for the Amazon Web Services Outposts order. + // + // This member is required. + OrderId *string + + // The ID or ARN of the Outpost. + // + // This member is required. + OutpostIdentifier *string + + // The maximum page size. + MaxResults *int32 + + // The pagination token. + NextToken *string + + noSmithyDocumentSerde +} + +type GetOutpostSupportedInstanceTypesOutput struct { + + // Information about the instance types. + InstanceTypes []types.InstanceTypeItem + + // The pagination token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOutpostSupportedInstanceTypesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetOutpostSupportedInstanceTypes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetOutpostSupportedInstanceTypes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOutpostSupportedInstanceTypes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetOutpostSupportedInstanceTypesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOutpostSupportedInstanceTypes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// GetOutpostSupportedInstanceTypesAPIClient is a client that implements the +// GetOutpostSupportedInstanceTypes operation. +type GetOutpostSupportedInstanceTypesAPIClient interface { + GetOutpostSupportedInstanceTypes(context.Context, *GetOutpostSupportedInstanceTypesInput, ...func(*Options)) (*GetOutpostSupportedInstanceTypesOutput, error) +} + +var _ GetOutpostSupportedInstanceTypesAPIClient = (*Client)(nil) + +// GetOutpostSupportedInstanceTypesPaginatorOptions is the paginator options for +// GetOutpostSupportedInstanceTypes +type GetOutpostSupportedInstanceTypesPaginatorOptions struct { + // The maximum page size. + 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 +} + +// GetOutpostSupportedInstanceTypesPaginator is a paginator for +// GetOutpostSupportedInstanceTypes +type GetOutpostSupportedInstanceTypesPaginator struct { + options GetOutpostSupportedInstanceTypesPaginatorOptions + client GetOutpostSupportedInstanceTypesAPIClient + params *GetOutpostSupportedInstanceTypesInput + nextToken *string + firstPage bool +} + +// NewGetOutpostSupportedInstanceTypesPaginator returns a new +// GetOutpostSupportedInstanceTypesPaginator +func NewGetOutpostSupportedInstanceTypesPaginator(client GetOutpostSupportedInstanceTypesAPIClient, params *GetOutpostSupportedInstanceTypesInput, optFns ...func(*GetOutpostSupportedInstanceTypesPaginatorOptions)) *GetOutpostSupportedInstanceTypesPaginator { + if params == nil { + params = &GetOutpostSupportedInstanceTypesInput{} + } + + options := GetOutpostSupportedInstanceTypesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetOutpostSupportedInstanceTypesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetOutpostSupportedInstanceTypesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetOutpostSupportedInstanceTypes page. +func (p *GetOutpostSupportedInstanceTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetOutpostSupportedInstanceTypesOutput, 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.GetOutpostSupportedInstanceTypes(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_opGetOutpostSupportedInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOutpostSupportedInstanceTypes", + } +} diff --git a/service/outposts/api_op_ListCapacityTasks.go b/service/outposts/api_op_ListCapacityTasks.go new file mode 100644 index 00000000000..d7bc4f5bc43 --- /dev/null +++ b/service/outposts/api_op_ListCapacityTasks.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the capacity tasks for your Amazon Web Services account. Use filters to +// return specific results. If you specify multiple filters, the results include +// only the resources that match all of the specified filters. For a filter where +// you can specify multiple values, the results include items that match any of the +// values that you specify for the filter. +func (c *Client) ListCapacityTasks(ctx context.Context, params *ListCapacityTasksInput, optFns ...func(*Options)) (*ListCapacityTasksOutput, error) { + if params == nil { + params = &ListCapacityTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCapacityTasks", params, optFns, c.addOperationListCapacityTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCapacityTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCapacityTasksInput struct { + + // A list of statuses. For example, REQUESTED or WAITING_FOR_EVACUATION . + CapacityTaskStatusFilter []types.CapacityTaskStatus + + // The maximum page size. + MaxResults *int32 + + // The pagination token. + NextToken *string + + // Filters the results by an Outpost ID or an Outpost ARN. + OutpostIdentifierFilter *string + + noSmithyDocumentSerde +} + +type ListCapacityTasksOutput struct { + + // Lists all the capacity tasks. + CapacityTasks []types.CapacityTaskSummary + + // The pagination token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCapacityTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCapacityTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCapacityTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCapacityTasks"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCapacityTasks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListCapacityTasksAPIClient is a client that implements the ListCapacityTasks +// operation. +type ListCapacityTasksAPIClient interface { + ListCapacityTasks(context.Context, *ListCapacityTasksInput, ...func(*Options)) (*ListCapacityTasksOutput, error) +} + +var _ ListCapacityTasksAPIClient = (*Client)(nil) + +// ListCapacityTasksPaginatorOptions is the paginator options for ListCapacityTasks +type ListCapacityTasksPaginatorOptions struct { + // The maximum page size. + 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 +} + +// ListCapacityTasksPaginator is a paginator for ListCapacityTasks +type ListCapacityTasksPaginator struct { + options ListCapacityTasksPaginatorOptions + client ListCapacityTasksAPIClient + params *ListCapacityTasksInput + nextToken *string + firstPage bool +} + +// NewListCapacityTasksPaginator returns a new ListCapacityTasksPaginator +func NewListCapacityTasksPaginator(client ListCapacityTasksAPIClient, params *ListCapacityTasksInput, optFns ...func(*ListCapacityTasksPaginatorOptions)) *ListCapacityTasksPaginator { + if params == nil { + params = &ListCapacityTasksInput{} + } + + options := ListCapacityTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCapacityTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCapacityTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCapacityTasks page. +func (p *ListCapacityTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCapacityTasksOutput, 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.ListCapacityTasks(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_opListCapacityTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCapacityTasks", + } +} diff --git a/service/outposts/api_op_StartCapacityTask.go b/service/outposts/api_op_StartCapacityTask.go new file mode 100644 index 00000000000..d32acb4361f --- /dev/null +++ b/service/outposts/api_op_StartCapacityTask.go @@ -0,0 +1,183 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Starts the specified capacity task. You can have one active capacity task for +// an order. +func (c *Client) StartCapacityTask(ctx context.Context, params *StartCapacityTaskInput, optFns ...func(*Options)) (*StartCapacityTaskOutput, error) { + if params == nil { + params = &StartCapacityTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartCapacityTask", params, optFns, c.addOperationStartCapacityTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartCapacityTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartCapacityTaskInput struct { + + // The instance pools specified in the capacity task. + // + // This member is required. + InstancePools []types.InstanceTypeCapacity + + // The ID of the Amazon Web Services Outposts order associated with the specified + // capacity task. + // + // This member is required. + OrderId *string + + // The ID or ARN of the Outposts associated with the specified capacity task. + // + // This member is required. + OutpostIdentifier *string + + // You can request a dry run to determine if the instance type and instance size + // changes is above or below available instance capacity. Requesting a dry run does + // not make any changes to your plan. + DryRun bool + + noSmithyDocumentSerde +} + +type StartCapacityTaskOutput struct { + + // ID of the capacity task that you want to start. + CapacityTaskId *string + + // Status of the specified capacity task. + CapacityTaskStatus types.CapacityTaskStatus + + // Date that the specified capacity task ran successfully. + CompletionDate *time.Time + + // Date that the specified capacity task was created. + CreationDate *time.Time + + // Results of the dry run showing if the specified capacity task is above or below + // the available instance capacity. + DryRun bool + + // Reason that the specified capacity task failed. + Failed *types.CapacityTaskFailure + + // Date that the specified capacity task was last modified. + LastModifiedDate *time.Time + + // ID of the Amazon Web Services Outposts order of the host associated with the + // capacity task. + OrderId *string + + // ID of the Outpost associated with the capacity task. + OutpostId *string + + // List of the instance pools requested in the specified capacity task. + RequestedInstancePools []types.InstanceTypeCapacity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartCapacityTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartCapacityTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartCapacityTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartCapacityTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpStartCapacityTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartCapacityTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartCapacityTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartCapacityTask", + } +} diff --git a/service/outposts/api_op_UpdateOutpost.go b/service/outposts/api_op_UpdateOutpost.go index fe652722e20..598289c163a 100644 --- a/service/outposts/api_op_UpdateOutpost.go +++ b/service/outposts/api_op_UpdateOutpost.go @@ -29,7 +29,7 @@ func (c *Client) UpdateOutpost(ctx context.Context, params *UpdateOutpostInput, type UpdateOutpostInput struct { - // The ID or the Amazon Resource Name (ARN) of the Outpost. + // The ID or ARN of the Outpost. // // This member is required. OutpostId *string diff --git a/service/outposts/deserializers.go b/service/outposts/deserializers.go index 31ed894d642..ba589b80c05 100644 --- a/service/outposts/deserializers.go +++ b/service/outposts/deserializers.go @@ -20,6 +20,101 @@ import ( "strings" ) +type awsRestjson1_deserializeOpCancelCapacityTask struct { +} + +func (*awsRestjson1_deserializeOpCancelCapacityTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelCapacityTask) HandleDeserialize(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_deserializeOpErrorCancelCapacityTask(response, &metadata) + } + output := &CancelCapacityTaskOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCancelCapacityTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpCancelOrder struct { } @@ -788,14 +883,14 @@ func awsRestjson1_deserializeOpErrorDeleteSite(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpGetCatalogItem struct { +type awsRestjson1_deserializeOpGetCapacityTask struct { } -func (*awsRestjson1_deserializeOpGetCatalogItem) ID() string { +func (*awsRestjson1_deserializeOpGetCapacityTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetCatalogItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCapacityTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -809,9 +904,9 @@ func (m *awsRestjson1_deserializeOpGetCatalogItem) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetCatalogItem(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCapacityTask(response, &metadata) } - output := &GetCatalogItemOutput{} + output := &GetCapacityTaskOutput{} out.Result = output var buff [1024]byte @@ -832,7 +927,7 @@ func (m *awsRestjson1_deserializeOpGetCatalogItem) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCapacityTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -845,7 +940,7 @@ func (m *awsRestjson1_deserializeOpGetCatalogItem) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetCatalogItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCapacityTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -886,6 +981,9 @@ func awsRestjson1_deserializeOpErrorGetCatalogItem(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -905,7 +1003,7 @@ func awsRestjson1_deserializeOpErrorGetCatalogItem(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(v **GetCatalogItemOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCapacityTaskOutput(v **GetCapacityTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -918,17 +1016,115 @@ func awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(v **GetCatalogItemOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetCatalogItemOutput + var sv *GetCapacityTaskOutput if *v == nil { - sv = &GetCatalogItemOutput{} + sv = &GetCapacityTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CatalogItem": - if err := awsRestjson1_deserializeDocumentCatalogItem(&sv.CatalogItem, value); err != nil { + case "CapacityTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskId to be of type string, got %T instead", value) + } + sv.CapacityTaskId = ptr.String(jtv) + } + + case "CapacityTaskStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskStatus to be of type string, got %T instead", value) + } + sv.CapacityTaskStatus = types.CapacityTaskStatus(jtv) + } + + case "CompletionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "CreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DryRun": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected DryRun to be of type *bool, got %T instead", value) + } + sv.DryRun = jtv + } + + case "Failed": + if err := awsRestjson1_deserializeDocumentCapacityTaskFailure(&sv.Failed, value); err != nil { + return err + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OrderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrderId to be of type string, got %T instead", value) + } + sv.OrderId = ptr.String(jtv) + } + + case "OutpostId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostId to be of type string, got %T instead", value) + } + sv.OutpostId = ptr.String(jtv) + } + + case "RequestedInstancePools": + if err := awsRestjson1_deserializeDocumentRequestedInstancePools(&sv.RequestedInstancePools, value); err != nil { return err } @@ -941,14 +1137,14 @@ func awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(v **GetCatalogItemOu return nil } -type awsRestjson1_deserializeOpGetConnection struct { +type awsRestjson1_deserializeOpGetCatalogItem struct { } -func (*awsRestjson1_deserializeOpGetConnection) ID() string { +func (*awsRestjson1_deserializeOpGetCatalogItem) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCatalogItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -962,9 +1158,9 @@ func (m *awsRestjson1_deserializeOpGetConnection) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetConnection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCatalogItem(response, &metadata) } - output := &GetConnectionOutput{} + output := &GetCatalogItemOutput{} out.Result = output var buff [1024]byte @@ -985,7 +1181,7 @@ func (m *awsRestjson1_deserializeOpGetConnection) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetConnectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -998,7 +1194,7 @@ func (m *awsRestjson1_deserializeOpGetConnection) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCatalogItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1039,9 +1235,6 @@ func awsRestjson1_deserializeOpErrorGetConnection(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -1061,7 +1254,7 @@ func awsRestjson1_deserializeOpErrorGetConnection(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetConnectionOutput(v **GetConnectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(v **GetCatalogItemOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1074,29 +1267,20 @@ func awsRestjson1_deserializeOpDocumentGetConnectionOutput(v **GetConnectionOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetConnectionOutput + var sv *GetCatalogItemOutput if *v == nil { - sv = &GetConnectionOutput{} + sv = &GetCatalogItemOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ConnectionDetails": - if err := awsRestjson1_deserializeDocumentConnectionDetails(&sv.ConnectionDetails, value); err != nil { + case "CatalogItem": + if err := awsRestjson1_deserializeDocumentCatalogItem(&sv.CatalogItem, value); err != nil { return err } - case "ConnectionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value) - } - sv.ConnectionId = ptr.String(jtv) - } - default: _, _ = key, value @@ -1106,14 +1290,14 @@ func awsRestjson1_deserializeOpDocumentGetConnectionOutput(v **GetConnectionOutp return nil } -type awsRestjson1_deserializeOpGetOrder struct { +type awsRestjson1_deserializeOpGetConnection struct { } -func (*awsRestjson1_deserializeOpGetOrder) ID() string { +func (*awsRestjson1_deserializeOpGetConnection) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1127,9 +1311,9 @@ func (m *awsRestjson1_deserializeOpGetOrder) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetOrder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetConnection(response, &metadata) } - output := &GetOrderOutput{} + output := &GetConnectionOutput{} out.Result = output var buff [1024]byte @@ -1150,7 +1334,7 @@ func (m *awsRestjson1_deserializeOpGetOrder) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetOrderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1163,7 +1347,7 @@ func (m *awsRestjson1_deserializeOpGetOrder) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1204,6 +1388,9 @@ func awsRestjson1_deserializeOpErrorGetOrder(response *smithyhttp.Response, meta } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -1223,7 +1410,7 @@ func awsRestjson1_deserializeOpErrorGetOrder(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentGetOrderOutput(v **GetOrderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetConnectionOutput(v **GetConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1236,20 +1423,29 @@ func awsRestjson1_deserializeOpDocumentGetOrderOutput(v **GetOrderOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetOrderOutput + var sv *GetConnectionOutput if *v == nil { - sv = &GetOrderOutput{} + sv = &GetConnectionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Order": - if err := awsRestjson1_deserializeDocumentOrder(&sv.Order, value); err != nil { + case "ConnectionDetails": + if err := awsRestjson1_deserializeDocumentConnectionDetails(&sv.ConnectionDetails, value); err != nil { return err } + case "ConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value) + } + sv.ConnectionId = ptr.String(jtv) + } + default: _, _ = key, value @@ -1259,14 +1455,14 @@ func awsRestjson1_deserializeOpDocumentGetOrderOutput(v **GetOrderOutput, value return nil } -type awsRestjson1_deserializeOpGetOutpost struct { +type awsRestjson1_deserializeOpGetOrder struct { } -func (*awsRestjson1_deserializeOpGetOutpost) ID() string { +func (*awsRestjson1_deserializeOpGetOrder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1280,9 +1476,9 @@ func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetOutpost(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetOrder(response, &metadata) } - output := &GetOutpostOutput{} + output := &GetOrderOutput{} out.Result = output var buff [1024]byte @@ -1303,7 +1499,7 @@ func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetOutpostOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetOrderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1316,7 +1512,7 @@ func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1357,9 +1553,6 @@ func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, me } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -1379,7 +1572,7 @@ func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetOrderOutput(v **GetOrderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1392,17 +1585,17 @@ func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetOutpostOutput + var sv *GetOrderOutput if *v == nil { - sv = &GetOutpostOutput{} + sv = &GetOrderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Outpost": - if err := awsRestjson1_deserializeDocumentOutpost(&sv.Outpost, value); err != nil { + case "Order": + if err := awsRestjson1_deserializeDocumentOrder(&sv.Order, value); err != nil { return err } @@ -1415,14 +1608,14 @@ func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, va return nil } -type awsRestjson1_deserializeOpGetOutpostInstanceTypes struct { +type awsRestjson1_deserializeOpGetOutpost struct { } -func (*awsRestjson1_deserializeOpGetOutpostInstanceTypes) ID() string { +func (*awsRestjson1_deserializeOpGetOutpost) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1436,9 +1629,9 @@ func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetOutpost(response, &metadata) } - output := &GetOutpostInstanceTypesOutput{} + output := &GetOutpostOutput{} out.Result = output var buff [1024]byte @@ -1459,7 +1652,7 @@ func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetOutpostOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1472,7 +1665,7 @@ func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1535,7 +1728,7 @@ func awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutpostInstanceTypesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1548,47 +1741,20 @@ func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetOutpostInstanceTypesOutput + var sv *GetOutpostOutput if *v == nil { - sv = &GetOutpostInstanceTypesOutput{} + sv = &GetOutpostOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "InstanceTypes": - if err := awsRestjson1_deserializeDocumentInstanceTypeListDefinition(&sv.InstanceTypes, value); err != nil { + case "Outpost": + if err := awsRestjson1_deserializeDocumentOutpost(&sv.Outpost, value); err != nil { return err } - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Token to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "OutpostArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OutpostArn to be of type string, got %T instead", value) - } - sv.OutpostArn = ptr.String(jtv) - } - - case "OutpostId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OutpostId to be of type string, got %T instead", value) - } - sv.OutpostId = ptr.String(jtv) - } - default: _, _ = key, value @@ -1598,14 +1764,14 @@ func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutp return nil } -type awsRestjson1_deserializeOpGetSite struct { +type awsRestjson1_deserializeOpGetOutpostInstanceTypes struct { } -func (*awsRestjson1_deserializeOpGetSite) ID() string { +func (*awsRestjson1_deserializeOpGetOutpostInstanceTypes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1619,9 +1785,9 @@ func (m *awsRestjson1_deserializeOpGetSite) HandleDeserialize(ctx context.Contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSite(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response, &metadata) } - output := &GetSiteOutput{} + output := &GetOutpostInstanceTypesOutput{} out.Result = output var buff [1024]byte @@ -1642,7 +1808,7 @@ func (m *awsRestjson1_deserializeOpGetSite) HandleDeserialize(ctx context.Contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSiteOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1655,7 +1821,7 @@ func (m *awsRestjson1_deserializeOpGetSite) HandleDeserialize(ctx context.Contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1718,7 +1884,7 @@ func awsRestjson1_deserializeOpErrorGetSite(response *smithyhttp.Response, metad } } -func awsRestjson1_deserializeOpDocumentGetSiteOutput(v **GetSiteOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutpostInstanceTypesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1731,20 +1897,47 @@ func awsRestjson1_deserializeOpDocumentGetSiteOutput(v **GetSiteOutput, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSiteOutput + var sv *GetOutpostInstanceTypesOutput if *v == nil { - sv = &GetSiteOutput{} + sv = &GetOutpostInstanceTypesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Site": - if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { + case "InstanceTypes": + if err := awsRestjson1_deserializeDocumentInstanceTypeListDefinition(&sv.InstanceTypes, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "OutpostArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostArn to be of type string, got %T instead", value) + } + sv.OutpostArn = ptr.String(jtv) + } + + case "OutpostId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostId to be of type string, got %T instead", value) + } + sv.OutpostId = ptr.String(jtv) + } + default: _, _ = key, value @@ -1754,14 +1947,14 @@ func awsRestjson1_deserializeOpDocumentGetSiteOutput(v **GetSiteOutput, value in return nil } -type awsRestjson1_deserializeOpGetSiteAddress struct { +type awsRestjson1_deserializeOpGetOutpostSupportedInstanceTypes struct { } -func (*awsRestjson1_deserializeOpGetSiteAddress) ID() string { +func (*awsRestjson1_deserializeOpGetOutpostSupportedInstanceTypes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSiteAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetOutpostSupportedInstanceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1775,9 +1968,9 @@ func (m *awsRestjson1_deserializeOpGetSiteAddress) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSiteAddress(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetOutpostSupportedInstanceTypes(response, &metadata) } - output := &GetSiteAddressOutput{} + output := &GetOutpostSupportedInstanceTypesOutput{} out.Result = output var buff [1024]byte @@ -1798,7 +1991,7 @@ func (m *awsRestjson1_deserializeOpGetSiteAddress) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetOutpostSupportedInstanceTypesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1811,7 +2004,7 @@ func (m *awsRestjson1_deserializeOpGetSiteAddress) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSiteAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetOutpostSupportedInstanceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1874,7 +2067,7 @@ func awsRestjson1_deserializeOpErrorGetSiteAddress(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(v **GetSiteAddressOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetOutpostSupportedInstanceTypesOutput(v **GetOutpostSupportedInstanceTypesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1887,36 +2080,27 @@ func awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(v **GetSiteAddressOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSiteAddressOutput + var sv *GetOutpostSupportedInstanceTypesOutput if *v == nil { - sv = &GetSiteAddressOutput{} + sv = &GetOutpostSupportedInstanceTypesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Address": - if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + case "InstanceTypes": + if err := awsRestjson1_deserializeDocumentInstanceTypeListDefinition(&sv.InstanceTypes, value); err != nil { return err } - case "AddressType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AddressType to be of type string, got %T instead", value) - } - sv.AddressType = types.AddressType(jtv) - } - - case "SiteId": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SiteId to be of type string, got %T instead", value) + return fmt.Errorf("expected Token to be of type string, got %T instead", value) } - sv.SiteId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -1928,14 +2112,14 @@ func awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(v **GetSiteAddressOu return nil } -type awsRestjson1_deserializeOpListAssets struct { +type awsRestjson1_deserializeOpGetSite struct { } -func (*awsRestjson1_deserializeOpListAssets) ID() string { +func (*awsRestjson1_deserializeOpGetSite) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAssets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1949,9 +2133,9 @@ func (m *awsRestjson1_deserializeOpListAssets) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAssets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSite(response, &metadata) } - output := &ListAssetsOutput{} + output := &GetSiteOutput{} out.Result = output var buff [1024]byte @@ -1972,7 +2156,7 @@ func (m *awsRestjson1_deserializeOpListAssets) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAssetsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSiteOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1985,7 +2169,7 @@ func (m *awsRestjson1_deserializeOpListAssets) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAssets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2048,7 +2232,7 @@ func awsRestjson1_deserializeOpErrorListAssets(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListAssetsOutput(v **ListAssetsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSiteOutput(v **GetSiteOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2061,29 +2245,20 @@ func awsRestjson1_deserializeOpDocumentListAssetsOutput(v **ListAssetsOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAssetsOutput + var sv *GetSiteOutput if *v == nil { - sv = &ListAssetsOutput{} + sv = &GetSiteOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Assets": - if err := awsRestjson1_deserializeDocumentAssetListDefinition(&sv.Assets, value); err != nil { + case "Site": + if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { return err } - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Token to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -2093,14 +2268,14 @@ func awsRestjson1_deserializeOpDocumentListAssetsOutput(v **ListAssetsOutput, va return nil } -type awsRestjson1_deserializeOpListCatalogItems struct { +type awsRestjson1_deserializeOpGetSiteAddress struct { } -func (*awsRestjson1_deserializeOpListCatalogItems) ID() string { +func (*awsRestjson1_deserializeOpGetSiteAddress) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCatalogItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSiteAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2114,9 +2289,9 @@ func (m *awsRestjson1_deserializeOpListCatalogItems) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCatalogItems(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSiteAddress(response, &metadata) } - output := &ListCatalogItemsOutput{} + output := &GetSiteAddressOutput{} out.Result = output var buff [1024]byte @@ -2137,7 +2312,7 @@ func (m *awsRestjson1_deserializeOpListCatalogItems) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCatalogItemsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2150,7 +2325,7 @@ func (m *awsRestjson1_deserializeOpListCatalogItems) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCatalogItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSiteAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2191,6 +2366,9 @@ func awsRestjson1_deserializeOpErrorListCatalogItems(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -2210,7 +2388,7 @@ func awsRestjson1_deserializeOpErrorListCatalogItems(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListCatalogItemsOutput(v **ListCatalogItemsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(v **GetSiteAddressOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2223,27 +2401,36 @@ func awsRestjson1_deserializeOpDocumentListCatalogItemsOutput(v **ListCatalogIte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCatalogItemsOutput + var sv *GetSiteAddressOutput if *v == nil { - sv = &ListCatalogItemsOutput{} + sv = &GetSiteAddressOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CatalogItems": - if err := awsRestjson1_deserializeDocumentCatalogItemListDefinition(&sv.CatalogItems, value); err != nil { + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { return err } - case "NextToken": + case "AddressType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Token to be of type string, got %T instead", value) + return fmt.Errorf("expected AddressType to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.AddressType = types.AddressType(jtv) + } + + case "SiteId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SiteId to be of type string, got %T instead", value) + } + sv.SiteId = ptr.String(jtv) } default: @@ -2255,14 +2442,14 @@ func awsRestjson1_deserializeOpDocumentListCatalogItemsOutput(v **ListCatalogIte return nil } -type awsRestjson1_deserializeOpListOrders struct { +type awsRestjson1_deserializeOpListAssets struct { } -func (*awsRestjson1_deserializeOpListOrders) ID() string { +func (*awsRestjson1_deserializeOpListAssets) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListOrders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAssets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2276,9 +2463,9 @@ func (m *awsRestjson1_deserializeOpListOrders) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListOrders(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAssets(response, &metadata) } - output := &ListOrdersOutput{} + output := &ListAssetsOutput{} out.Result = output var buff [1024]byte @@ -2299,7 +2486,7 @@ func (m *awsRestjson1_deserializeOpListOrders) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListOrdersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAssetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2312,7 +2499,7 @@ func (m *awsRestjson1_deserializeOpListOrders) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListOrders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAssets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2375,7 +2562,7 @@ func awsRestjson1_deserializeOpErrorListOrders(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListOrdersOutput(v **ListOrdersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAssetsOutput(v **ListAssetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2388,18 +2575,510 @@ func awsRestjson1_deserializeOpDocumentListOrdersOutput(v **ListOrdersOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListOrdersOutput + var sv *ListAssetsOutput if *v == nil { - sv = &ListOrdersOutput{} + sv = &ListAssetsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) + case "Assets": + if err := awsRestjson1_deserializeDocumentAssetListDefinition(&sv.Assets, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCapacityTasks struct { +} + +func (*awsRestjson1_deserializeOpListCapacityTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCapacityTasks) HandleDeserialize(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_deserializeOpErrorListCapacityTasks(response, &metadata) + } + output := &ListCapacityTasksOutput{} + 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_deserializeOpDocumentListCapacityTasksOutput(&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_deserializeOpErrorListCapacityTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCapacityTasksOutput(v **ListCapacityTasksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCapacityTasksOutput + if *v == nil { + sv = &ListCapacityTasksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CapacityTasks": + if err := awsRestjson1_deserializeDocumentCapacityTaskList(&sv.CapacityTasks, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCatalogItems struct { +} + +func (*awsRestjson1_deserializeOpListCatalogItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCatalogItems) HandleDeserialize(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_deserializeOpErrorListCatalogItems(response, &metadata) + } + output := &ListCatalogItemsOutput{} + 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_deserializeOpDocumentListCatalogItemsOutput(&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_deserializeOpErrorListCatalogItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCatalogItemsOutput(v **ListCatalogItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCatalogItemsOutput + if *v == nil { + sv = &ListCatalogItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogItems": + if err := awsRestjson1_deserializeDocumentCatalogItemListDefinition(&sv.CatalogItems, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListOrders struct { +} + +func (*awsRestjson1_deserializeOpListOrders) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListOrders) HandleDeserialize(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_deserializeOpErrorListOrders(response, &metadata) + } + output := &ListOrdersOutput{} + 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_deserializeOpDocumentListOrdersOutput(&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_deserializeOpErrorListOrders(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListOrdersOutput(v **ListOrdersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOrdersOutput + if *v == nil { + sv = &ListOrdersOutput{} + } 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 Token to be of type string, got %T instead", value) } @@ -2881,10 +3560,267 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor sv = *v } - for key, value := range shape { - switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + 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_deserializeOpStartCapacityTask struct { +} + +func (*awsRestjson1_deserializeOpStartCapacityTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartCapacityTask) HandleDeserialize(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_deserializeOpErrorStartCapacityTask(response, &metadata) + } + output := &StartCapacityTaskOutput{} + 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_deserializeOpDocumentStartCapacityTaskOutput(&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_deserializeOpErrorStartCapacityTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartCapacityTaskOutput(v **StartCapacityTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartCapacityTaskOutput + if *v == nil { + sv = &StartCapacityTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CapacityTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskId to be of type string, got %T instead", value) + } + sv.CapacityTaskId = ptr.String(jtv) + } + + case "CapacityTaskStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskStatus to be of type string, got %T instead", value) + } + sv.CapacityTaskStatus = types.CapacityTaskStatus(jtv) + } + + case "CompletionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "CreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DryRun": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected DryRun to be of type *bool, got %T instead", value) + } + sv.DryRun = jtv + } + + case "Failed": + if err := awsRestjson1_deserializeDocumentCapacityTaskFailure(&sv.Failed, value); err != nil { + return err + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OrderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrderId to be of type string, got %T instead", value) + } + sv.OrderId = ptr.String(jtv) + } + + case "OutpostId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostId to be of type string, got %T instead", value) + } + sv.OutpostId = ptr.String(jtv) + } + + case "RequestedInstancePools": + if err := awsRestjson1_deserializeDocumentRequestedInstancePools(&sv.RequestedInstancePools, value); err != nil { return err } @@ -4442,6 +5378,204 @@ func awsRestjson1_deserializeDocumentAssetLocation(v **types.AssetLocation, valu return nil } +func awsRestjson1_deserializeDocumentCapacityTaskFailure(v **types.CapacityTaskFailure, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CapacityTaskFailure + if *v == nil { + sv = &types.CapacityTaskFailure{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskStatusReason to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskFailureType to be of type string, got %T instead", value) + } + sv.Type = types.CapacityTaskFailureType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCapacityTaskList(v *[]types.CapacityTaskSummary, 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.CapacityTaskSummary + if *v == nil { + cv = []types.CapacityTaskSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CapacityTaskSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentCapacityTaskSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCapacityTaskSummary(v **types.CapacityTaskSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CapacityTaskSummary + if *v == nil { + sv = &types.CapacityTaskSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CapacityTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskId to be of type string, got %T instead", value) + } + sv.CapacityTaskId = ptr.String(jtv) + } + + case "CapacityTaskStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapacityTaskStatus to be of type string, got %T instead", value) + } + sv.CapacityTaskStatus = types.CapacityTaskStatus(jtv) + } + + case "CompletionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "CreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OrderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrderId to be of type string, got %T instead", value) + } + sv.OrderId = ptr.String(jtv) + } + + case "OutpostId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostId to be of type string, got %T instead", value) + } + sv.OutpostId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCatalogItem(v **types.CatalogItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4944,6 +6078,59 @@ func awsRestjson1_deserializeDocumentInstanceFamilies(v *[]string, value interfa return nil } +func awsRestjson1_deserializeDocumentInstanceTypeCapacity(v **types.InstanceTypeCapacity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InstanceTypeCapacity + if *v == nil { + sv = &types.InstanceTypeCapacity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstanceTypeCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = int32(i64) + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceTypeName to be of type string, got %T instead", value) + } + sv.InstanceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInstanceTypeItem(v **types.InstanceTypeItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5927,6 +7114,40 @@ func awsRestjson1_deserializeDocumentRackPhysicalProperties(v **types.RackPhysic return nil } +func awsRestjson1_deserializeDocumentRequestedInstancePools(v *[]types.InstanceTypeCapacity, 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.InstanceTypeCapacity + if *v == nil { + cv = []types.InstanceTypeCapacity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceTypeCapacity + destAddr := &col + if err := awsRestjson1_deserializeDocumentInstanceTypeCapacity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/outposts/generated.json b/service/outposts/generated.json index 420311c017e..e1ce4bd4c12 100644 --- a/service/outposts/generated.json +++ b/service/outposts/generated.json @@ -8,25 +8,30 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_CancelCapacityTask.go", "api_op_CancelOrder.go", "api_op_CreateOrder.go", "api_op_CreateOutpost.go", "api_op_CreateSite.go", "api_op_DeleteOutpost.go", "api_op_DeleteSite.go", + "api_op_GetCapacityTask.go", "api_op_GetCatalogItem.go", "api_op_GetConnection.go", "api_op_GetOrder.go", "api_op_GetOutpost.go", "api_op_GetOutpostInstanceTypes.go", + "api_op_GetOutpostSupportedInstanceTypes.go", "api_op_GetSite.go", "api_op_GetSiteAddress.go", "api_op_ListAssets.go", + "api_op_ListCapacityTasks.go", "api_op_ListCatalogItems.go", "api_op_ListOrders.go", "api_op_ListOutposts.go", "api_op_ListSites.go", "api_op_ListTagsForResource.go", + "api_op_StartCapacityTask.go", "api_op_StartConnection.go", "api_op_TagResource.go", "api_op_UntagResource.go", diff --git a/service/outposts/serializers.go b/service/outposts/serializers.go index 75cfeb0c7e9..2e51fa1894b 100644 --- a/service/outposts/serializers.go +++ b/service/outposts/serializers.go @@ -14,6 +14,80 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpCancelCapacityTask struct { +} + +func (*awsRestjson1_serializeOpCancelCapacityTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelCapacityTask) 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.(*CancelCapacityTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostIdentifier}/capacity/{CapacityTaskId}") + 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_serializeOpHttpBindingsCancelCapacityTaskInput(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_serializeOpHttpBindingsCancelCapacityTaskInput(v *CancelCapacityTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CapacityTaskId == nil || len(*v.CapacityTaskId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CapacityTaskId must not be empty")} + } + if v.CapacityTaskId != nil { + if err := encoder.SetURI("CapacityTaskId").String(*v.CapacityTaskId); err != nil { + return err + } + } + + if v.OutpostIdentifier == nil || len(*v.OutpostIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostIdentifier must not be empty")} + } + if v.OutpostIdentifier != nil { + if err := encoder.SetURI("OutpostIdentifier").String(*v.OutpostIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCancelOrder struct { } @@ -521,6 +595,80 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(v *DeleteSiteInput, enc return nil } +type awsRestjson1_serializeOpGetCapacityTask struct { +} + +func (*awsRestjson1_serializeOpGetCapacityTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCapacityTask) 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.(*GetCapacityTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostIdentifier}/capacity/{CapacityTaskId}") + 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_serializeOpHttpBindingsGetCapacityTaskInput(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_serializeOpHttpBindingsGetCapacityTaskInput(v *GetCapacityTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CapacityTaskId == nil || len(*v.CapacityTaskId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CapacityTaskId must not be empty")} + } + if v.CapacityTaskId != nil { + if err := encoder.SetURI("CapacityTaskId").String(*v.CapacityTaskId); err != nil { + return err + } + } + + if v.OutpostIdentifier == nil || len(*v.OutpostIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostIdentifier must not be empty")} + } + if v.OutpostIdentifier != nil { + if err := encoder.SetURI("OutpostIdentifier").String(*v.OutpostIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetCatalogItem struct { } @@ -854,6 +1002,83 @@ func awsRestjson1_serializeOpHttpBindingsGetOutpostInstanceTypesInput(v *GetOutp return nil } +type awsRestjson1_serializeOpGetOutpostSupportedInstanceTypes struct { +} + +func (*awsRestjson1_serializeOpGetOutpostSupportedInstanceTypes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetOutpostSupportedInstanceTypes) 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.(*GetOutpostSupportedInstanceTypesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostIdentifier}/supportedInstanceTypes") + 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_serializeOpHttpBindingsGetOutpostSupportedInstanceTypesInput(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_serializeOpHttpBindingsGetOutpostSupportedInstanceTypesInput(v *GetOutpostSupportedInstanceTypesInput, 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.OrderId != nil { + encoder.SetQuery("OrderId").String(*v.OrderId) + } + + if v.OutpostIdentifier == nil || len(*v.OutpostIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostIdentifier must not be empty")} + } + if v.OutpostIdentifier != nil { + if err := encoder.SetURI("OutpostIdentifier").String(*v.OutpostIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetSite struct { } @@ -1073,6 +1298,80 @@ func awsRestjson1_serializeOpHttpBindingsListAssetsInput(v *ListAssetsInput, enc return nil } +type awsRestjson1_serializeOpListCapacityTasks struct { +} + +func (*awsRestjson1_serializeOpListCapacityTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCapacityTasks) 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.(*ListCapacityTasksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/capacity/tasks") + 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_serializeOpHttpBindingsListCapacityTasksInput(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_serializeOpHttpBindingsListCapacityTasksInput(v *ListCapacityTasksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CapacityTaskStatusFilter != nil { + for i := range v.CapacityTaskStatusFilter { + encoder.AddQuery("CapacityTaskStatusFilter").String(string(v.CapacityTaskStatusFilter[i])) + } + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.OutpostIdentifierFilter != nil { + encoder.SetQuery("OutpostIdentifierFilter").String(*v.OutpostIdentifierFilter) + } + + return nil +} + type awsRestjson1_serializeOpListCatalogItems struct { } @@ -1452,6 +1751,106 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } +type awsRestjson1_serializeOpStartCapacityTask struct { +} + +func (*awsRestjson1_serializeOpStartCapacityTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartCapacityTask) 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.(*StartCapacityTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostIdentifier}/capacity") + 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_serializeOpHttpBindingsStartCapacityTaskInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartCapacityTaskInput(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_serializeOpHttpBindingsStartCapacityTaskInput(v *StartCapacityTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.OutpostIdentifier == nil || len(*v.OutpostIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostIdentifier must not be empty")} + } + if v.OutpostIdentifier != nil { + if err := encoder.SetURI("OutpostIdentifier").String(*v.OutpostIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartCapacityTaskInput(v *StartCapacityTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DryRun { + ok := object.Key("DryRun") + ok.Boolean(v.DryRun) + } + + if v.InstancePools != nil { + ok := object.Key("InstancePools") + if err := awsRestjson1_serializeDocumentRequestedInstancePools(v.InstancePools, ok); err != nil { + return err + } + } + + if v.OrderId != nil { + ok := object.Key("OrderId") + ok.String(*v.OrderId) + } + + return nil +} + type awsRestjson1_serializeOpStartConnection struct { } @@ -2184,6 +2583,23 @@ func awsRestjson1_serializeDocumentAddress(v *types.Address, value smithyjson.Va return nil } +func awsRestjson1_serializeDocumentInstanceTypeCapacity(v *types.InstanceTypeCapacity, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("Count") + ok.Integer(v.Count) + } + + if v.InstanceType != nil { + ok := object.Key("InstanceType") + ok.String(*v.InstanceType) + } + + return nil +} + func awsRestjson1_serializeDocumentLineItemRequest(v *types.LineItemRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2266,6 +2682,19 @@ func awsRestjson1_serializeDocumentRackPhysicalProperties(v *types.RackPhysicalP return nil } +func awsRestjson1_serializeDocumentRequestedInstancePools(v []types.InstanceTypeCapacity, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentInstanceTypeCapacity(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/outposts/snapshot_test.go b/service/outposts/snapshot_test.go index 0e88c8130d0..8f7d9412b9b 100644 --- a/service/outposts/snapshot_test.go +++ b/service/outposts/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_CancelCapacityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.CancelCapacityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CancelCapacityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CancelOrder(t *testing.T) { svc := New(Options{}) _, err := svc.CancelOrder(context.Background(), nil, func(o *Options) { @@ -134,6 +146,18 @@ func TestCheckSnapshot_DeleteSite(t *testing.T) { } } +func TestCheckSnapshot_GetCapacityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCapacityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetCapacityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetCatalogItem(t *testing.T) { svc := New(Options{}) _, err := svc.GetCatalogItem(context.Background(), nil, func(o *Options) { @@ -194,6 +218,18 @@ func TestCheckSnapshot_GetOutpostInstanceTypes(t *testing.T) { } } +func TestCheckSnapshot_GetOutpostSupportedInstanceTypes(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetOutpostSupportedInstanceTypes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetOutpostSupportedInstanceTypes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetSite(t *testing.T) { svc := New(Options{}) _, err := svc.GetSite(context.Background(), nil, func(o *Options) { @@ -230,6 +266,18 @@ func TestCheckSnapshot_ListAssets(t *testing.T) { } } +func TestCheckSnapshot_ListCapacityTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCapacityTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListCapacityTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListCatalogItems(t *testing.T) { svc := New(Options{}) _, err := svc.ListCatalogItems(context.Background(), nil, func(o *Options) { @@ -290,6 +338,18 @@ func TestCheckSnapshot_ListTagsForResource(t *testing.T) { } } +func TestCheckSnapshot_StartCapacityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartCapacityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartCapacityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartConnection(t *testing.T) { svc := New(Options{}) _, err := svc.StartConnection(context.Background(), nil, func(o *Options) { @@ -373,6 +433,18 @@ func TestCheckSnapshot_UpdateSiteRackPhysicalProperties(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_CancelCapacityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.CancelCapacityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CancelCapacityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CancelOrder(t *testing.T) { svc := New(Options{}) _, err := svc.CancelOrder(context.Background(), nil, func(o *Options) { @@ -445,6 +517,18 @@ func TestUpdateSnapshot_DeleteSite(t *testing.T) { } } +func TestUpdateSnapshot_GetCapacityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCapacityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetCapacityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetCatalogItem(t *testing.T) { svc := New(Options{}) _, err := svc.GetCatalogItem(context.Background(), nil, func(o *Options) { @@ -505,6 +589,18 @@ func TestUpdateSnapshot_GetOutpostInstanceTypes(t *testing.T) { } } +func TestUpdateSnapshot_GetOutpostSupportedInstanceTypes(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetOutpostSupportedInstanceTypes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetOutpostSupportedInstanceTypes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetSite(t *testing.T) { svc := New(Options{}) _, err := svc.GetSite(context.Background(), nil, func(o *Options) { @@ -541,6 +637,18 @@ func TestUpdateSnapshot_ListAssets(t *testing.T) { } } +func TestUpdateSnapshot_ListCapacityTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCapacityTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListCapacityTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListCatalogItems(t *testing.T) { svc := New(Options{}) _, err := svc.ListCatalogItems(context.Background(), nil, func(o *Options) { @@ -601,6 +709,18 @@ func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { } } +func TestUpdateSnapshot_StartCapacityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartCapacityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartCapacityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartConnection(t *testing.T) { svc := New(Options{}) _, err := svc.StartConnection(context.Background(), nil, func(o *Options) { diff --git a/service/outposts/types/enums.go b/service/outposts/types/enums.go index 4ae6e922133..2ca1702240a 100644 --- a/service/outposts/types/enums.go +++ b/service/outposts/types/enums.go @@ -56,6 +56,46 @@ func (AssetType) Values() []AssetType { } } +type CapacityTaskFailureType string + +// Enum values for CapacityTaskFailureType +const ( + CapacityTaskFailureTypeUnsupportedCapacityConfiguration CapacityTaskFailureType = "UNSUPPORTED_CAPACITY_CONFIGURATION" +) + +// Values returns all known values for CapacityTaskFailureType. 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 (CapacityTaskFailureType) Values() []CapacityTaskFailureType { + return []CapacityTaskFailureType{ + "UNSUPPORTED_CAPACITY_CONFIGURATION", + } +} + +type CapacityTaskStatus string + +// Enum values for CapacityTaskStatus +const ( + CapacityTaskStatusRequested CapacityTaskStatus = "REQUESTED" + CapacityTaskStatusInProgress CapacityTaskStatus = "IN_PROGRESS" + CapacityTaskStatusFailed CapacityTaskStatus = "FAILED" + CapacityTaskStatusCompleted CapacityTaskStatus = "COMPLETED" + CapacityTaskStatusCancelled CapacityTaskStatus = "CANCELLED" +) + +// Values returns all known values for CapacityTaskStatus. 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 (CapacityTaskStatus) Values() []CapacityTaskStatus { + return []CapacityTaskStatus{ + "REQUESTED", + "IN_PROGRESS", + "FAILED", + "COMPLETED", + "CANCELLED", + } +} + type CatalogItemClass string // Enum values for CatalogItemClass diff --git a/service/outposts/types/types.go b/service/outposts/types/types.go index 65c04505211..50cbcbb3f81 100644 --- a/service/outposts/types/types.go +++ b/service/outposts/types/types.go @@ -86,6 +86,48 @@ type AssetLocation struct { noSmithyDocumentSerde } +// The capacity tasks that failed. +type CapacityTaskFailure struct { + + // The reason that the specified capacity task failed. + // + // This member is required. + Reason *string + + // The type of failure. + Type CapacityTaskFailureType + + noSmithyDocumentSerde +} + +// The summary of the capacity task. +type CapacityTaskSummary struct { + + // The ID of the specified capacity task. + CapacityTaskId *string + + // The status of the capacity task. + CapacityTaskStatus CapacityTaskStatus + + // The date that the specified capacity task successfully ran. + CompletionDate *time.Time + + // The date that the specified capacity task was created. + CreationDate *time.Time + + // The date that the specified capacity was last modified. + LastModifiedDate *time.Time + + // The ID of the Amazon Web Services Outposts order of the host associated with + // the capacity task. + OrderId *string + + // The ID of the Outpost associated with the specified capacity task. + OutpostId *string + + noSmithyDocumentSerde +} + // Information about a catalog item. type CatalogItem struct { @@ -176,6 +218,23 @@ type EC2Capacity struct { noSmithyDocumentSerde } +// The instance type that you specify determines the combination of CPU, memory, +// storage, and networking capacity. +type InstanceTypeCapacity struct { + + // The number of instances for the specified instance type. + // + // This member is required. + Count int32 + + // The instance type of the hosts. + // + // This member is required. + InstanceType *string + + noSmithyDocumentSerde +} + // Information about an instance type. type InstanceTypeItem struct { diff --git a/service/outposts/validators.go b/service/outposts/validators.go index 5dd06574253..9c0fae3e228 100644 --- a/service/outposts/validators.go +++ b/service/outposts/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpCancelCapacityTask struct { +} + +func (*validateOpCancelCapacityTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelCapacityTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelCapacityTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelCapacityTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCancelOrder struct { } @@ -130,6 +150,26 @@ func (m *validateOpDeleteSite) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpGetCapacityTask struct { +} + +func (*validateOpGetCapacityTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCapacityTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCapacityTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCapacityTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetCatalogItem struct { } @@ -230,6 +270,26 @@ func (m *validateOpGetOutpostInstanceTypes) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpGetOutpostSupportedInstanceTypes struct { +} + +func (*validateOpGetOutpostSupportedInstanceTypes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOutpostSupportedInstanceTypes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOutpostSupportedInstanceTypesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOutpostSupportedInstanceTypesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSiteAddress struct { } @@ -310,6 +370,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpStartCapacityTask struct { +} + +func (*validateOpStartCapacityTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartCapacityTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartCapacityTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartCapacityTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartConnection struct { } @@ -450,6 +530,10 @@ func (m *validateOpUpdateSiteRackPhysicalProperties) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +func addOpCancelCapacityTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelCapacityTask{}, middleware.After) +} + func addOpCancelOrderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelOrder{}, middleware.After) } @@ -474,6 +558,10 @@ func addOpDeleteSiteValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSite{}, middleware.After) } +func addOpGetCapacityTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCapacityTask{}, middleware.After) +} + func addOpGetCatalogItemValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetCatalogItem{}, middleware.After) } @@ -494,6 +582,10 @@ func addOpGetOutpostInstanceTypesValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpGetOutpostInstanceTypes{}, middleware.After) } +func addOpGetOutpostSupportedInstanceTypesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOutpostSupportedInstanceTypes{}, middleware.After) +} + func addOpGetSiteAddressValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSiteAddress{}, middleware.After) } @@ -510,6 +602,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpStartCapacityTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartCapacityTask{}, middleware.After) +} + func addOpStartConnectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartConnection{}, middleware.After) } @@ -565,6 +661,56 @@ func validateAddress(v *types.Address) error { } } +func validateInstanceTypeCapacity(v *types.InstanceTypeCapacity) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstanceTypeCapacity"} + if v.InstanceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRequestedInstancePools(v []types.InstanceTypeCapacity) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RequestedInstancePools"} + for i := range v { + if err := validateInstanceTypeCapacity(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelCapacityTaskInput(v *CancelCapacityTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelCapacityTaskInput"} + if v.CapacityTaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CapacityTaskId")) + } + if v.OutpostIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutpostIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelOrderInput(v *CancelOrderInput) error { if v == nil { return nil @@ -674,6 +820,24 @@ func validateOpDeleteSiteInput(v *DeleteSiteInput) error { } } +func validateOpGetCapacityTaskInput(v *GetCapacityTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCapacityTaskInput"} + if v.CapacityTaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CapacityTaskId")) + } + if v.OutpostIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutpostIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetCatalogItemInput(v *GetCatalogItemInput) error { if v == nil { return nil @@ -749,6 +913,24 @@ func validateOpGetOutpostInstanceTypesInput(v *GetOutpostInstanceTypesInput) err } } +func validateOpGetOutpostSupportedInstanceTypesInput(v *GetOutpostSupportedInstanceTypesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOutpostSupportedInstanceTypesInput"} + if v.OutpostIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutpostIdentifier")) + } + if v.OrderId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrderId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSiteAddressInput(v *GetSiteAddressInput) error { if v == nil { return nil @@ -812,6 +994,31 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpStartCapacityTaskInput(v *StartCapacityTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartCapacityTaskInput"} + if v.OutpostIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutpostIdentifier")) + } + if v.OrderId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrderId")) + } + if v.InstancePools == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstancePools")) + } else if v.InstancePools != nil { + if err := validateRequestedInstancePools(v.InstancePools); err != nil { + invalidParams.AddNested("InstancePools", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartConnectionInput(v *StartConnectionInput) error { if v == nil { return nil diff --git a/service/snowball/internal/endpoints/endpoints.go b/service/snowball/internal/endpoints/endpoints.go index 46a24ef366b..7c384efac09 100644 --- a/service/snowball/internal/endpoints/endpoints.go +++ b/service/snowball/internal/endpoints/endpoints.go @@ -544,6 +544,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + }: endpoints.Endpoint{}, }, }, { diff --git a/service/wellarchitected/api_op_CreateWorkload.go b/service/wellarchitected/api_op_CreateWorkload.go index d230bc5a32f..26f4019c554 100644 --- a/service/wellarchitected/api_op_CreateWorkload.go +++ b/service/wellarchitected/api_op_CreateWorkload.go @@ -128,6 +128,9 @@ type CreateWorkloadInput struct { // - Other IndustryType *string + // Jira configuration settings when creating a workload. + JiraConfiguration *types.WorkloadJiraConfigurationInput + // The list of non-Amazon Web Services Regions associated with the workload. NonAwsRegions []string diff --git a/service/wellarchitected/api_op_GetGlobalSettings.go b/service/wellarchitected/api_op_GetGlobalSettings.go new file mode 100644 index 00000000000..ce2d2a6f783 --- /dev/null +++ b/service/wellarchitected/api_op_GetGlobalSettings.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/wellarchitected/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Global settings for all workloads. +func (c *Client) GetGlobalSettings(ctx context.Context, params *GetGlobalSettingsInput, optFns ...func(*Options)) (*GetGlobalSettingsOutput, error) { + if params == nil { + params = &GetGlobalSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetGlobalSettings", params, optFns, c.addOperationGetGlobalSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetGlobalSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetGlobalSettingsInput struct { + noSmithyDocumentSerde +} + +type GetGlobalSettingsOutput struct { + + // Discovery integration status. + DiscoveryIntegrationStatus types.DiscoveryIntegrationStatus + + // Jira configuration status. + JiraConfiguration *types.AccountJiraConfigurationOutput + + // Amazon Web Services Organizations sharing status. + OrganizationSharingStatus types.OrganizationSharingStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetGlobalSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetGlobalSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetGlobalSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetGlobalSettings"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGlobalSettings(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetGlobalSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetGlobalSettings", + } +} diff --git a/service/wellarchitected/api_op_ListLensReviewImprovements.go b/service/wellarchitected/api_op_ListLensReviewImprovements.go index 0f96e22beae..e53589519dd 100644 --- a/service/wellarchitected/api_op_ListLensReviewImprovements.go +++ b/service/wellarchitected/api_op_ListLensReviewImprovements.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// List lens review improvements. +// List the improvements of a particular lens review. func (c *Client) ListLensReviewImprovements(ctx context.Context, params *ListLensReviewImprovementsInput, optFns ...func(*Options)) (*ListLensReviewImprovementsOutput, error) { if params == nil { params = &ListLensReviewImprovementsInput{} diff --git a/service/wellarchitected/api_op_UpdateGlobalSettings.go b/service/wellarchitected/api_op_UpdateGlobalSettings.go index d0d84a8cb2d..02b35850e55 100644 --- a/service/wellarchitected/api_op_UpdateGlobalSettings.go +++ b/service/wellarchitected/api_op_UpdateGlobalSettings.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates whether the Amazon Web Services account is opted into organization +// Update whether the Amazon Web Services account is opted into organization // sharing and discovery integration features. func (c *Client) UpdateGlobalSettings(ctx context.Context, params *UpdateGlobalSettingsInput, optFns ...func(*Options)) (*UpdateGlobalSettingsOutput, error) { if params == nil { @@ -33,6 +33,9 @@ type UpdateGlobalSettingsInput struct { // The status of discovery support settings. DiscoveryIntegrationStatus types.DiscoveryIntegrationStatus + // The status of Jira integration settings. + JiraConfiguration *types.AccountJiraConfigurationInput + // The status of organization sharing settings. OrganizationSharingStatus types.OrganizationSharingStatus diff --git a/service/wellarchitected/api_op_UpdateIntegration.go b/service/wellarchitected/api_op_UpdateIntegration.go new file mode 100644 index 00000000000..3c3b17fd6e8 --- /dev/null +++ b/service/wellarchitected/api_op_UpdateIntegration.go @@ -0,0 +1,186 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/wellarchitected/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update integration features. +func (c *Client) UpdateIntegration(ctx context.Context, params *UpdateIntegrationInput, optFns ...func(*Options)) (*UpdateIntegrationOutput, error) { + if params == nil { + params = &UpdateIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateIntegration", params, optFns, c.addOperationUpdateIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateIntegrationInput struct { + + // A unique case-sensitive string used to ensure that this request is idempotent + // (executes only once). You should not reuse the same token for other requests. If + // you retry a request with the same client request token and the same parameters + // after the original request has completed successfully, the result of the + // original request is returned. This token is listed as required, however, if you + // do not specify it, the Amazon Web Services SDKs automatically generate one for + // you. If you are not using the Amazon Web Services SDK or the CLI, you must + // provide this token or the request will fail. + // + // This member is required. + ClientRequestToken *string + + // Which integrated service to update. + // + // This member is required. + IntegratingService types.IntegratingService + + // The ID assigned to the workload. This ID is unique within an Amazon Web + // Services Region. + // + // This member is required. + WorkloadId *string + + noSmithyDocumentSerde +} + +type UpdateIntegrationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateIntegration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opUpdateIntegrationMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIntegration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpUpdateIntegration struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateIntegration) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateIntegrationInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateIntegrationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateIntegration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateIntegration", + } +} diff --git a/service/wellarchitected/api_op_UpdateLensReview.go b/service/wellarchitected/api_op_UpdateLensReview.go index 87386416c30..89b08996616 100644 --- a/service/wellarchitected/api_op_UpdateLensReview.go +++ b/service/wellarchitected/api_op_UpdateLensReview.go @@ -47,6 +47,9 @@ type UpdateLensReviewInput struct { // This member is required. WorkloadId *string + // Configuration of the Jira integration. + JiraConfiguration *types.JiraSelectedQuestionConfiguration + // The notes associated with the workload. For a review template, these are the // notes that will be associated with the workload when the template is applied. LensNotes *string diff --git a/service/wellarchitected/api_op_UpdateWorkload.go b/service/wellarchitected/api_op_UpdateWorkload.go index 057d1f3bf0e..a7a3c90ce6d 100644 --- a/service/wellarchitected/api_op_UpdateWorkload.go +++ b/service/wellarchitected/api_op_UpdateWorkload.go @@ -100,6 +100,9 @@ type UpdateWorkloadInput struct { // is added. IsReviewOwnerUpdateAcknowledged *bool + // Configuration of the Jira integration. + JiraConfiguration *types.WorkloadJiraConfigurationInput + // The list of non-Amazon Web Services Regions associated with the workload. NonAwsRegions []string diff --git a/service/wellarchitected/deserializers.go b/service/wellarchitected/deserializers.go index eab5013d8f1..760000364f9 100644 --- a/service/wellarchitected/deserializers.go +++ b/service/wellarchitected/deserializers.go @@ -3392,6 +3392,180 @@ func awsRestjson1_deserializeOpDocumentGetConsolidatedReportOutput(v **GetConsol return nil } +type awsRestjson1_deserializeOpGetGlobalSettings struct { +} + +func (*awsRestjson1_deserializeOpGetGlobalSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetGlobalSettings) HandleDeserialize(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_deserializeOpErrorGetGlobalSettings(response, &metadata) + } + output := &GetGlobalSettingsOutput{} + 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_deserializeOpDocumentGetGlobalSettingsOutput(&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_deserializeOpErrorGetGlobalSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("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_deserializeOpDocumentGetGlobalSettingsOutput(v **GetGlobalSettingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetGlobalSettingsOutput + if *v == nil { + sv = &GetGlobalSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DiscoveryIntegrationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DiscoveryIntegrationStatus to be of type string, got %T instead", value) + } + sv.DiscoveryIntegrationStatus = types.DiscoveryIntegrationStatus(jtv) + } + + case "JiraConfiguration": + if err := awsRestjson1_deserializeDocumentAccountJiraConfigurationOutput(&sv.JiraConfiguration, value); err != nil { + return err + } + + case "OrganizationSharingStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrganizationSharingStatus to be of type string, got %T instead", value) + } + sv.OrganizationSharingStatus = types.OrganizationSharingStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetLens struct { } @@ -9206,6 +9380,110 @@ func awsRestjson1_deserializeOpErrorUpdateGlobalSettings(response *smithyhttp.Re } } +type awsRestjson1_deserializeOpUpdateIntegration struct { +} + +func (*awsRestjson1_deserializeOpUpdateIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateIntegration) HandleDeserialize(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_deserializeOpErrorUpdateIntegration(response, &metadata) + } + output := &UpdateIntegrationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 + + } +} + type awsRestjson1_deserializeOpUpdateLensReview struct { } @@ -10635,8 +10913,11 @@ func awsRestjson1_deserializeOpErrorUpgradeLensReview(response *smithyhttp.Respo case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(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) @@ -10739,6 +11020,9 @@ func awsRestjson1_deserializeOpErrorUpgradeProfileVersion(response *smithyhttp.R 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) @@ -11151,6 +11435,91 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } +func awsRestjson1_deserializeDocumentAccountJiraConfigurationOutput(v **types.AccountJiraConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AccountJiraConfigurationOutput + if *v == nil { + sv = &types.AccountJiraConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "IntegrationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationStatus to be of type string, got %T instead", value) + } + sv.IntegrationStatus = types.IntegrationStatus(jtv) + } + + case "IssueManagementStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountJiraIssueManagementStatus to be of type string, got %T instead", value) + } + sv.IssueManagementStatus = types.AccountJiraIssueManagementStatus(jtv) + } + + case "IssueManagementType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IssueManagementType to be of type string, got %T instead", value) + } + sv.IssueManagementType = types.IssueManagementType(jtv) + } + + case "JiraProjectKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JiraProjectKey to be of type string, got %T instead", value) + } + sv.JiraProjectKey = ptr.String(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "Subdomain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Subdomain to be of type string, got %T instead", value) + } + sv.Subdomain = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAccountSummary(v *map[string]int32, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11338,6 +11707,11 @@ func awsRestjson1_deserializeDocumentAnswer(v **types.Answer, value interface{}) sv.IsApplicable = ptr.Bool(jtv) } + case "JiraConfiguration": + if err := awsRestjson1_deserializeDocumentJiraConfiguration(&sv.JiraConfiguration, value); err != nil { + return err + } + case "Notes": if value != nil { jtv, ok := value.(string) @@ -11490,6 +11864,11 @@ func awsRestjson1_deserializeDocumentAnswerSummary(v **types.AnswerSummary, valu sv.IsApplicable = ptr.Bool(jtv) } + case "JiraConfiguration": + if err := awsRestjson1_deserializeDocumentJiraConfiguration(&sv.JiraConfiguration, value); err != nil { + return err + } + case "PillarId": if value != nil { jtv, ok := value.(string) @@ -12710,6 +13089,11 @@ func awsRestjson1_deserializeDocumentImprovementSummary(v **types.ImprovementSum sv.ImprovementPlanUrl = ptr.String(jtv) } + case "JiraConfiguration": + if err := awsRestjson1_deserializeDocumentJiraConfiguration(&sv.JiraConfiguration, value); err != nil { + return err + } + case "PillarId": if value != nil { jtv, ok := value.(string) @@ -12795,6 +13179,98 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentJiraConfiguration(v **types.JiraConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.JiraConfiguration + if *v == nil { + sv = &types.JiraConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "JiraIssueUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JiraIssueUrl to be of type string, got %T instead", value) + } + sv.JiraIssueUrl = ptr.String(jtv) + } + + case "LastSyncedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSyncedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentJiraSelectedQuestionConfiguration(v **types.JiraSelectedQuestionConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.JiraSelectedQuestionConfiguration + if *v == nil { + sv = &types.JiraSelectedQuestionConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SelectedPillars": + if err := awsRestjson1_deserializeDocumentSelectedPillars(&sv.SelectedPillars, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLens(v **types.Lens, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12991,6 +13467,11 @@ func awsRestjson1_deserializeDocumentLensReview(v **types.LensReview, value inte for key, value := range shape { switch key { + case "JiraConfiguration": + if err := awsRestjson1_deserializeDocumentJiraSelectedQuestionConfiguration(&sv.JiraConfiguration, value); err != nil { + return err + } + case "LensAlias": if value != nil { jtv, ok := value.(string) @@ -16378,6 +16859,121 @@ func awsRestjson1_deserializeDocumentSelectedChoices(v *[]string, value interfac return nil } +func awsRestjson1_deserializeDocumentSelectedPillar(v **types.SelectedPillar, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SelectedPillar + if *v == nil { + sv = &types.SelectedPillar{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PillarId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PillarId to be of type string, got %T instead", value) + } + sv.PillarId = ptr.String(jtv) + } + + case "SelectedQuestionIds": + if err := awsRestjson1_deserializeDocumentSelectedQuestionIds(&sv.SelectedQuestionIds, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSelectedPillars(v *[]types.SelectedPillar, 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.SelectedPillar + if *v == nil { + cv = []types.SelectedPillar{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SelectedPillar + destAddr := &col + if err := awsRestjson1_deserializeDocumentSelectedPillar(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSelectedQuestionIds(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 SelectedQuestionId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17271,6 +17867,11 @@ func awsRestjson1_deserializeDocumentWorkload(v **types.Workload, value interfac sv.IsReviewOwnerUpdateAcknowledged = ptr.Bool(jtv) } + case "JiraConfiguration": + if err := awsRestjson1_deserializeDocumentWorkloadJiraConfigurationOutput(&sv.JiraConfiguration, value); err != nil { + return err + } + case "Lenses": if err := awsRestjson1_deserializeDocumentWorkloadLenses(&sv.Lenses, value); err != nil { return err @@ -17563,6 +18164,73 @@ func awsRestjson1_deserializeDocumentWorkloadDiscoveryConfig(v **types.WorkloadD return nil } +func awsRestjson1_deserializeDocumentWorkloadJiraConfigurationOutput(v **types.WorkloadJiraConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.WorkloadJiraConfigurationOutput + if *v == nil { + sv = &types.WorkloadJiraConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "IssueManagementStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadIssueManagementStatus to be of type string, got %T instead", value) + } + sv.IssueManagementStatus = types.WorkloadIssueManagementStatus(jtv) + } + + case "IssueManagementType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IssueManagementType to be of type string, got %T instead", value) + } + sv.IssueManagementType = types.IssueManagementType(jtv) + } + + case "JiraProjectKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JiraProjectKey to be of type string, got %T instead", value) + } + sv.JiraProjectKey = ptr.String(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentWorkloadLenses(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/wellarchitected/generated.json b/service/wellarchitected/generated.json index 62c30225a3e..efce98f508f 100644 --- a/service/wellarchitected/generated.json +++ b/service/wellarchitected/generated.json @@ -32,6 +32,7 @@ "api_op_ExportLens.go", "api_op_GetAnswer.go", "api_op_GetConsolidatedReport.go", + "api_op_GetGlobalSettings.go", "api_op_GetLens.go", "api_op_GetLensReview.go", "api_op_GetLensReviewReport.go", @@ -67,6 +68,7 @@ "api_op_UntagResource.go", "api_op_UpdateAnswer.go", "api_op_UpdateGlobalSettings.go", + "api_op_UpdateIntegration.go", "api_op_UpdateLensReview.go", "api_op_UpdateProfile.go", "api_op_UpdateReviewTemplate.go", diff --git a/service/wellarchitected/serializers.go b/service/wellarchitected/serializers.go index 57bce0f4cac..3d611b65fed 100644 --- a/service/wellarchitected/serializers.go +++ b/service/wellarchitected/serializers.go @@ -992,6 +992,13 @@ func awsRestjson1_serializeOpDocumentCreateWorkloadInput(v *CreateWorkloadInput, ok.String(*v.IndustryType) } + if v.JiraConfiguration != nil { + ok := object.Key("JiraConfiguration") + if err := awsRestjson1_serializeDocumentWorkloadJiraConfigurationInput(v.JiraConfiguration, ok); err != nil { + return err + } + } + if v.Lenses != nil { ok := object.Key("Lenses") if err := awsRestjson1_serializeDocumentWorkloadLenses(v.Lenses, ok); err != nil { @@ -2150,6 +2157,58 @@ func awsRestjson1_serializeOpHttpBindingsGetConsolidatedReportInput(v *GetConsol return nil } +type awsRestjson1_serializeOpGetGlobalSettings struct { +} + +func (*awsRestjson1_serializeOpGetGlobalSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetGlobalSettings) 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.(*GetGlobalSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-settings") + 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 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_serializeOpHttpBindingsGetGlobalSettingsInput(v *GetGlobalSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + type awsRestjson1_serializeOpGetLens struct { } @@ -4983,6 +5042,13 @@ func awsRestjson1_serializeOpDocumentUpdateGlobalSettingsInput(v *UpdateGlobalSe ok.String(string(v.DiscoveryIntegrationStatus)) } + if v.JiraConfiguration != nil { + ok := object.Key("JiraConfiguration") + if err := awsRestjson1_serializeDocumentAccountJiraConfigurationInput(v.JiraConfiguration, ok); err != nil { + return err + } + } + if len(v.OrganizationSharingStatus) > 0 { ok := object.Key("OrganizationSharingStatus") ok.String(string(v.OrganizationSharingStatus)) @@ -4991,6 +5057,99 @@ func awsRestjson1_serializeOpDocumentUpdateGlobalSettingsInput(v *UpdateGlobalSe return nil } +type awsRestjson1_serializeOpUpdateIntegration struct { +} + +func (*awsRestjson1_serializeOpUpdateIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateIntegration) 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.(*UpdateIntegrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/workloads/{WorkloadId}/updateIntegration") + 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_serializeOpHttpBindingsUpdateIntegrationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateIntegrationInput(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_serializeOpHttpBindingsUpdateIntegrationInput(v *UpdateIntegrationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.WorkloadId == nil || len(*v.WorkloadId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member WorkloadId must not be empty")} + } + if v.WorkloadId != nil { + if err := encoder.SetURI("WorkloadId").String(*v.WorkloadId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateIntegrationInput(v *UpdateIntegrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if len(v.IntegratingService) > 0 { + ok := object.Key("IntegratingService") + ok.String(string(v.IntegratingService)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateLensReview struct { } @@ -5080,6 +5239,13 @@ func awsRestjson1_serializeOpDocumentUpdateLensReviewInput(v *UpdateLensReviewIn object := value.Object() defer object.Close() + if v.JiraConfiguration != nil { + ok := object.Key("JiraConfiguration") + if err := awsRestjson1_serializeDocumentJiraSelectedQuestionConfiguration(v.JiraConfiguration, ok); err != nil { + return err + } + } + if v.LensNotes != nil { ok := object.Key("LensNotes") ok.String(*v.LensNotes) @@ -5767,6 +5933,13 @@ func awsRestjson1_serializeOpDocumentUpdateWorkloadInput(v *UpdateWorkloadInput, ok.Boolean(*v.IsReviewOwnerUpdateAcknowledged) } + if v.JiraConfiguration != nil { + ok := object.Key("JiraConfiguration") + if err := awsRestjson1_serializeDocumentWorkloadJiraConfigurationInput(v.JiraConfiguration, ok); err != nil { + return err + } + } + if v.NonAwsRegions != nil { ok := object.Key("NonAwsRegions") if err := awsRestjson1_serializeDocumentWorkloadNonAwsRegions(v.NonAwsRegions, ok); err != nil { @@ -6197,6 +6370,33 @@ func awsRestjson1_serializeOpDocumentUpgradeReviewTemplateLensReviewInput(v *Upg return nil } +func awsRestjson1_serializeDocumentAccountJiraConfigurationInput(v *types.AccountJiraConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.IntegrationStatus) > 0 { + ok := object.Key("IntegrationStatus") + ok.String(string(v.IntegrationStatus)) + } + + if len(v.IssueManagementStatus) > 0 { + ok := object.Key("IssueManagementStatus") + ok.String(string(v.IssueManagementStatus)) + } + + if len(v.IssueManagementType) > 0 { + ok := object.Key("IssueManagementType") + ok.String(string(v.IssueManagementType)) + } + + if v.JiraProjectKey != nil { + ok := object.Key("JiraProjectKey") + ok.String(*v.JiraProjectKey) + } + + return nil +} + func awsRestjson1_serializeDocumentChoiceUpdate(v *types.ChoiceUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6233,6 +6433,20 @@ func awsRestjson1_serializeDocumentChoiceUpdates(v map[string]types.ChoiceUpdate return nil } +func awsRestjson1_serializeDocumentJiraSelectedQuestionConfiguration(v *types.JiraSelectedQuestionConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SelectedPillars != nil { + ok := object.Key("SelectedPillars") + if err := awsRestjson1_serializeDocumentSelectedPillars(v.SelectedPillars, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentLensAliases(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -6342,6 +6556,38 @@ func awsRestjson1_serializeDocumentSelectedChoices(v []string, value smithyjson. return nil } +func awsRestjson1_serializeDocumentSelectedPillar(v *types.SelectedPillar, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PillarId != nil { + ok := object.Key("PillarId") + ok.String(*v.PillarId) + } + + if v.SelectedQuestionIds != nil { + ok := object.Key("SelectedQuestionIds") + if err := awsRestjson1_serializeDocumentSelectedQuestionIds(v.SelectedQuestionIds, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSelectedPillars(v []types.SelectedPillar, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSelectedPillar(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentSelectedProfileChoiceIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -6353,6 +6599,17 @@ func awsRestjson1_serializeDocumentSelectedProfileChoiceIds(v []string, value sm return nil } +func awsRestjson1_serializeDocumentSelectedQuestionIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6416,6 +6673,28 @@ func awsRestjson1_serializeDocumentWorkloadDiscoveryConfig(v *types.WorkloadDisc return nil } +func awsRestjson1_serializeDocumentWorkloadJiraConfigurationInput(v *types.WorkloadJiraConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.IssueManagementStatus) > 0 { + ok := object.Key("IssueManagementStatus") + ok.String(string(v.IssueManagementStatus)) + } + + if len(v.IssueManagementType) > 0 { + ok := object.Key("IssueManagementType") + ok.String(string(v.IssueManagementType)) + } + + if v.JiraProjectKey != nil { + ok := object.Key("JiraProjectKey") + ok.String(*v.JiraProjectKey) + } + + return nil +} + func awsRestjson1_serializeDocumentWorkloadLenses(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/wellarchitected/snapshot_test.go b/service/wellarchitected/snapshot_test.go index 6f622756a16..5f9a449b348 100644 --- a/service/wellarchitected/snapshot_test.go +++ b/service/wellarchitected/snapshot_test.go @@ -350,6 +350,18 @@ func TestCheckSnapshot_GetConsolidatedReport(t *testing.T) { } } +func TestCheckSnapshot_GetGlobalSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetGlobalSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetGlobalSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetLens(t *testing.T) { svc := New(Options{}) _, err := svc.GetLens(context.Background(), nil, func(o *Options) { @@ -770,6 +782,18 @@ func TestCheckSnapshot_UpdateGlobalSettings(t *testing.T) { } } +func TestCheckSnapshot_UpdateIntegration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateIntegration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateIntegration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateLensReview(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateLensReview(context.Background(), nil, func(o *Options) { @@ -1189,6 +1213,18 @@ func TestUpdateSnapshot_GetConsolidatedReport(t *testing.T) { } } +func TestUpdateSnapshot_GetGlobalSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetGlobalSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetGlobalSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetLens(t *testing.T) { svc := New(Options{}) _, err := svc.GetLens(context.Background(), nil, func(o *Options) { @@ -1609,6 +1645,18 @@ func TestUpdateSnapshot_UpdateGlobalSettings(t *testing.T) { } } +func TestUpdateSnapshot_UpdateIntegration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateIntegration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateIntegration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateLensReview(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateLensReview(context.Background(), nil, func(o *Options) { diff --git a/service/wellarchitected/types/enums.go b/service/wellarchitected/types/enums.go index e962c56f330..3c2882da244 100644 --- a/service/wellarchitected/types/enums.go +++ b/service/wellarchitected/types/enums.go @@ -2,6 +2,25 @@ package types +type AccountJiraIssueManagementStatus string + +// Enum values for AccountJiraIssueManagementStatus +const ( + AccountJiraIssueManagementStatusEnabled AccountJiraIssueManagementStatus = "ENABLED" + AccountJiraIssueManagementStatusDisabled AccountJiraIssueManagementStatus = "DISABLED" +) + +// Values returns all known values for AccountJiraIssueManagementStatus. 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 (AccountJiraIssueManagementStatus) Values() []AccountJiraIssueManagementStatus { + return []AccountJiraIssueManagementStatus{ + "ENABLED", + "DISABLED", + } +} + type AdditionalResourceType string // Enum values for AdditionalResourceType @@ -226,6 +245,74 @@ func (ImportLensStatus) Values() []ImportLensStatus { } } +type IntegratingService string + +// Enum values for IntegratingService +const ( + IntegratingServiceJira IntegratingService = "JIRA" +) + +// Values returns all known values for IntegratingService. 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 (IntegratingService) Values() []IntegratingService { + return []IntegratingService{ + "JIRA", + } +} + +type IntegrationStatus string + +// Enum values for IntegrationStatus +const ( + IntegrationStatusConfigured IntegrationStatus = "CONFIGURED" + IntegrationStatusNotConfigured IntegrationStatus = "NOT_CONFIGURED" +) + +// Values returns all known values for IntegrationStatus. 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 (IntegrationStatus) Values() []IntegrationStatus { + return []IntegrationStatus{ + "CONFIGURED", + "NOT_CONFIGURED", + } +} + +type IntegrationStatusInput string + +// Enum values for IntegrationStatusInput +const ( + IntegrationStatusInputNotConfigured IntegrationStatusInput = "NOT_CONFIGURED" +) + +// Values returns all known values for IntegrationStatusInput. 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 (IntegrationStatusInput) Values() []IntegrationStatusInput { + return []IntegrationStatusInput{ + "NOT_CONFIGURED", + } +} + +type IssueManagementType string + +// Enum values for IssueManagementType +const ( + IssueManagementTypeAuto IssueManagementType = "AUTO" + IssueManagementTypeManual IssueManagementType = "MANUAL" +) + +// Values returns all known values for IssueManagementType. 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 (IssueManagementType) Values() []IssueManagementType { + return []IssueManagementType{ + "AUTO", + "MANUAL", + } +} + type LensStatus string // Enum values for LensStatus @@ -680,3 +767,24 @@ func (WorkloadImprovementStatus) Values() []WorkloadImprovementStatus { "RISK_ACKNOWLEDGED", } } + +type WorkloadIssueManagementStatus string + +// Enum values for WorkloadIssueManagementStatus +const ( + WorkloadIssueManagementStatusEnabled WorkloadIssueManagementStatus = "ENABLED" + WorkloadIssueManagementStatusDisabled WorkloadIssueManagementStatus = "DISABLED" + WorkloadIssueManagementStatusInherit WorkloadIssueManagementStatus = "INHERIT" +) + +// Values returns all known values for WorkloadIssueManagementStatus. 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 (WorkloadIssueManagementStatus) Values() []WorkloadIssueManagementStatus { + return []WorkloadIssueManagementStatus{ + "ENABLED", + "DISABLED", + "INHERIT", + } +} diff --git a/service/wellarchitected/types/types.go b/service/wellarchitected/types/types.go index 315e84e6331..1231eb5f497 100644 --- a/service/wellarchitected/types/types.go +++ b/service/wellarchitected/types/types.go @@ -7,6 +7,48 @@ import ( "time" ) +// Account-level: Input for the Jira configuration. +type AccountJiraConfigurationInput struct { + + // Account-level: Configuration status of the Jira integration. + IntegrationStatus IntegrationStatusInput + + // Account-level: Jira issue management status. + IssueManagementStatus AccountJiraIssueManagementStatus + + // Account-level: Jira issue management type. + IssueManagementType IssueManagementType + + // Account-level: Jira project key to sync workloads to. + JiraProjectKey *string + + noSmithyDocumentSerde +} + +// Account-level: Output configuration of the Jira integration. +type AccountJiraConfigurationOutput struct { + + // Account-level: Configuration status of the Jira integration. + IntegrationStatus IntegrationStatus + + // Account-level: Jira issue management status. + IssueManagementStatus AccountJiraIssueManagementStatus + + // Account-level: Jira issue management type. + IssueManagementType IssueManagementType + + // Account-level: Jira project key to sync workloads to. + JiraProjectKey *string + + // Account-level: Status message on configuration of the Jira integration. + StatusMessage *string + + // Account-level: Jira subdomain URL. + Subdomain *string + + noSmithyDocumentSerde +} + // The choice level additional resources for a custom lens. This field does not // apply to Amazon Web Services official lenses. type AdditionalResources struct { @@ -48,6 +90,9 @@ type Answer struct { // Defines whether this question is applicable to a lens review. IsApplicable *bool + // Configuration of the Jira integration. + JiraConfiguration *JiraConfiguration + // The notes associated with the workload. For a review template, these are the // notes that will be associated with the workload when the template is applied. Notes *string @@ -90,6 +135,9 @@ type AnswerSummary struct { // Defines whether this question is applicable to a lens review. IsApplicable *bool + // Configuration of the Jira integration. + JiraConfiguration *JiraConfiguration + // The ID used to identify a pillar, for example, security . A pillar is identified // by its PillarReviewSummary$PillarId . PillarId *string @@ -368,6 +416,9 @@ type ImprovementSummary struct { // The improvement plan details. ImprovementPlans []ChoiceImprovementPlan + // Configuration of the Jira integration. + JiraConfiguration *JiraConfiguration + // The ID used to identify a pillar, for example, security . A pillar is identified // by its PillarReviewSummary$PillarId . PillarId *string @@ -384,6 +435,27 @@ type ImprovementSummary struct { noSmithyDocumentSerde } +// Configuration of the Jira integration. +type JiraConfiguration struct { + + // The URL of the associated Jira issue. + JiraIssueUrl *string + + // The date and time recorded. + LastSyncedTime *time.Time + + noSmithyDocumentSerde +} + +// Selected questions in the workload. +type JiraSelectedQuestionConfiguration struct { + + // Selected pillars in the workload. + SelectedPillars []SelectedPillar + + noSmithyDocumentSerde +} + // A lens return object. type Lens struct { @@ -429,6 +501,9 @@ type LensMetric struct { // A lens review of a question. type LensReview struct { + // Jira configuration status of the Lens review. + JiraConfiguration *JiraSelectedQuestionConfiguration + // The alias of the lens. For Amazon Web Services official lenses, this is either // the lens alias, such as serverless , or the lens ARN, such as // arn:aws:wellarchitected:us-east-1::lens/serverless . Note that some operations @@ -1228,6 +1303,19 @@ type ReviewTemplateSummary struct { noSmithyDocumentSerde } +// The selected pillar. +type SelectedPillar struct { + + // The ID used to identify a pillar, for example, security . A pillar is identified + // by its PillarReviewSummary$PillarId . + PillarId *string + + // Selected question IDs in the selected pillar. + SelectedQuestionIds []string + + noSmithyDocumentSerde +} + // The share invitation. type ShareInvitation struct { @@ -1423,6 +1511,9 @@ type Workload struct { // is added. IsReviewOwnerUpdateAcknowledged *bool + // Jira configuration for a specific workload. + JiraConfiguration *WorkloadJiraConfigurationOutput + // The list of lenses associated with the workload. Each lens is identified by its // LensSummary$LensAlias . If a review template that specifies lenses is applied to // the workload, those lenses are applied to the workload in addition to these @@ -1496,6 +1587,39 @@ type WorkloadDiscoveryConfig struct { noSmithyDocumentSerde } +// Workload-level: Input for the Jira configuration. +type WorkloadJiraConfigurationInput struct { + + // Workload-level: Jira issue management status. + IssueManagementStatus WorkloadIssueManagementStatus + + // Workload-level: Jira issue management type. + IssueManagementType IssueManagementType + + // Workload-level: Jira project key to sync workloads to. + JiraProjectKey *string + + noSmithyDocumentSerde +} + +// Workload-level: Output configuration of the Jira integration. +type WorkloadJiraConfigurationOutput struct { + + // Workload-level: Jira issue management status. + IssueManagementStatus WorkloadIssueManagementStatus + + // Workload-level: Jira issue management type. + IssueManagementType IssueManagementType + + // Workload-level: Jira project key to sync workloads to. + JiraProjectKey *string + + // Workload-level: Status message on configuration of the Jira integration. + StatusMessage *string + + noSmithyDocumentSerde +} + // The profile associated with a workload. type WorkloadProfile struct { diff --git a/service/wellarchitected/validators.go b/service/wellarchitected/validators.go index 1d910cc4e92..2992e7833ab 100644 --- a/service/wellarchitected/validators.go +++ b/service/wellarchitected/validators.go @@ -1010,6 +1010,26 @@ func (m *validateOpUpdateAnswer) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpUpdateIntegration struct { +} + +func (*validateOpUpdateIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateLensReview struct { } @@ -1430,6 +1450,10 @@ func addOpUpdateAnswerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAnswer{}, middleware.After) } +func addOpUpdateIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateIntegration{}, middleware.After) +} + func addOpUpdateLensReviewValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateLensReview{}, middleware.After) } @@ -2454,6 +2478,27 @@ func validateOpUpdateAnswerInput(v *UpdateAnswerInput) error { } } +func validateOpUpdateIntegrationInput(v *UpdateIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateIntegrationInput"} + if v.WorkloadId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadId")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if len(v.IntegratingService) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("IntegratingService")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateLensReviewInput(v *UpdateLensReviewInput) error { if v == nil { return nil