From 352f89c2d23ec6249a699c732ba5c9ae050f833f Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Fri, 7 Apr 2023 18:16:38 +0000 Subject: [PATCH] Regenerated Clients --- .../14f985df6f9747d78ad4d17f1607c16e.json | 8 + .../2e9893bc67b64de38b70aec841dd3cb9.json | 8 + .../4d000de423c54dba90e34885b1642e15.json | 8 + .../77f07d1c5b4a4c0d9fcc4ae395e4552e.json | 8 + .../920936d34a1047f6ac48b8da0e0feed7.json | 8 + .../9c9fa525b9d64835a452b516547adda4.json | 8 + .../c5d393cbdbea47aa96bd561d0a93c40f.json | 8 + service/dlm/deserializers.go | 38 +- .../api_op_RestoreDBClusterFromSnapshot.go | 8 + .../api_op_RestoreDBClusterToPointInTime.go | 6 +- service/docdb/serializers.go | 5 + service/docdb/types/types.go | 4 +- .../fsx/api_op_AssociateFileSystemAliases.go | 2 +- service/fsx/api_op_CopyBackup.go | 2 +- service/fsx/api_op_CreateBackup.go | 2 +- .../api_op_CreateDataRepositoryAssociation.go | 6 +- .../fsx/api_op_CreateDataRepositoryTask.go | 2 +- service/fsx/api_op_CreateFileCache.go | 2 +- service/fsx/api_op_CreateFileSystem.go | 13 +- .../fsx/api_op_CreateFileSystemFromBackup.go | 13 +- service/fsx/api_op_CreateSnapshot.go | 2 +- .../fsx/api_op_CreateStorageVirtualMachine.go | 2 +- service/fsx/api_op_CreateVolume.go | 2 +- service/fsx/api_op_CreateVolumeFromBackup.go | 2 +- service/fsx/api_op_DeleteBackup.go | 2 +- .../api_op_DeleteDataRepositoryAssociation.go | 6 +- service/fsx/api_op_DeleteFileCache.go | 2 +- service/fsx/api_op_DeleteFileSystem.go | 2 +- service/fsx/api_op_DeleteSnapshot.go | 2 +- .../fsx/api_op_DeleteStorageVirtualMachine.go | 2 +- service/fsx/api_op_DeleteVolume.go | 2 +- ...i_op_DescribeDataRepositoryAssociations.go | 12 +- .../fsx/api_op_DescribeFileSystemAliases.go | 2 +- .../api_op_DisassociateFileSystemAliases.go | 2 +- .../fsx/api_op_ReleaseFileSystemNfsV3Locks.go | 2 +- .../fsx/api_op_RestoreVolumeFromSnapshot.go | 2 +- .../api_op_UpdateDataRepositoryAssociation.go | 4 +- service/fsx/api_op_UpdateFileCache.go | 2 +- service/fsx/api_op_UpdateFileSystem.go | 104 +- service/fsx/api_op_UpdateSnapshot.go | 2 +- .../fsx/api_op_UpdateStorageVirtualMachine.go | 2 +- service/fsx/api_op_UpdateVolume.go | 2 +- service/fsx/types/types.go | 158 +- service/lambda/api_client.go | 2 + .../lambda/api_op_CreateEventSourceMapping.go | 90 +- .../lambda/api_op_CreateFunctionUrlConfig.go | 28 + .../lambda/api_op_DeleteEventSourceMapping.go | 41 +- .../lambda/api_op_GetEventSourceMapping.go | 41 +- .../api_op_GetFunctionEventInvokeConfig.go | 6 +- service/lambda/api_op_GetFunctionUrlConfig.go | 14 + .../lambda/api_op_InvokeWithResponseStream.go | 277 + .../lambda/api_op_ListEventSourceMappings.go | 3 + .../api_op_PutFunctionEventInvokeConfig.go | 12 +- .../lambda/api_op_UpdateEventSourceMapping.go | 85 +- .../api_op_UpdateFunctionEventInvokeConfig.go | 12 +- .../lambda/api_op_UpdateFunctionUrlConfig.go | 28 + service/lambda/deserializers.go | 407 ++ service/lambda/eventstream.go | 285 + service/lambda/generated.json | 4 + service/lambda/go.mod | 3 + service/lambda/serializers.go | 99 + service/lambda/types/enums.go | 37 + service/lambda/types/types.go | 128 +- service/lambda/types/types_exported_test.go | 30 + service/lambda/validators.go | 39 + .../api_op_CreateRefreshSchedule.go | 141 + .../api_op_DeleteDataSetRefreshProperties.go | 128 + .../api_op_DeleteRefreshSchedule.go | 139 + ...api_op_DescribeDataSetRefreshProperties.go | 132 + .../api_op_DescribeRefreshSchedule.go | 140 + .../quicksight/api_op_ListRefreshSchedules.go | 133 + .../api_op_PutDataSetRefreshProperties.go | 134 + .../api_op_UpdateRefreshSchedule.go | 140 + service/quicksight/deserializers.go | 6275 +++++++++++------ service/quicksight/generated.json | 8 + service/quicksight/serializers.go | 865 ++- service/quicksight/types/enums.go | 76 + service/quicksight/types/types.go | 155 + service/quicksight/validators.go | 478 ++ .../api_op_BatchExecuteStatement.go | 41 +- service/redshiftdata/api_op_DescribeTable.go | 38 +- .../redshiftdata/api_op_ExecuteStatement.go | 40 +- service/redshiftdata/api_op_ListDatabases.go | 38 +- service/redshiftdata/api_op_ListSchemas.go | 38 +- service/redshiftdata/api_op_ListTables.go | 41 +- service/servicecatalog/types/types.go | 3 + 86 files changed, 8747 insertions(+), 2586 deletions(-) create mode 100644 .changelog/14f985df6f9747d78ad4d17f1607c16e.json create mode 100644 .changelog/2e9893bc67b64de38b70aec841dd3cb9.json create mode 100644 .changelog/4d000de423c54dba90e34885b1642e15.json create mode 100644 .changelog/77f07d1c5b4a4c0d9fcc4ae395e4552e.json create mode 100644 .changelog/920936d34a1047f6ac48b8da0e0feed7.json create mode 100644 .changelog/9c9fa525b9d64835a452b516547adda4.json create mode 100644 .changelog/c5d393cbdbea47aa96bd561d0a93c40f.json create mode 100644 service/lambda/api_op_InvokeWithResponseStream.go create mode 100644 service/lambda/eventstream.go create mode 100644 service/lambda/types/types_exported_test.go create mode 100644 service/quicksight/api_op_CreateRefreshSchedule.go create mode 100644 service/quicksight/api_op_DeleteDataSetRefreshProperties.go create mode 100644 service/quicksight/api_op_DeleteRefreshSchedule.go create mode 100644 service/quicksight/api_op_DescribeDataSetRefreshProperties.go create mode 100644 service/quicksight/api_op_DescribeRefreshSchedule.go create mode 100644 service/quicksight/api_op_ListRefreshSchedules.go create mode 100644 service/quicksight/api_op_PutDataSetRefreshProperties.go create mode 100644 service/quicksight/api_op_UpdateRefreshSchedule.go diff --git a/.changelog/14f985df6f9747d78ad4d17f1607c16e.json b/.changelog/14f985df6f9747d78ad4d17f1607c16e.json new file mode 100644 index 00000000000..427dafa1b70 --- /dev/null +++ b/.changelog/14f985df6f9747d78ad4d17f1607c16e.json @@ -0,0 +1,8 @@ +{ + "id": "14f985df-6f97-47d7-8ad4-d17f1607c16e", + "type": "documentation", + "description": "Updates description for property", + "modules": [ + "service/servicecatalog" + ] +} \ No newline at end of file diff --git a/.changelog/2e9893bc67b64de38b70aec841dd3cb9.json b/.changelog/2e9893bc67b64de38b70aec841dd3cb9.json new file mode 100644 index 00000000000..719f7569aac --- /dev/null +++ b/.changelog/2e9893bc67b64de38b70aec841dd3cb9.json @@ -0,0 +1,8 @@ +{ + "id": "2e9893bc-67b6-4de3-8b70-aec841dd3cb9", + "type": "feature", + "description": "Updated timestamp format for GetLifecyclePolicy API", + "modules": [ + "service/dlm" + ] +} \ No newline at end of file diff --git a/.changelog/4d000de423c54dba90e34885b1642e15.json b/.changelog/4d000de423c54dba90e34885b1642e15.json new file mode 100644 index 00000000000..3bd197306d5 --- /dev/null +++ b/.changelog/4d000de423c54dba90e34885b1642e15.json @@ -0,0 +1,8 @@ +{ + "id": "4d000de4-23c5-4dba-90e3-4885b1642e15", + "type": "documentation", + "description": "Amazon FSx for Lustre now supports creating data repository associations on Persistent_1 and Scratch_2 file systems.", + "modules": [ + "service/fsx" + ] +} \ No newline at end of file diff --git a/.changelog/77f07d1c5b4a4c0d9fcc4ae395e4552e.json b/.changelog/77f07d1c5b4a4c0d9fcc4ae395e4552e.json new file mode 100644 index 00000000000..2ee9746f53d --- /dev/null +++ b/.changelog/77f07d1c5b4a4c0d9fcc4ae395e4552e.json @@ -0,0 +1,8 @@ +{ + "id": "77f07d1c-5b4a-4c0d-9fcc-4ae395e4552e", + "type": "feature", + "description": "This release adds a new Lambda InvokeWithResponseStream API to support streaming Lambda function responses. The release also adds a new InvokeMode parameter to Function Url APIs to control whether the response will be streamed or buffered.", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/920936d34a1047f6ac48b8da0e0feed7.json b/.changelog/920936d34a1047f6ac48b8da0e0feed7.json new file mode 100644 index 00000000000..69917d35c83 --- /dev/null +++ b/.changelog/920936d34a1047f6ac48b8da0e0feed7.json @@ -0,0 +1,8 @@ +{ + "id": "920936d3-4a10-47f6-ac48-b8da0e0feed7", + "type": "feature", + "description": "This release adds a new parameter 'DBClusterParameterGroupName' to 'RestoreDBClusterFromSnapshot' API to associate the name of the DB cluster parameter group while performing restore.", + "modules": [ + "service/docdb" + ] +} \ No newline at end of file diff --git a/.changelog/9c9fa525b9d64835a452b516547adda4.json b/.changelog/9c9fa525b9d64835a452b516547adda4.json new file mode 100644 index 00000000000..f83107a0ade --- /dev/null +++ b/.changelog/9c9fa525b9d64835a452b516547adda4.json @@ -0,0 +1,8 @@ +{ + "id": "9c9fa525-b9d6-4835-a452-b516547adda4", + "type": "feature", + "description": "This release has two changes: adding the OR condition to tag-based RLS rules in CreateDataSet and UpdateDataSet; adding RefreshSchedule and Incremental RefreshProperties operations for users to programmatically configure SPICE dataset ingestions.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/c5d393cbdbea47aa96bd561d0a93c40f.json b/.changelog/c5d393cbdbea47aa96bd561d0a93c40f.json new file mode 100644 index 00000000000..525dc2e56d9 --- /dev/null +++ b/.changelog/c5d393cbdbea47aa96bd561d0a93c40f.json @@ -0,0 +1,8 @@ +{ + "id": "c5d393cb-dbea-47aa-96bd-561d0a93c40f", + "type": "documentation", + "description": "Update documentation of API descriptions as needed in support of temporary credentials with IAM identity.", + "modules": [ + "service/redshiftdata" + ] +} \ No newline at end of file diff --git a/service/dlm/deserializers.go b/service/dlm/deserializers.go index a81597a0068..f957815b6f6 100644 --- a/service/dlm/deserializers.go +++ b/service/dlm/deserializers.go @@ -2165,34 +2165,28 @@ func awsRestjson1_deserializeDocumentLifecyclePolicy(v **types.LifecyclePolicy, switch key { case "DateCreated": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err } + sv.DateCreated = ptr.Time(t) } case "DateModified": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DateModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err } + sv.DateModified = ptr.Time(t) } case "Description": diff --git a/service/docdb/api_op_RestoreDBClusterFromSnapshot.go b/service/docdb/api_op_RestoreDBClusterFromSnapshot.go index 23b74aa5f2c..5d7c36cc85d 100644 --- a/service/docdb/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/docdb/api_op_RestoreDBClusterFromSnapshot.go @@ -71,6 +71,14 @@ type RestoreDBClusterFromSnapshotInput struct { // restored DB cluster can be created in. AvailabilityZones []string + // The name of the DB cluster parameter group to associate with this DB cluster. + // Type: String. Required: No. If this argument is omitted, the default DB cluster + // parameter group is used. If supplied, must match the name of an existing default + // DB cluster parameter group. The string must consist of from 1 to 255 letters, + // numbers or hyphens. Its first character must be a letter, and it cannot end with + // a hyphen or contain two consecutive hyphens. + DBClusterParameterGroupName *string + // The name of the subnet group to use for the new cluster. Constraints: If // provided, must match the name of an existing DBSubnetGroup. Example: // mySubnetgroup diff --git a/service/docdb/api_op_RestoreDBClusterToPointInTime.go b/service/docdb/api_op_RestoreDBClusterToPointInTime.go index 14a9c66aef5..55f759537d0 100644 --- a/service/docdb/api_op_RestoreDBClusterToPointInTime.go +++ b/service/docdb/api_op_RestoreDBClusterToPointInTime.go @@ -122,8 +122,10 @@ type RestoreDBClusterToPointInTimeInput struct { // * copy-on-write - The new DB cluster is restored as a clone // of the source DB cluster. // - // If you don't specify a RestoreType value, then the - // new DB cluster is restored as a full copy of the source DB cluster. + // Constraints: You can't specify copy-on-write if the + // engine version of the source DB cluster is earlier than 1.11. If you don't + // specify a RestoreType value, then the new DB cluster is restored as a full copy + // of the source DB cluster. RestoreType *string // The tags to be assigned to the restored cluster. diff --git a/service/docdb/serializers.go b/service/docdb/serializers.go index 24bdb114e48..aff5686785f 100644 --- a/service/docdb/serializers.go +++ b/service/docdb/serializers.go @@ -5183,6 +5183,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *Restore objectKey.String(*v.DBClusterIdentifier) } + if v.DBClusterParameterGroupName != nil { + objectKey := object.Key("DBClusterParameterGroupName") + objectKey.String(*v.DBClusterParameterGroupName) + } + if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) diff --git a/service/docdb/types/types.go b/service/docdb/types/types.go index 4ffb720e270..203f73f43cc 100644 --- a/service/docdb/types/types.go +++ b/service/docdb/types/types.go @@ -694,8 +694,8 @@ type GlobalCluster struct { GlobalClusterMembers []GlobalClusterMember // The Amazon Web Services Region-unique, immutable identifier for the global - // database cluster. This identifier is found in AWS CloudTrail log entries - // whenever the AWS KMS customer master key (CMK) for the cluster is accessed. + // database cluster. This identifier is found in CloudTrail log entries whenever + // the KMS customer master key (CMK) for the cluster is accessed. GlobalClusterResourceId *string // Specifies the current state of this global cluster. diff --git a/service/fsx/api_op_AssociateFileSystemAliases.go b/service/fsx/api_op_AssociateFileSystemAliases.go index ef3e002bada..8f456471ffb 100644 --- a/service/fsx/api_op_AssociateFileSystemAliases.go +++ b/service/fsx/api_op_AssociateFileSystemAliases.go @@ -72,7 +72,7 @@ type AssociateFileSystemAliasesInput struct { // This member is required. FileSystemId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CopyBackup.go b/service/fsx/api_op_CopyBackup.go index d679e593886..ef86848c6b7 100644 --- a/service/fsx/api_op_CopyBackup.go +++ b/service/fsx/api_op_CopyBackup.go @@ -59,7 +59,7 @@ type CopyBackupInput struct { // This member is required. SourceBackupId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CreateBackup.go b/service/fsx/api_op_CreateBackup.go index 69bcf40503f..bef2f4dd98f 100644 --- a/service/fsx/api_op_CreateBackup.go +++ b/service/fsx/api_op_CreateBackup.go @@ -84,7 +84,7 @@ func (c *Client) CreateBackup(ctx context.Context, params *CreateBackupInput, op // The request object for the CreateBackup operation. type CreateBackupInput struct { - // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to ensure + // (Optional) A string of up to 63 ASCII characters that Amazon FSx uses to ensure // idempotent creation. This string is automatically filled on your behalf when you // use the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CreateDataRepositoryAssociation.go b/service/fsx/api_op_CreateDataRepositoryAssociation.go index 20a5d6d999a..8f2d1dba9fc 100644 --- a/service/fsx/api_op_CreateDataRepositoryAssociation.go +++ b/service/fsx/api_op_CreateDataRepositoryAssociation.go @@ -15,8 +15,8 @@ import ( // Creates an Amazon FSx for Lustre data repository association (DRA). A data // repository association is a link between a directory on the file system and an // Amazon S3 bucket or prefix. You can have a maximum of 8 data repository -// associations on a file system. Data repository associations are supported only -// for file systems with the Persistent_2 deployment type. Each data repository +// associations on a file system. Data repository associations are supported for +// all file systems except for Scratch_1 deployment type. Each data repository // association must have a unique Amazon FSx file system directory and a unique S3 // bucket or prefix associated with it. You can configure a data repository // association for automatic import only, for automatic export only, or for both. @@ -60,7 +60,7 @@ type CreateDataRepositoryAssociationInput struct { // created. Default is false. BatchImportMetaDataOnCreate *bool - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CreateDataRepositoryTask.go b/service/fsx/api_op_CreateDataRepositoryTask.go index 3276be6b08b..1b64220cf5a 100644 --- a/service/fsx/api_op_CreateDataRepositoryTask.go +++ b/service/fsx/api_op_CreateDataRepositoryTask.go @@ -64,7 +64,7 @@ type CreateDataRepositoryTaskInput struct { // AUTO_RELEASE_DATA task that automatically releases files from the cache. CapacityToRelease *int64 - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CreateFileCache.go b/service/fsx/api_op_CreateFileCache.go index a230c01909c..c2864947ac3 100644 --- a/service/fsx/api_op_CreateFileCache.go +++ b/service/fsx/api_op_CreateFileCache.go @@ -71,7 +71,7 @@ type CreateFileCacheInput struct { // This member is required. SubnetIds []string - // An idempotency token for resource creation, in a string of up to 64 ASCII + // An idempotency token for resource creation, in a string of up to 63 ASCII // characters. This token is automatically filled on your behalf when you use the // Command Line Interface (CLI) or an Amazon Web Services SDK. By using the // idempotent operation, you can retry a CreateFileCache operation without the risk diff --git a/service/fsx/api_op_CreateFileSystem.go b/service/fsx/api_op_CreateFileSystem.go index 34a3ad29a6f..ec9b031ebe7 100644 --- a/service/fsx/api_op_CreateFileSystem.go +++ b/service/fsx/api_op_CreateFileSystem.go @@ -127,7 +127,7 @@ type CreateFileSystemInput struct { // This member is required. SubnetIds []string - // A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent + // A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent // creation. This string is automatically filled on your behalf when you use the // Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string @@ -170,18 +170,17 @@ type CreateFileSystemInput struct { KmsKeyId *string // The Lustre configuration for the file system being created. The following - // parameters are not supported for file systems with the Persistent_2 deployment - // type. Instead, use CreateDataRepositoryAssociation to create a data repository - // association to link your Lustre file system to a data repository. + // parameters are not supported for file systems with a data repository association + // created with . // - // * - // AutoImportPolicy + // * AutoImportPolicy // // * ExportPath // // * ImportedChunkSize // - // * ImportPath + // * + // ImportPath LustreConfiguration *types.CreateFileSystemLustreConfiguration // The ONTAP configuration properties of the FSx for ONTAP file system that you are diff --git a/service/fsx/api_op_CreateFileSystemFromBackup.go b/service/fsx/api_op_CreateFileSystemFromBackup.go index 99b26bec913..f1840328062 100644 --- a/service/fsx/api_op_CreateFileSystemFromBackup.go +++ b/service/fsx/api_op_CreateFileSystemFromBackup.go @@ -76,7 +76,7 @@ type CreateFileSystemFromBackupInput struct { // This member is required. SubnetIds []string - // A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent + // A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent // creation. This string is automatically filled on your behalf when you use the // Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string @@ -111,18 +111,17 @@ type CreateFileSystemFromBackupInput struct { KmsKeyId *string // The Lustre configuration for the file system being created. The following - // parameters are not supported for file systems with the Persistent_2 deployment - // type. Instead, use CreateDataRepositoryAssociation to create a data repository - // association to link your Lustre file system to a data repository. + // parameters are not supported for file systems with a data repository association + // created with . // - // * - // AutoImportPolicy + // * AutoImportPolicy // // * ExportPath // // * ImportedChunkSize // - // * ImportPath + // * + // ImportPath LustreConfiguration *types.CreateFileSystemLustreConfiguration // The OpenZFS configuration for the file system that's being created. diff --git a/service/fsx/api_op_CreateSnapshot.go b/service/fsx/api_op_CreateSnapshot.go index 3098cee82dc..314aa5febd0 100644 --- a/service/fsx/api_op_CreateSnapshot.go +++ b/service/fsx/api_op_CreateSnapshot.go @@ -64,7 +64,7 @@ type CreateSnapshotInput struct { // This member is required. VolumeId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CreateStorageVirtualMachine.go b/service/fsx/api_op_CreateStorageVirtualMachine.go index 5be041405c2..08d21376993 100644 --- a/service/fsx/api_op_CreateStorageVirtualMachine.go +++ b/service/fsx/api_op_CreateStorageVirtualMachine.go @@ -46,7 +46,7 @@ type CreateStorageVirtualMachineInput struct { // the file system. ActiveDirectoryConfiguration *types.CreateSvmActiveDirectoryConfiguration - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CreateVolume.go b/service/fsx/api_op_CreateVolume.go index c8e06911cf9..c81c6646824 100644 --- a/service/fsx/api_op_CreateVolume.go +++ b/service/fsx/api_op_CreateVolume.go @@ -41,7 +41,7 @@ type CreateVolumeInput struct { // This member is required. VolumeType types.VolumeType - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_CreateVolumeFromBackup.go b/service/fsx/api_op_CreateVolumeFromBackup.go index a90395c1672..8dbd486caaa 100644 --- a/service/fsx/api_op_CreateVolumeFromBackup.go +++ b/service/fsx/api_op_CreateVolumeFromBackup.go @@ -41,7 +41,7 @@ type CreateVolumeFromBackupInput struct { // This member is required. Name *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DeleteBackup.go b/service/fsx/api_op_DeleteBackup.go index 588d642db14..69ebf3721c0 100644 --- a/service/fsx/api_op_DeleteBackup.go +++ b/service/fsx/api_op_DeleteBackup.go @@ -39,7 +39,7 @@ type DeleteBackupInput struct { // This member is required. BackupId *string - // A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent + // A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent // deletion. This parameter is automatically filled on your behalf when using the // CLI or SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DeleteDataRepositoryAssociation.go b/service/fsx/api_op_DeleteDataRepositoryAssociation.go index be68dd5174a..081a3403e66 100644 --- a/service/fsx/api_op_DeleteDataRepositoryAssociation.go +++ b/service/fsx/api_op_DeleteDataRepositoryAssociation.go @@ -16,8 +16,8 @@ import ( // Deleting the data repository association unlinks the file system from the Amazon // S3 bucket. When deleting a data repository association, you have the option of // deleting the data in the file system that corresponds to the data repository -// association. Data repository associations are supported only for file systems -// with the Persistent_2 deployment type. +// association. Data repository associations are supported for all file systems +// except for Scratch_1 deployment type. func (c *Client) DeleteDataRepositoryAssociation(ctx context.Context, params *DeleteDataRepositoryAssociationInput, optFns ...func(*Options)) (*DeleteDataRepositoryAssociationOutput, error) { if params == nil { params = &DeleteDataRepositoryAssociationInput{} @@ -40,7 +40,7 @@ type DeleteDataRepositoryAssociationInput struct { // This member is required. AssociationId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DeleteFileCache.go b/service/fsx/api_op_DeleteFileCache.go index 63e4d3d1b4d..f9cced17f25 100644 --- a/service/fsx/api_op_DeleteFileCache.go +++ b/service/fsx/api_op_DeleteFileCache.go @@ -43,7 +43,7 @@ type DeleteFileCacheInput struct { // This member is required. FileCacheId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DeleteFileSystem.go b/service/fsx/api_op_DeleteFileSystem.go index 51fbb94411e..7d7bef951aa 100644 --- a/service/fsx/api_op_DeleteFileSystem.go +++ b/service/fsx/api_op_DeleteFileSystem.go @@ -52,7 +52,7 @@ type DeleteFileSystemInput struct { // This member is required. FileSystemId *string - // A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent + // A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent // deletion. This token is automatically filled on your behalf when using the // Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DeleteSnapshot.go b/service/fsx/api_op_DeleteSnapshot.go index 7d8bb2f9039..a211567ca30 100644 --- a/service/fsx/api_op_DeleteSnapshot.go +++ b/service/fsx/api_op_DeleteSnapshot.go @@ -39,7 +39,7 @@ type DeleteSnapshotInput struct { // This member is required. SnapshotId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DeleteStorageVirtualMachine.go b/service/fsx/api_op_DeleteStorageVirtualMachine.go index cb273a7ee18..a0bb5f4676c 100644 --- a/service/fsx/api_op_DeleteStorageVirtualMachine.go +++ b/service/fsx/api_op_DeleteStorageVirtualMachine.go @@ -37,7 +37,7 @@ type DeleteStorageVirtualMachineInput struct { // This member is required. StorageVirtualMachineId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DeleteVolume.go b/service/fsx/api_op_DeleteVolume.go index 0f89012acbe..05d5ce34096 100644 --- a/service/fsx/api_op_DeleteVolume.go +++ b/service/fsx/api_op_DeleteVolume.go @@ -35,7 +35,7 @@ type DeleteVolumeInput struct { // This member is required. VolumeId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DescribeDataRepositoryAssociations.go b/service/fsx/api_op_DescribeDataRepositoryAssociations.go index 39c8adfe084..0c5f077e923 100644 --- a/service/fsx/api_op_DescribeDataRepositoryAssociations.go +++ b/service/fsx/api_op_DescribeDataRepositoryAssociations.go @@ -15,12 +15,12 @@ import ( // Returns the description of specific Amazon FSx for Lustre or Amazon File Cache // data repository associations, if one or more AssociationIds values are provided // in the request, or if filters are used in the request. Data repository -// associations are supported only for Amazon FSx for Lustre file systems with the -// Persistent_2 deployment type and for Amazon File Cache resources. You can use -// filters to narrow the response to include just data repository associations for -// specific file systems (use the file-system-id filter with the ID of the file -// system) or caches (use the file-cache-id filter with the ID of the cache), or -// data repository associations for a specific repository type (use the +// associations are supported on Amazon File Cache resources and all Amazon FSx for +// Lustre file systems excluding Scratch_1 deployment types. You can use filters to +// narrow the response to include just data repository associations for specific +// file systems (use the file-system-id filter with the ID of the file system) or +// caches (use the file-cache-id filter with the ID of the cache), or data +// repository associations for a specific repository type (use the // data-repository-type filter with a value of S3 or NFS). If you don't use // filters, the response returns all data repository associations owned by your // Amazon Web Services account in the Amazon Web Services Region of the endpoint diff --git a/service/fsx/api_op_DescribeFileSystemAliases.go b/service/fsx/api_op_DescribeFileSystemAliases.go index ebf116afed6..618c8d3e78f 100644 --- a/service/fsx/api_op_DescribeFileSystemAliases.go +++ b/service/fsx/api_op_DescribeFileSystemAliases.go @@ -39,7 +39,7 @@ type DescribeFileSystemAliasesInput struct { // This member is required. FileSystemId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_DisassociateFileSystemAliases.go b/service/fsx/api_op_DisassociateFileSystemAliases.go index 7dc6de8839e..7c0197fe6ba 100644 --- a/service/fsx/api_op_DisassociateFileSystemAliases.go +++ b/service/fsx/api_op_DisassociateFileSystemAliases.go @@ -52,7 +52,7 @@ type DisassociateFileSystemAliasesInput struct { // This member is required. FileSystemId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go b/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go index 1986c18ca37..c7fa355acd0 100644 --- a/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go +++ b/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go @@ -35,7 +35,7 @@ type ReleaseFileSystemNfsV3LocksInput struct { // This member is required. FileSystemId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_RestoreVolumeFromSnapshot.go b/service/fsx/api_op_RestoreVolumeFromSnapshot.go index 6ea1ab955b7..e5f5694ac22 100644 --- a/service/fsx/api_op_RestoreVolumeFromSnapshot.go +++ b/service/fsx/api_op_RestoreVolumeFromSnapshot.go @@ -42,7 +42,7 @@ type RestoreVolumeFromSnapshotInput struct { // This member is required. VolumeId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_UpdateDataRepositoryAssociation.go b/service/fsx/api_op_UpdateDataRepositoryAssociation.go index 0460e1fcc3c..30c9f94af11 100644 --- a/service/fsx/api_op_UpdateDataRepositoryAssociation.go +++ b/service/fsx/api_op_UpdateDataRepositoryAssociation.go @@ -14,7 +14,7 @@ import ( // Updates the configuration of an existing data repository association on an // Amazon FSx for Lustre file system. Data repository associations are supported -// only for file systems with the Persistent_2 deployment type. +// for all file systems except for Scratch_1 deployment type. func (c *Client) UpdateDataRepositoryAssociation(ctx context.Context, params *UpdateDataRepositoryAssociationInput, optFns ...func(*Options)) (*UpdateDataRepositoryAssociationOutput, error) { if params == nil { params = &UpdateDataRepositoryAssociationInput{} @@ -37,7 +37,7 @@ type UpdateDataRepositoryAssociationInput struct { // This member is required. AssociationId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_UpdateFileCache.go b/service/fsx/api_op_UpdateFileCache.go index ba069d27a58..add60ed2847 100644 --- a/service/fsx/api_op_UpdateFileCache.go +++ b/service/fsx/api_op_UpdateFileCache.go @@ -36,7 +36,7 @@ type UpdateFileCacheInput struct { // This member is required. FileCacheId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_UpdateFileSystem.go b/service/fsx/api_op_UpdateFileSystem.go index df8e093dd18..760088e1aeb 100644 --- a/service/fsx/api_op_UpdateFileSystem.go +++ b/service/fsx/api_op_UpdateFileSystem.go @@ -13,11 +13,11 @@ import ( ) // Use this operation to update the configuration of an existing Amazon FSx file -// system. You can update multiple properties in a single request. For Amazon FSx -// for Windows File Server file systems, you can update the following -// properties: +// system. You can update multiple properties in a single request. For FSx for +// Windows File Server file systems, you can update the following properties: // -// * AuditLogConfiguration +// * +// AuditLogConfiguration // // * AutomaticBackupRetentionDays // @@ -33,8 +33,8 @@ import ( // // * WeeklyMaintenanceStartTime // -// For Amazon -// FSx for Lustre file systems, you can update the following properties: +// For FSx for +// Lustre file systems, you can update the following properties: // // * // AutoImportPolicy @@ -54,8 +54,10 @@ import ( // * // WeeklyMaintenanceStartTime // -// For Amazon FSx for NetApp ONTAP file systems, you -// can update the following properties: +// For FSx for ONTAP file systems, you can update the +// following properties: +// +// * AddRouteTableIds // // * AutomaticBackupRetentionDays // @@ -67,29 +69,35 @@ import ( // * FsxAdminPassword // // * -// StorageCapacity +// RemoveRouteTableIds +// +// * StorageCapacity // // * ThroughputCapacity // -// * WeeklyMaintenanceStartTime +// * +// WeeklyMaintenanceStartTime // -// For the -// Amazon FSx for OpenZFS file systems, you can update the following properties: +// For FSx for OpenZFS file systems, you can update the +// following properties: // -// * -// AutomaticBackupRetentionDays +// * AutomaticBackupRetentionDays // // * CopyTagsToBackups // -// * CopyTagsToVolumes +// * +// CopyTagsToVolumes +// +// * DailyAutomaticBackupStartTime +// +// * DiskIopsConfiguration // // * -// DailyAutomaticBackupStartTime +// StorageCapacity // // * ThroughputCapacity // -// * -// WeeklyMaintenanceStartTime +// * WeeklyMaintenanceStartTime func (c *Client) UpdateFileSystem(ctx context.Context, params *UpdateFileSystemInput, optFns ...func(*Options)) (*UpdateFileSystemOutput, error) { if params == nil { params = &UpdateFileSystemInput{} @@ -113,7 +121,7 @@ type UpdateFileSystemInput struct { // This member is required. FileSystemId *string - // A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent + // A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent // updates. This string is automatically filled on your behalf when you use the // Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string @@ -128,39 +136,43 @@ type UpdateFileSystemInput struct { // The configuration updates for an Amazon FSx for OpenZFS file system. OpenZFSConfiguration *types.UpdateFileSystemOpenZFSConfiguration - // Use this parameter to increase the storage capacity of an Amazon FSx for Windows - // File Server, Amazon FSx for Lustre, or Amazon FSx for NetApp ONTAP file system. - // Specifies the storage capacity target value, in GiB, to increase the storage - // capacity for the file system that you're updating. You can't make a storage - // capacity increase request if there is an existing storage capacity increase - // request in progress. For Windows file systems, the storage capacity target value - // must be at least 10 percent greater than the current storage capacity value. To - // increase storage capacity, the file system must have at least 16 MBps of - // throughput capacity. For more information, see Managing storage capacity - // (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html) - // in the Amazon FSx for Windows File Server User Guide. For Lustre file systems, - // the storage capacity target value can be the following: + // Use this parameter to increase the storage capacity of an FSx for Windows File + // Server, FSx for Lustre, FSx for OpenZFS, or FSx for ONTAP file system. Specifies + // the storage capacity target value, in GiB, to increase the storage capacity for + // the file system that you're updating. You can't make a storage capacity increase + // request if there is an existing storage capacity increase request in progress. + // For Lustre file systems, the storage capacity target value can be the + // following: // - // * For SCRATCH_2, - // PERSISTENT_1, and PERSISTENT_2 SSD deployment types, valid values are in - // multiples of 2400 GiB. The value must be greater than the current storage - // capacity. + // * For SCRATCH_2, PERSISTENT_1, and PERSISTENT_2 SSD deployment + // types, valid values are in multiples of 2400 GiB. The value must be greater than + // the current storage capacity. // - // * For PERSISTENT HDD file systems, valid values are multiples of 6000 - // GiB for 12-MBps throughput per TiB file systems and multiples of 1800 GiB for - // 40-MBps throughput per TiB file systems. The values must be greater than the - // current storage capacity. + // * For PERSISTENT HDD file systems, valid values + // are multiples of 6000 GiB for 12-MBps throughput per TiB file systems and + // multiples of 1800 GiB for 40-MBps throughput per TiB file systems. The values + // must be greater than the current storage capacity. // - // * For SCRATCH_1 file systems, you can't increase the - // storage capacity. + // * For SCRATCH_1 file + // systems, you can't increase the storage capacity. // - // For more information, see Managing storage and throughput - // capacity + // For more information, see + // Managing storage and throughput capacity // (https://docs.aws.amazon.com/fsx/latest/LustreGuide/managing-storage-capacity.html) - // in the Amazon FSx for Lustre User Guide. For ONTAP file systems, the storage + // in the FSx for Lustre User Guide. For FSx for OpenZFS file systems, the storage // capacity target value must be at least 10 percent greater than the current - // storage capacity value. For more information, see Managing storage capacity and - // provisioned IOPS + // storage capacity value. For more information, see Managing storage capacity + // (https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/managing-storage-capacity.html) + // in the FSx for OpenZFS User Guide. For Windows file systems, the storage + // capacity target value must be at least 10 percent greater than the current + // storage capacity value. To increase storage capacity, the file system must have + // at least 16 MBps of throughput capacity. For more information, see Managing + // storage capacity + // (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html) + // in the Amazon FSx for Windows File Server User Guide. For ONTAP file systems, + // the storage capacity target value must be at least 10 percent greater than the + // current storage capacity value. For more information, see Managing storage + // capacity and provisioned IOPS // (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-storage-capacity.html) // in the Amazon FSx for NetApp ONTAP User Guide. StorageCapacity *int32 diff --git a/service/fsx/api_op_UpdateSnapshot.go b/service/fsx/api_op_UpdateSnapshot.go index 14890039e43..30e7d33a09c 100644 --- a/service/fsx/api_op_UpdateSnapshot.go +++ b/service/fsx/api_op_UpdateSnapshot.go @@ -41,7 +41,7 @@ type UpdateSnapshotInput struct { // This member is required. SnapshotId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_UpdateStorageVirtualMachine.go b/service/fsx/api_op_UpdateStorageVirtualMachine.go index ef3b33da395..a22d122ce83 100644 --- a/service/fsx/api_op_UpdateStorageVirtualMachine.go +++ b/service/fsx/api_op_UpdateStorageVirtualMachine.go @@ -39,7 +39,7 @@ type UpdateStorageVirtualMachineInput struct { // joined to an AD. ActiveDirectoryConfiguration *types.UpdateSvmActiveDirectoryConfiguration - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/api_op_UpdateVolume.go b/service/fsx/api_op_UpdateVolume.go index 4e64cc8eec2..52ce5429db0 100644 --- a/service/fsx/api_op_UpdateVolume.go +++ b/service/fsx/api_op_UpdateVolume.go @@ -37,7 +37,7 @@ type UpdateVolumeInput struct { // This member is required. VolumeId *string - // (Optional) An idempotency token for resource creation, in a string of up to 64 + // (Optional) An idempotency token for resource creation, in a string of up to 63 // ASCII characters. This token is automatically filled on your behalf when you use // the Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string diff --git a/service/fsx/types/types.go b/service/fsx/types/types.go index 65c033e0657..7c151c19b82 100644 --- a/service/fsx/types/types.go +++ b/service/fsx/types/types.go @@ -200,9 +200,9 @@ type Alias struct { // AutoExportPolicy defines the types of updated objects on the file system that // will be automatically exported to the data repository. As you create, modify, or // delete files, Amazon FSx for Lustre automatically exports the defined changes -// asynchronously once your application finishes modifying the file. This -// AutoExportPolicy is supported only for Amazon FSx for Lustre file systems with -// the Persistent_2 deployment type. +// asynchronously once your application finishes modifying the file. The +// AutoExportPolicy is only supported on Amazon FSx for Lustre file systems with a +// data repository association. type AutoExportPolicy struct { // The AutoExportPolicy can have the following event values: @@ -228,9 +228,9 @@ type AutoExportPolicy struct { // Describes the data repository association's automatic import policy. The // AutoImportPolicy defines how Amazon FSx keeps your file metadata and directory // listings up to date by importing changes to your Amazon FSx for Lustre file -// system as you modify objects in a linked S3 bucket. The AutoImportPolicy is -// supported only for Amazon FSx for Lustre file systems with the Persistent_2 -// deployment type. +// system as you modify objects in a linked S3 bucket. The AutoImportPolicy is only +// supported on Amazon FSx for Lustre file systems with a data repository +// association. type AutoImportPolicy struct { // The AutoImportPolicy can have the following event values: @@ -381,7 +381,7 @@ type CompletionReport struct { // provide must be located within the file system’s ExportPath. An example Path // value is "s3://myBucket/myExportPath/optionalPrefix". The report provides the // following information for each file in the report: FilePath, FileStatus, and - // ErrorCode. To learn more about a file system's ExportPath, see . + // ErrorCode. Path *string // Required if Enabled is set to true. Specifies the scope of the CompletionReport; @@ -424,52 +424,49 @@ type CreateFileCacheLustreConfiguration struct { } // The Lustre configuration for the file system being created. The following -// parameters are not supported for file systems with the Persistent_2 deployment -// type. Instead, use CreateDataRepositoryAssociation to create a data repository -// association to link your Lustre file system to a data repository. +// parameters are not supported for file systems with a data repository association +// created with . // -// * -// AutoImportPolicy +// * AutoImportPolicy // // * ExportPath // // * ImportedChunkSize // -// * ImportPath +// * +// ImportPath type CreateFileSystemLustreConfiguration struct { - // (Optional) Available with Scratch and Persistent_1 deployment types. When you - // create your file system, your existing S3 objects appear as file and directory - // listings. Use this property to choose how Amazon FSx keeps your file and - // directory listings up to date as you add or modify objects in your linked S3 - // bucket. AutoImportPolicy can have the following values: + // (Optional) When you create your file system, your existing S3 objects appear as + // file and directory listings. Use this parameter to choose how Amazon FSx keeps + // your file and directory listings up to date as you add or modify objects in your + // linked S3 bucket. AutoImportPolicy can have the following values: // - // * NONE - (Default) - // AutoImport is off. Amazon FSx only updates file and directory listings from the - // linked S3 bucket when the file system is created. FSx does not update file and - // directory listings for any new or changed objects after choosing this option. + // * NONE - + // (Default) AutoImport is off. Amazon FSx only updates file and directory listings + // from the linked S3 bucket when the file system is created. FSx does not update + // file and directory listings for any new or changed objects after choosing this + // option. // - // * - // NEW - AutoImport is on. Amazon FSx automatically imports directory listings of - // any new objects added to the linked S3 bucket that do not currently exist in the - // FSx file system. + // * NEW - AutoImport is on. Amazon FSx automatically imports directory + // listings of any new objects added to the linked S3 bucket that do not currently + // exist in the FSx file system. // - // * NEW_CHANGED - AutoImport is on. Amazon FSx automatically - // imports file and directory listings of any new objects added to the S3 bucket - // and any existing objects that are changed in the S3 bucket after you choose this - // option. + // * NEW_CHANGED - AutoImport is on. Amazon FSx + // automatically imports file and directory listings of any new objects added to + // the S3 bucket and any existing objects that are changed in the S3 bucket after + // you choose this option. // - // * NEW_CHANGED_DELETED - AutoImport is on. Amazon FSx automatically - // imports file and directory listings of any new objects added to the S3 bucket, - // any existing objects that are changed in the S3 bucket, and any objects that - // were deleted in the S3 bucket. + // * NEW_CHANGED_DELETED - AutoImport is on. Amazon FSx + // automatically imports file and directory listings of any new objects added to + // the S3 bucket, any existing objects that are changed in the S3 bucket, and any + // objects that were deleted in the S3 bucket. // - // For more information, see Automatically import - // updates from your S3 bucket + // For more information, see + // Automatically import updates from your S3 bucket // (https://docs.aws.amazon.com/fsx/latest/LustreGuide/older-deployment-types.html#legacy-auto-import-from-s3). - // This parameter is not supported for file systems with the Persistent_2 - // deployment type. Instead, use CreateDataRepositoryAssociation to create a data - // repository association to link your Lustre file system to a data repository. + // This parameter is not supported for file systems with a data repository + // association. AutoImportPolicy AutoImportPolicyType // The number of days to retain automatic backups. Setting this property to 0 @@ -528,11 +525,9 @@ type CreateFileSystemLustreConfiguration struct { // FileSystemTypeVersion to 2.10, the CreateFileSystem operation fails. Encryption // of data in transit is automatically turned on when you access SCRATCH_2, // PERSISTENT_1 and PERSISTENT_2 file systems from Amazon EC2 instances that - // support automatic encryption - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/data- - // protection.html) in the Amazon Web Services Regions where they are available. - // For more information about encryption in transit for FSx for Lustre file - // systems, see Encrypting data in transit + // support automatic encryption in the Amazon Web Services Regions where they are + // available. For more information about encryption in transit for FSx for Lustre + // file systems, see Encrypting data in transit // (https://docs.aws.amazon.com/fsx/latest/LustreGuide/encryption-in-transit-fsxl.html) // in the Amazon FSx for Lustre User Guide. (Default = SCRATCH_1) DeploymentType LustreDeploymentType @@ -544,12 +539,11 @@ type CreateFileSystemLustreConfiguration struct { // This parameter is required when StorageType is set to HDD. DriveCacheType DriveCacheType - // (Optional) Available with Scratch and Persistent_1 deployment types. Specifies - // the path in the Amazon S3 bucket where the root of your Amazon FSx file system - // is exported. The path must use the same Amazon S3 bucket as specified in - // ImportPath. You can provide an optional prefix to which new and changed data is - // to be exported from your Amazon FSx for Lustre file system. If an ExportPath - // value is not provided, Amazon FSx sets a default export path, + // (Optional) Specifies the path in the Amazon S3 bucket where the root of your + // Amazon FSx file system is exported. The path must use the same Amazon S3 bucket + // as specified in ImportPath. You can provide an optional prefix to which new and + // changed data is to be exported from your Amazon FSx for Lustre file system. If + // an ExportPath value is not provided, Amazon FSx sets a default export path, // s3://import-bucket/FSxLustre[creation-timestamp]. The timestamp is in UTC // format, for example s3://import-bucket/FSxLustre20181105T222312Z. The Amazon S3 // export bucket must be the same as the import bucket specified by ImportPath. If @@ -558,9 +552,8 @@ type CreateFileSystemLustreConfiguration struct { // input data in S3 is overwritten on export. If you provide a custom prefix in the // export path, such as s3://import-bucket/[custom-optional-prefix], Amazon FSx // exports the contents of your file system to that export prefix in the Amazon S3 - // bucket. This parameter is not supported for file systems with the Persistent_2 - // deployment type. Instead, use CreateDataRepositoryAssociation to create a data - // repository association to link your Lustre file system to a data repository. + // bucket. This parameter is not supported for file systems with a data repository + // association. ExportPath *string // (Optional) The path to the Amazon S3 bucket (including the optional prefix) that @@ -569,9 +562,7 @@ type CreateFileSystemLustreConfiguration struct { // Amazon S3 bucket you select. An example is s3://import-bucket/optional-prefix. // If you specify a prefix after the Amazon S3 bucket name, only object keys with // that prefix are loaded into the file system. This parameter is not supported for - // file systems with the Persistent_2 deployment type. Instead, use - // CreateDataRepositoryAssociation to create a data repository association to link - // your Lustre file system to a data repository. + // file systems with a data repository association. ImportPath *string // (Optional) For files imported from a data repository, this value determines the @@ -580,9 +571,7 @@ type CreateFileSystemLustreConfiguration struct { // across is limited by the total number of disks that make up the file system. The // default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 MiB (500 // GiB). Amazon S3 objects have a maximum size of 5 TB. This parameter is not - // supported for file systems with the Persistent_2 deployment type. Instead, use - // CreateDataRepositoryAssociation to create a data repository association to link - // your Lustre file system to a data repository. + // supported for file systems with a data repository association. ImportedFileChunkSize *int32 // The Lustre logging configuration used when creating an Amazon FSx for Lustre @@ -666,7 +655,7 @@ type CreateFileSystemOntapConfiguration struct { // in the Amazon FSx console, Amazon FSx chooses the last 64 IP addresses from the // VPC’s primary CIDR range to use as the endpoint IP address range for the file // system. You can have overlapping endpoint IP addresses for file systems deployed - // in the same VPC/route tables. + // in the same VPC/route tables, as long as they don't overlap with any subnet. EndpointIpAddressRange *string // The ONTAP administrative password for the fsxadmin user with which you @@ -905,6 +894,8 @@ type CreateFileSystemWindowsConfiguration struct { type CreateOntapVolumeConfiguration struct { // Specifies the size of the volume, in megabytes (MB), that you are creating. + // Provide any whole number in the range of 20–104857600 to specify the size of the + // volume. // // This member is required. SizeInMegabytes *int32 @@ -923,8 +914,9 @@ type CreateOntapVolumeConfiguration struct { // regardless of this value. CopyTagsToBackups *bool - // Specifies the location in the SVM's namespace where the volume is mounted. The - // JunctionPath must have a leading forward slash, such as /vol3. + // Specifies the location in the SVM's namespace where the volume is mounted. This + // parameter is required. The JunctionPath must have a leading forward slash, such + // as /vol3. JunctionPath *string // Specifies the type of volume you are creating. Valid values are the @@ -986,7 +978,8 @@ type CreateOntapVolumeConfiguration struct { SnapshotPolicy *string // Set to true to enable deduplication, compression, and compaction storage - // efficiency features on the volume. + // efficiency features on the volume, or set to false to disable them. This + // parameter is required. StorageEfficiencyEnabled *bool // Describes the data tiering policy for an ONTAP volume. When enabled, Amazon FSx @@ -1169,8 +1162,8 @@ type CreateSvmActiveDirectoryConfiguration struct { // DescribeDataRepositoryAssociations // // Data repository associations are supported -// only for an Amazon FSx for Lustre file system with the Persistent_2 deployment -// type and for an Amazon File Cache resource. +// on Amazon File Cache resources and all Amazon FSx for Lustre file systems +// excluding Scratch_1 deployment types. type DataRepositoryAssociation struct { // The system-generated, unique ID of the data repository association. @@ -1314,8 +1307,9 @@ type DataRepositoryAssociation struct { } // The data repository configuration object for Lustre file systems returned in the -// response of the CreateFileSystem operation. This data type is not supported for -// file systems with the Persistent_2 deployment type. Instead, use . +// response of the CreateFileSystem operation. This data type is not supported on +// file systems with a data repository association. For file systems with a data +// repository association, see . type DataRepositoryConfiguration struct { // Describes the file system's linked S3 data repository's AutoImportPolicy. The @@ -1462,6 +1456,9 @@ type DataRepositoryTask struct { // * AUTO_RELEASE_DATA tasks // automatically release files from an Amazon File Cache resource. // + // * + // RELEASE_DATA_FROM_FILESYSTEM tasks are not supported. + // // This member is required. Type DataRepositoryTaskType @@ -2138,8 +2135,8 @@ type FileSystem struct { OpenZFSConfiguration *OpenZFSFileSystemConfiguration // The Amazon Web Services account that created the file system. If the file system - // was created by an Identity and Access Management (IAM) user, the Amazon Web - // Services account to which the IAM user belongs is the owner. + // was created by a user in IAM Identity Center, the Amazon Web Services account to + // which the IAM user belongs is the owner. OwnerId *string // The Amazon Resource Name (ARN) of the file system resource. @@ -2278,8 +2275,9 @@ type LustreFileSystemConfiguration struct { DataCompressionType DataCompressionType // The data repository configuration object for Lustre file systems returned in the - // response of the CreateFileSystem operation. This data type is not supported for - // file systems with the Persistent_2 deployment type. Instead, use . + // response of the CreateFileSystem operation. This data type is not supported on + // file systems with a data repository association. For file systems with a data + // repository association, see . DataRepositoryConfiguration *DataRepositoryConfiguration // The deployment type of the FSx for Lustre file system. Scratch deployment type @@ -2522,11 +2520,13 @@ type OntapFileSystemConfiguration struct { // provisioned IOPS and the provision mode. DiskIopsConfiguration *DiskIopsConfiguration - // (Multi-AZ only) The IP address range in which the endpoints to access your file - // system are created. The Endpoint IP address range you select for your file - // system must exist outside the VPC's CIDR range and must be at least /30 or - // larger. If you do not specify this optional parameter, Amazon FSx will - // automatically select a CIDR block for you. + // (Multi-AZ only) Specifies the IP address range in which the endpoints to access + // your file system will be created. By default in the Amazon FSx API, Amazon FSx + // selects an unused IP address range for you from the 198.19.* range. By default + // in the Amazon FSx console, Amazon FSx chooses the last 64 IP addresses from the + // VPC’s primary CIDR range to use as the endpoint IP address range for the file + // system. You can have overlapping endpoint IP addresses for file systems deployed + // in the same VPC/route tables. EndpointIpAddressRange *string // The Management and Intercluster endpoints that are used to access data or to @@ -3381,10 +3381,8 @@ type UpdateFileSystemLustreConfiguration struct { // added to the S3 bucket, any existing objects that are changed in the S3 bucket, // and any objects that were deleted in the S3 bucket. // - // The AutoImportPolicy - // parameter is not supported for Lustre file systems with the Persistent_2 - // deployment type. Instead, use to update a data repository association on your - // Persistent_2 file system. + // This parameter is not + // supported for file systems with a data repository association. AutoImportPolicy AutoImportPolicyType // The number of days to retain automatic backups. Setting this property to 0 diff --git a/service/lambda/api_client.go b/service/lambda/api_client.go index 7d72bf3a2b2..d78202145f9 100644 --- a/service/lambda/api_client.go +++ b/service/lambda/api_client.go @@ -166,6 +166,8 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf fn(&options) } + setSafeEventStreamClientLogMode(&options, opID) + finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) diff --git a/service/lambda/api_op_CreateEventSourceMapping.go b/service/lambda/api_op_CreateEventSourceMapping.go index d7ecf12da81..3e3d2020033 100644 --- a/service/lambda/api_op_CreateEventSourceMapping.go +++ b/service/lambda/api_op_CreateEventSourceMapping.go @@ -38,6 +38,10 @@ import ( // * // Apache Kafka (https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) // +// * +// Amazon DocumentDB +// (https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html) +// // The // following error handling options are available only for stream sources (DynamoDB // and Kinesis): @@ -86,6 +90,10 @@ import ( // * // Apache Kafka // (https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms) +// +// * +// Amazon DocumentDB +// (https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration) func (c *Client) CreateEventSourceMapping(ctx context.Context, params *CreateEventSourceMappingInput, optFns ...func(*Options)) (*CreateEventSourceMappingOutput, error) { if params == nil { params = &CreateEventSourceMappingInput{} @@ -149,14 +157,16 @@ type CreateEventSourceMappingInput struct { // // * Amazon MQ (ActiveMQ and // RabbitMQ) – Default 100. Max 10,000. + // + // * DocumentDB – Default 100. Max 10,000. BatchSize *int32 - // (Streams only) If the function returns an error, split the batch in two and - // retry. + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. BisectBatchOnFunctionError *bool - // (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded - // records. + // (Kinesis and DynamoDB Streams only) A standard Amazon SQS queue or standard + // Amazon SNS topic destination for discarded records. DestinationConfig *types.DestinationConfig // Specific configuration settings for a DocumentDB event source. @@ -181,6 +191,9 @@ type CreateEventSourceMappingInput struct { // // * Amazon MQ – The // ARN of the broker. + // + // * Amazon DocumentDB – The ARN of the DocumentDB change + // stream. EventSourceArn *string // An object that defines the filter criteria that determine whether Lambda should @@ -188,16 +201,16 @@ type CreateEventSourceMappingInput struct { // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). FilterCriteria *types.FilterCriteria - // (Streams and Amazon SQS) A list of current response type enums applied to the - // event source mapping. + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. FunctionResponseTypes []types.FunctionResponseType // The maximum amount of time, in seconds, that Lambda spends gathering records // before invoking the function. You can configure MaximumBatchingWindowInSeconds // to any value from 0 seconds to 300 seconds in increments of seconds. For streams // and Amazon SQS event sources, the default batching window is 0 seconds. For - // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default - // batching window is 500 ms. Note that because you can only change + // Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, + // the default batching window is 500 ms. Note that because you can only change // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back // to the 500 ms default batching window after you have changed it. To restore the // default batching window, you must create a new event source mapping. Related @@ -206,16 +219,17 @@ type CreateEventSourceMappingInput struct { // 1. MaximumBatchingWindowInSeconds *int32 - // (Streams only) Discard records older than the specified age. The default value - // is infinite (-1). + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is infinite (-1). MaximumRecordAgeInSeconds *int32 - // (Streams only) Discard records after the specified number of retries. The - // default value is infinite (-1). When set to infinite (-1), failed records are - // retried until the record expires. + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is infinite (-1). When set to infinite (-1), + // failed records are retried until the record expires. MaximumRetryAttempts *int32 - // (Streams only) The number of batches to process from each shard concurrently. + // (Kinesis and DynamoDB Streams only) The number of batches to process from each + // shard concurrently. ParallelizationFactor *int32 // (MQ) The name of the Amazon MQ broker destination queue to consume. @@ -238,7 +252,7 @@ type CreateEventSourceMappingInput struct { // The position in a stream from which to start reading. Required for Amazon // Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. AT_TIMESTAMP is - // supported only for Amazon Kinesis streams. + // supported only for Amazon Kinesis streams and Amazon DocumentDB. StartingPosition types.EventSourcePosition // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. @@ -247,8 +261,9 @@ type CreateEventSourceMappingInput struct { // The name of the Kafka topic. Topics []string - // (Streams only) The duration in seconds of a processing window. The range is - // between 1 second and 900 seconds. + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. TumblingWindowInSeconds *int32 noSmithyDocumentSerde @@ -271,12 +286,12 @@ type CreateEventSourceMappingOutput struct { // MaximumBatchingWindowInSeconds to at least 1. BatchSize *int32 - // (Streams only) If the function returns an error, split the batch in two and - // retry. The default value is false. + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. BisectBatchOnFunctionError *bool - // (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded - // records. + // (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic + // destination for discarded records. DestinationConfig *types.DestinationConfig // Specific configuration settings for a DocumentDB event source. @@ -293,8 +308,8 @@ type CreateEventSourceMappingOutput struct { // The ARN of the Lambda function. FunctionArn *string - // (Streams and Amazon SQS) A list of current response type enums applied to the - // event source mapping. + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. FunctionResponseTypes []types.FunctionResponseType // The date that the event source mapping was last updated or that its state @@ -308,8 +323,8 @@ type CreateEventSourceMappingOutput struct { // before invoking the function. You can configure MaximumBatchingWindowInSeconds // to any value from 0 seconds to 300 seconds in increments of seconds. For streams // and Amazon SQS event sources, the default batching window is 0 seconds. For - // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default - // batching window is 500 ms. Note that because you can only change + // Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, + // the default batching window is 500 ms. Note that because you can only change // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back // to the 500 ms default batching window after you have changed it. To restore the // default batching window, you must create a new event source mapping. Related @@ -318,19 +333,19 @@ type CreateEventSourceMappingOutput struct { // 1. MaximumBatchingWindowInSeconds *int32 - // (Streams only) Discard records older than the specified age. The default value - // is -1, which sets the maximum age to infinite. When the value is set to - // infinite, Lambda never discards old records. + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. MaximumRecordAgeInSeconds *int32 - // (Streams only) Discard records after the specified number of retries. The - // default value is -1, which sets the maximum number of retries to infinite. When - // MaximumRetryAttempts is infinite, Lambda retries failed records until the record - // expires in the event source. + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. MaximumRetryAttempts *int32 - // (Streams only) The number of batches to process concurrently from each shard. - // The default value is 1. + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. @@ -353,7 +368,7 @@ type CreateEventSourceMappingOutput struct { // The position in a stream from which to start reading. Required for Amazon // Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is - // supported only for Amazon Kinesis streams. + // supported only for Amazon Kinesis streams and Amazon DocumentDB. StartingPosition types.EventSourcePosition // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. @@ -370,8 +385,9 @@ type CreateEventSourceMappingOutput struct { // The name of the Kafka topic. Topics []string - // (Streams only) The duration in seconds of a processing window. The range is - // 1–900 seconds. + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. TumblingWindowInSeconds *int32 // The identifier of the event source mapping. diff --git a/service/lambda/api_op_CreateFunctionUrlConfig.go b/service/lambda/api_op_CreateFunctionUrlConfig.go index 8427e2d026d..952f97b5e7c 100644 --- a/service/lambda/api_op_CreateFunctionUrlConfig.go +++ b/service/lambda/api_op_CreateFunctionUrlConfig.go @@ -62,6 +62,20 @@ type CreateFunctionUrlConfigInput struct { // function URL. Cors *types.Cors + // Use one of the following options: + // + // * BUFFERED – This is the default option. + // Lambda invokes your function using the Invoke API operation. Invocation results + // are available when the payload is complete. The maximum payload size is 6 MB. + // + // * + // RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can request + // a quota increase + // (https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html). + InvokeMode types.InvokeMode + // The alias name. Qualifier *string @@ -100,6 +114,20 @@ type CreateFunctionUrlConfigOutput struct { // function URL. Cors *types.Cors + // Use one of the following options: + // + // * BUFFERED – This is the default option. + // Lambda invokes your function using the Invoke API operation. Invocation results + // are available when the payload is complete. The maximum payload size is 6 MB. + // + // * + // RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can request + // a quota increase + // (https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html). + InvokeMode types.InvokeMode + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/lambda/api_op_DeleteEventSourceMapping.go b/service/lambda/api_op_DeleteEventSourceMapping.go index ee0321a039f..06082ad5cf7 100644 --- a/service/lambda/api_op_DeleteEventSourceMapping.go +++ b/service/lambda/api_op_DeleteEventSourceMapping.go @@ -59,12 +59,12 @@ type DeleteEventSourceMappingOutput struct { // MaximumBatchingWindowInSeconds to at least 1. BatchSize *int32 - // (Streams only) If the function returns an error, split the batch in two and - // retry. The default value is false. + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. BisectBatchOnFunctionError *bool - // (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded - // records. + // (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic + // destination for discarded records. DestinationConfig *types.DestinationConfig // Specific configuration settings for a DocumentDB event source. @@ -81,8 +81,8 @@ type DeleteEventSourceMappingOutput struct { // The ARN of the Lambda function. FunctionArn *string - // (Streams and Amazon SQS) A list of current response type enums applied to the - // event source mapping. + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. FunctionResponseTypes []types.FunctionResponseType // The date that the event source mapping was last updated or that its state @@ -96,8 +96,8 @@ type DeleteEventSourceMappingOutput struct { // before invoking the function. You can configure MaximumBatchingWindowInSeconds // to any value from 0 seconds to 300 seconds in increments of seconds. For streams // and Amazon SQS event sources, the default batching window is 0 seconds. For - // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default - // batching window is 500 ms. Note that because you can only change + // Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, + // the default batching window is 500 ms. Note that because you can only change // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back // to the 500 ms default batching window after you have changed it. To restore the // default batching window, you must create a new event source mapping. Related @@ -106,19 +106,19 @@ type DeleteEventSourceMappingOutput struct { // 1. MaximumBatchingWindowInSeconds *int32 - // (Streams only) Discard records older than the specified age. The default value - // is -1, which sets the maximum age to infinite. When the value is set to - // infinite, Lambda never discards old records. + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. MaximumRecordAgeInSeconds *int32 - // (Streams only) Discard records after the specified number of retries. The - // default value is -1, which sets the maximum number of retries to infinite. When - // MaximumRetryAttempts is infinite, Lambda retries failed records until the record - // expires in the event source. + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. MaximumRetryAttempts *int32 - // (Streams only) The number of batches to process concurrently from each shard. - // The default value is 1. + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. @@ -141,7 +141,7 @@ type DeleteEventSourceMappingOutput struct { // The position in a stream from which to start reading. Required for Amazon // Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is - // supported only for Amazon Kinesis streams. + // supported only for Amazon Kinesis streams and Amazon DocumentDB. StartingPosition types.EventSourcePosition // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. @@ -158,8 +158,9 @@ type DeleteEventSourceMappingOutput struct { // The name of the Kafka topic. Topics []string - // (Streams only) The duration in seconds of a processing window. The range is - // 1–900 seconds. + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. TumblingWindowInSeconds *int32 // The identifier of the event source mapping. diff --git a/service/lambda/api_op_GetEventSourceMapping.go b/service/lambda/api_op_GetEventSourceMapping.go index 6352978e2a9..b142f8543ac 100644 --- a/service/lambda/api_op_GetEventSourceMapping.go +++ b/service/lambda/api_op_GetEventSourceMapping.go @@ -56,12 +56,12 @@ type GetEventSourceMappingOutput struct { // MaximumBatchingWindowInSeconds to at least 1. BatchSize *int32 - // (Streams only) If the function returns an error, split the batch in two and - // retry. The default value is false. + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. BisectBatchOnFunctionError *bool - // (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded - // records. + // (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic + // destination for discarded records. DestinationConfig *types.DestinationConfig // Specific configuration settings for a DocumentDB event source. @@ -78,8 +78,8 @@ type GetEventSourceMappingOutput struct { // The ARN of the Lambda function. FunctionArn *string - // (Streams and Amazon SQS) A list of current response type enums applied to the - // event source mapping. + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. FunctionResponseTypes []types.FunctionResponseType // The date that the event source mapping was last updated or that its state @@ -93,8 +93,8 @@ type GetEventSourceMappingOutput struct { // before invoking the function. You can configure MaximumBatchingWindowInSeconds // to any value from 0 seconds to 300 seconds in increments of seconds. For streams // and Amazon SQS event sources, the default batching window is 0 seconds. For - // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default - // batching window is 500 ms. Note that because you can only change + // Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, + // the default batching window is 500 ms. Note that because you can only change // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back // to the 500 ms default batching window after you have changed it. To restore the // default batching window, you must create a new event source mapping. Related @@ -103,19 +103,19 @@ type GetEventSourceMappingOutput struct { // 1. MaximumBatchingWindowInSeconds *int32 - // (Streams only) Discard records older than the specified age. The default value - // is -1, which sets the maximum age to infinite. When the value is set to - // infinite, Lambda never discards old records. + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. MaximumRecordAgeInSeconds *int32 - // (Streams only) Discard records after the specified number of retries. The - // default value is -1, which sets the maximum number of retries to infinite. When - // MaximumRetryAttempts is infinite, Lambda retries failed records until the record - // expires in the event source. + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. MaximumRetryAttempts *int32 - // (Streams only) The number of batches to process concurrently from each shard. - // The default value is 1. + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. @@ -138,7 +138,7 @@ type GetEventSourceMappingOutput struct { // The position in a stream from which to start reading. Required for Amazon // Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is - // supported only for Amazon Kinesis streams. + // supported only for Amazon Kinesis streams and Amazon DocumentDB. StartingPosition types.EventSourcePosition // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. @@ -155,8 +155,9 @@ type GetEventSourceMappingOutput struct { // The name of the Kafka topic. Topics []string - // (Streams only) The duration in seconds of a processing window. The range is - // 1–900 seconds. + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. TumblingWindowInSeconds *int32 // The identifier of the event source mapping. diff --git a/service/lambda/api_op_GetFunctionEventInvokeConfig.go b/service/lambda/api_op_GetFunctionEventInvokeConfig.go index 10ef5ad5130..350fa137af2 100644 --- a/service/lambda/api_op_GetFunctionEventInvokeConfig.go +++ b/service/lambda/api_op_GetFunctionEventInvokeConfig.go @@ -64,10 +64,10 @@ type GetFunctionEventInvokeConfigOutput struct { // * Function - The Amazon Resource Name (ARN) of a Lambda // function. // - // * Queue - The ARN of an SQS queue. + // * Queue - The ARN of a standard SQS queue. // - // * Topic - The ARN of an SNS - // topic. + // * Topic - The ARN of a + // standard SNS topic. // // * Event Bus - The ARN of an Amazon EventBridge event bus. DestinationConfig *types.DestinationConfig diff --git a/service/lambda/api_op_GetFunctionUrlConfig.go b/service/lambda/api_op_GetFunctionUrlConfig.go index b5b4ff7e157..5e826dcbc07 100644 --- a/service/lambda/api_op_GetFunctionUrlConfig.go +++ b/service/lambda/api_op_GetFunctionUrlConfig.go @@ -90,6 +90,20 @@ type GetFunctionUrlConfigOutput struct { // function URL. Cors *types.Cors + // Use one of the following options: + // + // * BUFFERED – This is the default option. + // Lambda invokes your function using the Invoke API operation. Invocation results + // are available when the payload is complete. The maximum payload size is 6 MB. + // + // * + // RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can request + // a quota increase + // (https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html). + InvokeMode types.InvokeMode + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/lambda/api_op_InvokeWithResponseStream.go b/service/lambda/api_op_InvokeWithResponseStream.go new file mode 100644 index 00000000000..e8c563c9f9c --- /dev/null +++ b/service/lambda/api_op_InvokeWithResponseStream.go @@ -0,0 +1,277 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "sync" +) + +// Configure your Lambda functions to stream response payloads back to clients. For +// more information, see Configuring a Lambda function to stream responses +// (https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html). +func (c *Client) InvokeWithResponseStream(ctx context.Context, params *InvokeWithResponseStreamInput, optFns ...func(*Options)) (*InvokeWithResponseStreamOutput, error) { + if params == nil { + params = &InvokeWithResponseStreamInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "InvokeWithResponseStream", params, optFns, c.addOperationInvokeWithResponseStreamMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*InvokeWithResponseStreamOutput) + out.ResultMetadata = metadata + return out, nil +} + +type InvokeWithResponseStreamInput struct { + + // The name of the Lambda function. Name formats + // + // * Function name – my-function. + // + // * + // Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function. + // + // * + // Partial ARN – 123456789012:function:my-function. + // + // The length constraint applies + // only to the full ARN. If you specify only the function name, it is limited to 64 + // characters in length. + // + // This member is required. + FunctionName *string + + // Up to 3,583 bytes of base64-encoded data about the invoking client to pass to + // the function in the context object. + ClientContext *string + + // Use one of the following options: + // + // * RequestResponse (default) – Invoke the + // function synchronously. Keep the connection open until the function returns a + // response or times out. The API operation response includes the function response + // and additional data. + // + // * DryRun – Validate parameter values and verify that the + // IAM user or role has permission to invoke the function. + InvocationType types.ResponseStreamingInvocationType + + // Set to Tail to include the execution log in the response. Applies to + // synchronously invoked functions only. + LogType types.LogType + + // The JSON that you want to provide to your Lambda function as input. You can + // enter the JSON directly. For example, --payload '{ "key": "value" }'. You can + // also specify a file path. For example, --payload file://payload.json. + Payload []byte + + // The alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type InvokeWithResponseStreamOutput struct { + + // The version of the function that executed. When you invoke a function with an + // alias, this indicates which version the alias resolved to. + ExecutedVersion *string + + // The type of data the stream is returning. + ResponseStreamContentType *string + + // For a successful request, the HTTP status code is in the 200 range. For the + // RequestResponse invocation type, this status code is 200. For the DryRun + // invocation type, this status code is 204. + StatusCode int32 + + eventStream *InvokeWithResponseStreamEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *InvokeWithResponseStreamOutput) GetStream() *InvokeWithResponseStreamEventStream { + return o.eventStream +} + +func (c *Client) addOperationInvokeWithResponseStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeWithResponseStream{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeWithResponseStream{}, middleware.After) + if err != nil { + return err + } + if err = addEventStreamInvokeWithResponseStreamMiddleware(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addOpInvokeWithResponseStreamValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeWithResponseStream(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opInvokeWithResponseStream(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lambda", + OperationName: "InvokeWithResponseStream", + } +} + +// InvokeWithResponseStreamEventStream provides the event stream handling for the InvokeWithResponseStream operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewInvokeWithResponseStreamEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type InvokeWithResponseStreamEventStream struct { + // InvokeWithResponseStreamResponseEventReader is the EventStream reader for the + // InvokeWithResponseStreamResponseEvent events. This value is automatically set by + // the SDK when the API call is made Use this member when unit testing your code + // with the SDK to mock out the EventStream Reader. + // + // Must not be nil. + Reader InvokeWithResponseStreamResponseEventReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewInvokeWithResponseStreamEventStream initializes an InvokeWithResponseStreamEventStream. +// This function should only be used for testing and mocking the InvokeWithResponseStreamEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +func NewInvokeWithResponseStreamEventStream(optFns ...func(*InvokeWithResponseStreamEventStream)) *InvokeWithResponseStreamEventStream { + es := &InvokeWithResponseStreamEventStream{ + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + } + for _, fn := range optFns { + fn(es) + } + return es +} + +// Events returns a channel to read events from. +func (es *InvokeWithResponseStreamEventStream) Events() <-chan types.InvokeWithResponseStreamResponseEvent { + return es.Reader.Events() +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// Will close the underlying EventStream writer and reader, and no more events can be +// sent or received. +func (es *InvokeWithResponseStreamEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *InvokeWithResponseStreamEventStream) safeClose() { + close(es.done) + + es.Reader.Close() +} + +// Err returns any error that occurred while reading or writing EventStream Events +// from the service API's response. Returns nil if there were no errors. +func (es *InvokeWithResponseStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *InvokeWithResponseStreamEventStream) waitStreamClose() { + type errorSet interface { + ErrorSet() <-chan struct{} + } + + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(errorSet); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + + } +} diff --git a/service/lambda/api_op_ListEventSourceMappings.go b/service/lambda/api_op_ListEventSourceMappings.go index d2f5a6ff4d5..8ef09c9253a 100644 --- a/service/lambda/api_op_ListEventSourceMappings.go +++ b/service/lambda/api_op_ListEventSourceMappings.go @@ -46,6 +46,9 @@ type ListEventSourceMappingsInput struct { // // * Amazon MQ – The // ARN of the broker. + // + // * Amazon DocumentDB – The ARN of the DocumentDB change + // stream. EventSourceArn *string // The name of the Lambda function. Name formats diff --git a/service/lambda/api_op_PutFunctionEventInvokeConfig.go b/service/lambda/api_op_PutFunctionEventInvokeConfig.go index aa64d9ea5e4..96a90071e4a 100644 --- a/service/lambda/api_op_PutFunctionEventInvokeConfig.go +++ b/service/lambda/api_op_PutFunctionEventInvokeConfig.go @@ -69,10 +69,10 @@ type PutFunctionEventInvokeConfigInput struct { // * Function - The Amazon Resource Name (ARN) of a Lambda // function. // - // * Queue - The ARN of an SQS queue. + // * Queue - The ARN of a standard SQS queue. // - // * Topic - The ARN of an SNS - // topic. + // * Topic - The ARN of a + // standard SNS topic. // // * Event Bus - The ARN of an Amazon EventBridge event bus. DestinationConfig *types.DestinationConfig @@ -97,10 +97,10 @@ type PutFunctionEventInvokeConfigOutput struct { // * Function - The Amazon Resource Name (ARN) of a Lambda // function. // - // * Queue - The ARN of an SQS queue. + // * Queue - The ARN of a standard SQS queue. // - // * Topic - The ARN of an SNS - // topic. + // * Topic - The ARN of a + // standard SNS topic. // // * Event Bus - The ARN of an Amazon EventBridge event bus. DestinationConfig *types.DestinationConfig diff --git a/service/lambda/api_op_UpdateEventSourceMapping.go b/service/lambda/api_op_UpdateEventSourceMapping.go index 109fed294a5..bf2bc09eabc 100644 --- a/service/lambda/api_op_UpdateEventSourceMapping.go +++ b/service/lambda/api_op_UpdateEventSourceMapping.go @@ -38,6 +38,10 @@ import ( // * // Apache Kafka (https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) // +// * +// Amazon DocumentDB +// (https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html) +// // The // following error handling options are available only for stream sources (DynamoDB // and Kinesis): @@ -86,6 +90,10 @@ import ( // * // Apache Kafka // (https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms) +// +// * +// Amazon DocumentDB +// (https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration) func (c *Client) UpdateEventSourceMapping(ctx context.Context, params *UpdateEventSourceMappingInput, optFns ...func(*Options)) (*UpdateEventSourceMappingOutput, error) { if params == nil { params = &UpdateEventSourceMappingInput{} @@ -129,14 +137,16 @@ type UpdateEventSourceMappingInput struct { // // * Amazon MQ (ActiveMQ and // RabbitMQ) – Default 100. Max 10,000. + // + // * DocumentDB – Default 100. Max 10,000. BatchSize *int32 - // (Streams only) If the function returns an error, split the batch in two and - // retry. + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. BisectBatchOnFunctionError *bool - // (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded - // records. + // (Kinesis and DynamoDB Streams only) A standard Amazon SQS queue or standard + // Amazon SNS topic destination for discarded records. DestinationConfig *types.DestinationConfig // Specific configuration settings for a DocumentDB event source. @@ -170,16 +180,16 @@ type UpdateEventSourceMappingInput struct { // in length. FunctionName *string - // (Streams and Amazon SQS) A list of current response type enums applied to the - // event source mapping. + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. FunctionResponseTypes []types.FunctionResponseType // The maximum amount of time, in seconds, that Lambda spends gathering records // before invoking the function. You can configure MaximumBatchingWindowInSeconds // to any value from 0 seconds to 300 seconds in increments of seconds. For streams // and Amazon SQS event sources, the default batching window is 0 seconds. For - // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default - // batching window is 500 ms. Note that because you can only change + // Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, + // the default batching window is 500 ms. Note that because you can only change // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back // to the 500 ms default batching window after you have changed it. To restore the // default batching window, you must create a new event source mapping. Related @@ -188,16 +198,17 @@ type UpdateEventSourceMappingInput struct { // 1. MaximumBatchingWindowInSeconds *int32 - // (Streams only) Discard records older than the specified age. The default value - // is infinite (-1). + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is infinite (-1). MaximumRecordAgeInSeconds *int32 - // (Streams only) Discard records after the specified number of retries. The - // default value is infinite (-1). When set to infinite (-1), failed records are - // retried until the record expires. + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is infinite (-1). When set to infinite (-1), + // failed records are retried until the record expires. MaximumRetryAttempts *int32 - // (Streams only) The number of batches to process from each shard concurrently. + // (Kinesis and DynamoDB Streams only) The number of batches to process from each + // shard concurrently. ParallelizationFactor *int32 // (Amazon SQS only) The scaling configuration for the event source. For more @@ -209,8 +220,9 @@ type UpdateEventSourceMappingInput struct { // event source. SourceAccessConfigurations []types.SourceAccessConfiguration - // (Streams only) The duration in seconds of a processing window. The range is - // between 1 second and 900 seconds. + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. TumblingWindowInSeconds *int32 noSmithyDocumentSerde @@ -233,12 +245,12 @@ type UpdateEventSourceMappingOutput struct { // MaximumBatchingWindowInSeconds to at least 1. BatchSize *int32 - // (Streams only) If the function returns an error, split the batch in two and - // retry. The default value is false. + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. BisectBatchOnFunctionError *bool - // (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded - // records. + // (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic + // destination for discarded records. DestinationConfig *types.DestinationConfig // Specific configuration settings for a DocumentDB event source. @@ -255,8 +267,8 @@ type UpdateEventSourceMappingOutput struct { // The ARN of the Lambda function. FunctionArn *string - // (Streams and Amazon SQS) A list of current response type enums applied to the - // event source mapping. + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. FunctionResponseTypes []types.FunctionResponseType // The date that the event source mapping was last updated or that its state @@ -270,8 +282,8 @@ type UpdateEventSourceMappingOutput struct { // before invoking the function. You can configure MaximumBatchingWindowInSeconds // to any value from 0 seconds to 300 seconds in increments of seconds. For streams // and Amazon SQS event sources, the default batching window is 0 seconds. For - // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default - // batching window is 500 ms. Note that because you can only change + // Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, + // the default batching window is 500 ms. Note that because you can only change // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back // to the 500 ms default batching window after you have changed it. To restore the // default batching window, you must create a new event source mapping. Related @@ -280,19 +292,19 @@ type UpdateEventSourceMappingOutput struct { // 1. MaximumBatchingWindowInSeconds *int32 - // (Streams only) Discard records older than the specified age. The default value - // is -1, which sets the maximum age to infinite. When the value is set to - // infinite, Lambda never discards old records. + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. MaximumRecordAgeInSeconds *int32 - // (Streams only) Discard records after the specified number of retries. The - // default value is -1, which sets the maximum number of retries to infinite. When - // MaximumRetryAttempts is infinite, Lambda retries failed records until the record - // expires in the event source. + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. MaximumRetryAttempts *int32 - // (Streams only) The number of batches to process concurrently from each shard. - // The default value is 1. + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. @@ -315,7 +327,7 @@ type UpdateEventSourceMappingOutput struct { // The position in a stream from which to start reading. Required for Amazon // Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is - // supported only for Amazon Kinesis streams. + // supported only for Amazon Kinesis streams and Amazon DocumentDB. StartingPosition types.EventSourcePosition // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. @@ -332,8 +344,9 @@ type UpdateEventSourceMappingOutput struct { // The name of the Kafka topic. Topics []string - // (Streams only) The duration in seconds of a processing window. The range is - // 1–900 seconds. + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. TumblingWindowInSeconds *int32 // The identifier of the event source mapping. diff --git a/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go b/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go index 1e1c2c525b1..264dc864ea6 100644 --- a/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go +++ b/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go @@ -56,10 +56,10 @@ type UpdateFunctionEventInvokeConfigInput struct { // * Function - The Amazon Resource Name (ARN) of a Lambda // function. // - // * Queue - The ARN of an SQS queue. + // * Queue - The ARN of a standard SQS queue. // - // * Topic - The ARN of an SNS - // topic. + // * Topic - The ARN of a + // standard SNS topic. // // * Event Bus - The ARN of an Amazon EventBridge event bus. DestinationConfig *types.DestinationConfig @@ -84,10 +84,10 @@ type UpdateFunctionEventInvokeConfigOutput struct { // * Function - The Amazon Resource Name (ARN) of a Lambda // function. // - // * Queue - The ARN of an SQS queue. + // * Queue - The ARN of a standard SQS queue. // - // * Topic - The ARN of an SNS - // topic. + // * Topic - The ARN of a + // standard SNS topic. // // * Event Bus - The ARN of an Amazon EventBridge event bus. DestinationConfig *types.DestinationConfig diff --git a/service/lambda/api_op_UpdateFunctionUrlConfig.go b/service/lambda/api_op_UpdateFunctionUrlConfig.go index c9bb6b209a6..6daf6487d18 100644 --- a/service/lambda/api_op_UpdateFunctionUrlConfig.go +++ b/service/lambda/api_op_UpdateFunctionUrlConfig.go @@ -58,6 +58,20 @@ type UpdateFunctionUrlConfigInput struct { // function URL. Cors *types.Cors + // Use one of the following options: + // + // * BUFFERED – This is the default option. + // Lambda invokes your function using the Invoke API operation. Invocation results + // are available when the payload is complete. The maximum payload size is 6 MB. + // + // * + // RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can request + // a quota increase + // (https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html). + InvokeMode types.InvokeMode + // The alias name. Qualifier *string @@ -102,6 +116,20 @@ type UpdateFunctionUrlConfigOutput struct { // function URL. Cors *types.Cors + // Use one of the following options: + // + // * BUFFERED – This is the default option. + // Lambda invokes your function using the Invoke API operation. Invocation results + // are available when the payload is complete. The maximum payload size is 6 MB. + // + // * + // RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can request + // a quota increase + // (https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html). + InvokeMode types.InvokeMode + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/lambda/deserializers.go b/service/lambda/deserializers.go index 13369daacea..f0ec39e9a27 100644 --- a/service/lambda/deserializers.go +++ b/service/lambda/deserializers.go @@ -7,6 +7,8 @@ import ( "context" "encoding/json" "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/lambda/types" smithy "github.com/aws/smithy-go" @@ -1748,6 +1750,15 @@ func awsRestjson1_deserializeOpDocumentCreateFunctionUrlConfigOutput(v **CreateF sv.FunctionUrl = ptr.String(jtv) } + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + default: _, _ = key, value @@ -5261,6 +5272,15 @@ func awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(v **GetFunctio sv.FunctionUrl = ptr.String(jtv) } + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + case "LastModifiedTime": if value != nil { jtv, ok := value.(string) @@ -6796,6 +6816,189 @@ func awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(v *InvokeAsyncOutpu return nil } +type awsRestjson1_deserializeOpInvokeWithResponseStream struct { +} + +func (*awsRestjson1_deserializeOpInvokeWithResponseStream) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) HandleDeserialize(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_deserializeOpErrorInvokeWithResponseStream(response, &metadata) + } + output := &InvokeWithResponseStreamOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("EC2AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorEC2AccessDeniedException(response, errorBody) + + case strings.EqualFold("EC2ThrottledException", errorCode): + return awsRestjson1_deserializeErrorEC2ThrottledException(response, errorBody) + + case strings.EqualFold("EC2UnexpectedException", errorCode): + return awsRestjson1_deserializeErrorEC2UnexpectedException(response, errorBody) + + case strings.EqualFold("EFSIOException", errorCode): + return awsRestjson1_deserializeErrorEFSIOException(response, errorBody) + + case strings.EqualFold("EFSMountConnectivityException", errorCode): + return awsRestjson1_deserializeErrorEFSMountConnectivityException(response, errorBody) + + case strings.EqualFold("EFSMountFailureException", errorCode): + return awsRestjson1_deserializeErrorEFSMountFailureException(response, errorBody) + + case strings.EqualFold("EFSMountTimeoutException", errorCode): + return awsRestjson1_deserializeErrorEFSMountTimeoutException(response, errorBody) + + case strings.EqualFold("ENILimitReachedException", errorCode): + return awsRestjson1_deserializeErrorENILimitReachedException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("InvalidRequestContentException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) + + case strings.EqualFold("InvalidRuntimeException", errorCode): + return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) + + case strings.EqualFold("InvalidSecurityGroupIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response, errorBody) + + case strings.EqualFold("InvalidSubnetIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSubnetIDException(response, errorBody) + + case strings.EqualFold("InvalidZipFileException", errorCode): + return awsRestjson1_deserializeErrorInvalidZipFileException(response, errorBody) + + case strings.EqualFold("KMSAccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorKMSAccessDeniedException(response, errorBody) + + case strings.EqualFold("KMSDisabledException", errorCode): + return awsRestjson1_deserializeErrorKMSDisabledException(response, errorBody) + + case strings.EqualFold("KMSInvalidStateException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidStateException(response, errorBody) + + case strings.EqualFold("KMSNotFoundException", errorCode): + return awsRestjson1_deserializeErrorKMSNotFoundException(response, errorBody) + + case strings.EqualFold("RequestTooLargeException", errorCode): + return awsRestjson1_deserializeErrorRequestTooLargeException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceNotReadyException", errorCode): + return awsRestjson1_deserializeErrorResourceNotReadyException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("SubnetIPAddressLimitReachedException", errorCode): + return awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnsupportedMediaTypeException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *InvokeWithResponseStreamOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ExecutedVersion = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ResponseStreamContentType = ptr.String(headerValues[0]) + } + + v.StatusCode = int32(response.StatusCode) + + return nil +} + type awsRestjson1_deserializeOpListAliases struct { } @@ -12830,6 +13033,15 @@ func awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(v **UpdateF sv.FunctionUrl = ptr.String(jtv) } + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + case "LastModifiedTime": if value != nil { jtv, ok := value.(string) @@ -12848,6 +13060,192 @@ func awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(v **UpdateF return nil } +func awsRestjson1_deserializeEventStreamInvokeWithResponseStreamResponseEvent(v *types.InvokeWithResponseStreamResponseEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } + + switch { + case strings.EqualFold("InvokeComplete", eventType.String()): + vv := &types.InvokeWithResponseStreamResponseEventMemberInvokeComplete{} + if err := awsRestjson1_deserializeEventMessageInvokeWithResponseStreamCompleteEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("PayloadChunk", eventType.String()): + vv := &types.InvokeWithResponseStreamResponseEventMemberPayloadChunk{} + if err := awsRestjson1_deserializeEventMessageInvokeResponseStreamUpdate(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + default: + buffer := bytes.NewBuffer(nil) + eventstream.NewEncoder().Encode(buffer, *msg) + *v = &types.UnknownUnionMember{ + Tag: eventType.String(), + Value: buffer.Bytes(), + } + return nil + + } +} + +func awsRestjson1_deserializeEventStreamExceptionInvokeWithResponseStreamResponseEvent(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) + } + + switch { + default: + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + return err + } + errorCode := "UnknownError" + errorMessage := errorCode + if ev := exceptionType.String(); len(ev) > 0 { + errorCode = ev + } else if ev := code; len(ev) > 0 { + errorCode = ev + } + if ev := message; len(ev) > 0 { + errorMessage = ev + } + return &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + } +} + +func awsRestjson1_deserializeEventMessageInvokeResponseStreamUpdate(v *types.InvokeResponseStreamUpdate, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + if msg.Payload != nil { + bsv := make([]byte, len(msg.Payload)) + copy(bsv, msg.Payload) + + v.Payload = bsv + } + return nil +} + +func awsRestjson1_deserializeEventMessageInvokeWithResponseStreamCompleteEvent(v *types.InvokeWithResponseStreamCompleteEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + if err := awsRestjson1_deserializeDocumentInvokeWithResponseStreamCompleteEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return nil +} + +func awsRestjson1_deserializeDocumentInvokeWithResponseStreamCompleteEvent(v **types.InvokeWithResponseStreamCompleteEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvokeWithResponseStreamCompleteEvent + if *v == nil { + sv = &types.InvokeWithResponseStreamCompleteEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "ErrorDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorDetails = ptr.String(jtv) + } + + case "LogResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LogResult = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeOpHttpBindingsTooManyRequestsException(v *types.TooManyRequestsException, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) @@ -17178,6 +17576,15 @@ func awsRestjson1_deserializeDocumentFunctionUrlConfig(v **types.FunctionUrlConf sv.FunctionUrl = ptr.String(jtv) } + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + case "LastModifiedTime": if value != nil { jtv, ok := value.(string) diff --git a/service/lambda/eventstream.go b/service/lambda/eventstream.go new file mode 100644 index 00000000000..9ad38fa0bb6 --- /dev/null +++ b/service/lambda/eventstream.go @@ -0,0 +1,285 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "sync" +) + +// InvokeWithResponseStreamResponseEventReader provides the interface for reading +// events from a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type InvokeWithResponseStreamResponseEventReader interface { + Events() <-chan types.InvokeWithResponseStreamResponseEvent + Close() error + Err() error +} + +type invokeWithResponseStreamResponseEventReader struct { + stream chan types.InvokeWithResponseStreamResponseEvent + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once +} + +func newInvokeWithResponseStreamResponseEventReader(readCloser io.ReadCloser, decoder *eventstream.Decoder) *invokeWithResponseStreamResponseEventReader { + w := &invokeWithResponseStreamResponseEventReader{ + stream: make(chan types.InvokeWithResponseStreamResponseEvent), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + } + + go w.readEventStream() + + return w +} + +func (r *invokeWithResponseStreamResponseEventReader) Events() <-chan types.InvokeWithResponseStreamResponseEvent { + return r.stream +} + +func (r *invokeWithResponseStreamResponseEventReader) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + r.payloadBuf = r.payloadBuf[0:0] + decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf) + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + return + default: + r.err.SetError(err) + return + } + } + + event, err := r.deserializeEventMessage(&decodedMessage) + if err != nil { + r.err.SetError(err) + return + } + + select { + case r.stream <- event: + case <-r.done: + return + } + + } +} + +func (r *invokeWithResponseStreamResponseEventReader) deserializeEventMessage(msg *eventstream.Message) (types.InvokeWithResponseStreamResponseEvent, error) { + messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader) + if messageType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader) + } + + switch messageType.String() { + case eventstreamapi.EventMessageType: + var v types.InvokeWithResponseStreamResponseEvent + if err := awsRestjson1_deserializeEventStreamInvokeWithResponseStreamResponseEvent(&v, msg); err != nil { + return nil, err + } + return v, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsRestjson1_deserializeEventStreamExceptionInvokeWithResponseStreamResponseEvent(msg) + + case eventstreamapi.ErrorMessageType: + errorCode := "UnknownError" + errorMessage := errorCode + if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil { + errorCode = header.String() + } + if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil { + errorMessage = header.String() + } + return nil, &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + default: + mc := msg.Clone() + return nil, &UnknownEventMessageError{ + Type: messageType.String(), + Message: &mc, + } + + } +} + +func (r *invokeWithResponseStreamResponseEventReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *invokeWithResponseStreamResponseEventReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *invokeWithResponseStreamResponseEventReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *invokeWithResponseStreamResponseEventReader) Err() error { + return r.err.Err() +} + +func (r *invokeWithResponseStreamResponseEventReader) Closed() <-chan struct{} { + return r.done +} + +type awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + defer func() { + if err == nil { + return + } + m.closeResponseBody(out) + }() + + logger := middleware.GetLogger(ctx) + + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request) + } + _ = request + + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) + } + _ = deserializeOutput + + output, ok := out.Result.(*InvokeWithResponseStreamOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &InvokeWithResponseStreamOutput{} + out.Result = output + } + + eventReader := newInvokeWithResponseStreamResponseEventReader( + deserializeOutput.Body, + eventstream.NewDecoder(func(options *eventstream.DecoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamReads + + }), + ) + defer func() { + if err == nil { + return + } + _ = eventReader.Close() + }() + + output.eventStream = NewInvokeWithResponseStreamEventStream(func(stream *InvokeWithResponseStreamEventStream) { + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) closeResponseBody(out middleware.DeserializeOutput) { + if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil { + _, _ = io.Copy(ioutil.Discard, resp.Body) + _ = resp.Body.Close() + } +} + +func addEventStreamInvokeWithResponseStreamMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream{ + LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(), + LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(), + }, "OperationDeserializer", middleware.Before); err != nil { + return err + } + return nil + +} + +// UnknownEventMessageError provides an error when a message is received from the stream, +// but the reader is unable to determine what kind of message it is. +type UnknownEventMessageError struct { + Type string + Message *eventstream.Message +} + +// Error retruns the error message string. +func (e *UnknownEventMessageError) Error() string { + return "unknown event stream message type, " + e.Type +} + +func setSafeEventStreamClientLogMode(o *Options, operation string) { + switch operation { + case "InvokeWithResponseStream": + toggleEventStreamClientLogMode(o, false, true) + return + + default: + return + + } +} +func toggleEventStreamClientLogMode(o *Options, request, response bool) { + mode := o.ClientLogMode + + if request && mode.IsRequestWithBody() { + mode.ClearRequestWithBody() + mode |= aws.LogRequest + } + + if response && mode.IsResponseWithBody() { + mode.ClearResponseWithBody() + mode |= aws.LogResponse + } + + o.ClientLogMode = mode + +} diff --git a/service/lambda/generated.json b/service/lambda/generated.json index 7dc65b29a40..355159f65b0 100644 --- a/service/lambda/generated.json +++ b/service/lambda/generated.json @@ -1,6 +1,7 @@ { "dependencies": { "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", "github.com/aws/smithy-go": "v1.4.0", @@ -44,6 +45,7 @@ "api_op_GetRuntimeManagementConfig.go", "api_op_Invoke.go", "api_op_InvokeAsync.go", + "api_op_InvokeWithResponseStream.go", "api_op_ListAliases.go", "api_op_ListCodeSigningConfigs.go", "api_op_ListEventSourceMappings.go", @@ -77,6 +79,7 @@ "deserializers.go", "doc.go", "endpoints.go", + "eventstream.go", "generated.json", "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", @@ -85,6 +88,7 @@ "types/enums.go", "types/errors.go", "types/types.go", + "types/types_exported_test.go", "validators.go" ], "go": "1.15", diff --git a/service/lambda/go.mod b/service/lambda/go.mod index 5202ff75128..18c03966a3e 100644 --- a/service/lambda/go.mod +++ b/service/lambda/go.mod @@ -4,6 +4,7 @@ go 1.15 require ( github.com/aws/aws-sdk-go-v2 v1.17.7 + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 github.com/aws/smithy-go v1.13.5 @@ -12,6 +13,8 @@ require ( replace github.com/aws/aws-sdk-go-v2 => ../../ +replace github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => ../../aws/protocol/eventstream/ + replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/lambda/serializers.go b/service/lambda/serializers.go index 18b40abaf0c..9af5bf872a4 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -918,6 +918,11 @@ func awsRestjson1_serializeOpDocumentCreateFunctionUrlConfigInput(v *CreateFunct } } + if len(v.InvokeMode) > 0 { + ok := object.Key("InvokeMode") + ok.String(string(v.InvokeMode)) + } + return nil } @@ -2650,6 +2655,95 @@ func awsRestjson1_serializeOpHttpBindingsInvokeAsyncInput(v *InvokeAsyncInput, e return nil } +type awsRestjson1_serializeOpInvokeWithResponseStream struct { +} + +func (*awsRestjson1_serializeOpInvokeWithResponseStream) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpInvokeWithResponseStream) 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.(*InvokeWithResponseStreamInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-11-15/functions/{FunctionName}/response-streaming-invocations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsInvokeWithResponseStreamInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.Payload != nil { + payload := bytes.NewReader(input.Payload) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsInvokeWithResponseStreamInput(v *InvokeWithResponseStreamInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientContext != nil && len(*v.ClientContext) > 0 { + locationName := "X-Amz-Client-Context" + encoder.SetHeader(locationName).String(*v.ClientContext) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if len(v.InvocationType) > 0 { + locationName := "X-Amz-Invocation-Type" + encoder.SetHeader(locationName).String(string(v.InvocationType)) + } + + if len(v.LogType) > 0 { + locationName := "X-Amz-Log-Type" + encoder.SetHeader(locationName).String(string(v.LogType)) + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + type awsRestjson1_serializeOpListAliases struct { } @@ -5218,6 +5312,11 @@ func awsRestjson1_serializeOpDocumentUpdateFunctionUrlConfigInput(v *UpdateFunct } } + if len(v.InvokeMode) > 0 { + ok := object.Key("InvokeMode") + ok.String(string(v.InvokeMode)) + } + return nil } diff --git a/service/lambda/types/enums.go b/service/lambda/types/enums.go index 79950558545..f7a5429cc9c 100644 --- a/service/lambda/types/enums.go +++ b/service/lambda/types/enums.go @@ -162,6 +162,24 @@ func (InvocationType) Values() []InvocationType { } } +type InvokeMode string + +// Enum values for InvokeMode +const ( + InvokeModeBuffered InvokeMode = "BUFFERED" + InvokeModeResponseStream InvokeMode = "RESPONSE_STREAM" +) + +// Values returns all known values for InvokeMode. 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 (InvokeMode) Values() []InvokeMode { + return []InvokeMode{ + "BUFFERED", + "RESPONSE_STREAM", + } +} + type LastUpdateStatus string // Enum values for LastUpdateStatus @@ -295,6 +313,25 @@ func (ProvisionedConcurrencyStatusEnum) Values() []ProvisionedConcurrencyStatusE } } +type ResponseStreamingInvocationType string + +// Enum values for ResponseStreamingInvocationType +const ( + ResponseStreamingInvocationTypeRequestResponse ResponseStreamingInvocationType = "RequestResponse" + ResponseStreamingInvocationTypeDryRun ResponseStreamingInvocationType = "DryRun" +) + +// Values returns all known values for ResponseStreamingInvocationType. 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 (ResponseStreamingInvocationType) Values() []ResponseStreamingInvocationType { + return []ResponseStreamingInvocationType{ + "RequestResponse", + "DryRun", + } +} + type Runtime string // Enum values for Runtime diff --git a/service/lambda/types/types.go b/service/lambda/types/types.go index 0b66c663dd1..bceda1b0567 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -320,12 +320,12 @@ type EventSourceMappingConfiguration struct { // MaximumBatchingWindowInSeconds to at least 1. BatchSize *int32 - // (Streams only) If the function returns an error, split the batch in two and - // retry. The default value is false. + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. BisectBatchOnFunctionError *bool - // (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded - // records. + // (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic + // destination for discarded records. DestinationConfig *DestinationConfig // Specific configuration settings for a DocumentDB event source. @@ -342,8 +342,8 @@ type EventSourceMappingConfiguration struct { // The ARN of the Lambda function. FunctionArn *string - // (Streams and Amazon SQS) A list of current response type enums applied to the - // event source mapping. + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. FunctionResponseTypes []FunctionResponseType // The date that the event source mapping was last updated or that its state @@ -357,8 +357,8 @@ type EventSourceMappingConfiguration struct { // before invoking the function. You can configure MaximumBatchingWindowInSeconds // to any value from 0 seconds to 300 seconds in increments of seconds. For streams // and Amazon SQS event sources, the default batching window is 0 seconds. For - // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default - // batching window is 500 ms. Note that because you can only change + // Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, + // the default batching window is 500 ms. Note that because you can only change // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back // to the 500 ms default batching window after you have changed it. To restore the // default batching window, you must create a new event source mapping. Related @@ -367,19 +367,19 @@ type EventSourceMappingConfiguration struct { // 1. MaximumBatchingWindowInSeconds *int32 - // (Streams only) Discard records older than the specified age. The default value - // is -1, which sets the maximum age to infinite. When the value is set to - // infinite, Lambda never discards old records. + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. MaximumRecordAgeInSeconds *int32 - // (Streams only) Discard records after the specified number of retries. The - // default value is -1, which sets the maximum number of retries to infinite. When - // MaximumRetryAttempts is infinite, Lambda retries failed records until the record - // expires in the event source. + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. MaximumRetryAttempts *int32 - // (Streams only) The number of batches to process concurrently from each shard. - // The default value is 1. + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. ParallelizationFactor *int32 // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. @@ -402,7 +402,7 @@ type EventSourceMappingConfiguration struct { // The position in a stream from which to start reading. Required for Amazon // Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is - // supported only for Amazon Kinesis streams. + // supported only for Amazon Kinesis streams and Amazon DocumentDB. StartingPosition EventSourcePosition // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. @@ -419,8 +419,9 @@ type EventSourceMappingConfiguration struct { // The name of the Kafka topic. Topics []string - // (Streams only) The duration in seconds of a processing window. The range is - // 1–900 seconds. + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. TumblingWindowInSeconds *int32 // The identifier of the event source mapping. @@ -654,10 +655,10 @@ type FunctionEventInvokeConfig struct { // * Function - The Amazon Resource Name (ARN) of a Lambda // function. // - // * Queue - The ARN of an SQS queue. + // * Queue - The ARN of a standard SQS queue. // - // * Topic - The ARN of an SNS - // topic. + // * Topic - The ARN of a + // standard SNS topic. // // * Event Bus - The ARN of an Amazon EventBridge event bus. DestinationConfig *DestinationConfig @@ -716,6 +717,20 @@ type FunctionUrlConfig struct { // function URL. Cors *Cors + // Use one of the following options: + // + // * BUFFERED – This is the default option. + // Lambda invokes your function using the Invoke API operation. Invocation results + // are available when the payload is complete. The maximum payload size is 6 MB. + // + // * + // RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can request + // a quota increase + // (https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html). + InvokeMode InvokeMode + noSmithyDocumentSerde } @@ -761,6 +776,62 @@ type ImageConfigResponse struct { noSmithyDocumentSerde } +// A chunk of the streamed response payload. +type InvokeResponseStreamUpdate struct { + + // Data returned by your Lambda function. + Payload []byte + + noSmithyDocumentSerde +} + +// A response confirming that the event stream is complete. +type InvokeWithResponseStreamCompleteEvent struct { + + // An error code. + ErrorCode *string + + // The details of any returned error. + ErrorDetails *string + + // The last 4 KB of the execution log, which is base64-encoded. + LogResult *string + + noSmithyDocumentSerde +} + +// An object that includes a chunk of the response payload. When the stream has +// ended, Lambda includes a InvokeComplete object. +// +// The following types satisfy this interface: +// +// InvokeWithResponseStreamResponseEventMemberInvokeComplete +// InvokeWithResponseStreamResponseEventMemberPayloadChunk +type InvokeWithResponseStreamResponseEvent interface { + isInvokeWithResponseStreamResponseEvent() +} + +// An object that's returned when the stream has ended and all the payload chunks +// have been returned. +type InvokeWithResponseStreamResponseEventMemberInvokeComplete struct { + Value InvokeWithResponseStreamCompleteEvent + + noSmithyDocumentSerde +} + +func (*InvokeWithResponseStreamResponseEventMemberInvokeComplete) isInvokeWithResponseStreamResponseEvent() { +} + +// A chunk of the streamed response payload. +type InvokeWithResponseStreamResponseEventMemberPayloadChunk struct { + Value InvokeResponseStreamUpdate + + noSmithyDocumentSerde +} + +func (*InvokeWithResponseStreamResponseEventMemberPayloadChunk) isInvokeWithResponseStreamResponseEvent() { +} + // An Lambda layer // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). type Layer struct { @@ -1115,3 +1186,14 @@ type VpcConfigResponse struct { } type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isInvokeWithResponseStreamResponseEvent() {} diff --git a/service/lambda/types/types_exported_test.go b/service/lambda/types/types_exported_test.go new file mode 100644 index 00000000000..77826362bc0 --- /dev/null +++ b/service/lambda/types/types_exported_test.go @@ -0,0 +1,30 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" +) + +func ExampleInvokeWithResponseStreamResponseEvent_outputUsage() { + var union types.InvokeWithResponseStreamResponseEvent + // type switches can be used to check the union value + switch v := union.(type) { + case *types.InvokeWithResponseStreamResponseEventMemberInvokeComplete: + _ = v.Value // Value is types.InvokeWithResponseStreamCompleteEvent + + case *types.InvokeWithResponseStreamResponseEventMemberPayloadChunk: + _ = v.Value // Value is types.InvokeResponseStreamUpdate + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.InvokeWithResponseStreamCompleteEvent +var _ *types.InvokeResponseStreamUpdate diff --git a/service/lambda/validators.go b/service/lambda/validators.go index bb34f55fc40..5434a868d21 100644 --- a/service/lambda/validators.go +++ b/service/lambda/validators.go @@ -690,6 +690,26 @@ func (m *validateOpInvoke) HandleInitialize(ctx context.Context, in middleware.I return next.HandleInitialize(ctx, in) } +type validateOpInvokeWithResponseStream struct { +} + +func (*validateOpInvokeWithResponseStream) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpInvokeWithResponseStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*InvokeWithResponseStreamInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpInvokeWithResponseStreamInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListAliases struct { } @@ -1346,6 +1366,10 @@ func addOpInvokeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpInvoke{}, middleware.After) } +func addOpInvokeWithResponseStreamValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpInvokeWithResponseStream{}, middleware.After) +} + func addOpListAliasesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAliases{}, middleware.After) } @@ -2087,6 +2111,21 @@ func validateOpInvokeInput(v *InvokeInput) error { } } +func validateOpInvokeWithResponseStreamInput(v *InvokeWithResponseStreamInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InvokeWithResponseStreamInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListAliasesInput(v *ListAliasesInput) error { if v == nil { return nil diff --git a/service/quicksight/api_op_CreateRefreshSchedule.go b/service/quicksight/api_op_CreateRefreshSchedule.go new file mode 100644 index 00000000000..c3434efc696 --- /dev/null +++ b/service/quicksight/api_op_CreateRefreshSchedule.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a refresh schedule for a dataset. You can create up to 5 different +// schedules for a single dataset. +func (c *Client) CreateRefreshSchedule(ctx context.Context, params *CreateRefreshScheduleInput, optFns ...func(*Options)) (*CreateRefreshScheduleOutput, error) { + if params == nil { + params = &CreateRefreshScheduleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRefreshSchedule", params, optFns, c.addOperationCreateRefreshScheduleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRefreshScheduleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRefreshScheduleInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + // The refresh schedule. + // + // This member is required. + Schedule *types.RefreshSchedule + + noSmithyDocumentSerde +} + +type CreateRefreshScheduleOutput struct { + + // The Amazon Resource Name (ARN) for the refresh schedule. + Arn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The ID of the refresh schedule. + ScheduleId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRefreshScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateRefreshScheduleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRefreshSchedule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateRefreshSchedule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "CreateRefreshSchedule", + } +} diff --git a/service/quicksight/api_op_DeleteDataSetRefreshProperties.go b/service/quicksight/api_op_DeleteDataSetRefreshProperties.go new file mode 100644 index 00000000000..0ece76b0d08 --- /dev/null +++ b/service/quicksight/api_op_DeleteDataSetRefreshProperties.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the dataset refresh properties of the dataset. +func (c *Client) DeleteDataSetRefreshProperties(ctx context.Context, params *DeleteDataSetRefreshPropertiesInput, optFns ...func(*Options)) (*DeleteDataSetRefreshPropertiesOutput, error) { + if params == nil { + params = &DeleteDataSetRefreshPropertiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDataSetRefreshProperties", params, optFns, c.addOperationDeleteDataSetRefreshPropertiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDataSetRefreshPropertiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDataSetRefreshPropertiesInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + noSmithyDocumentSerde +} + +type DeleteDataSetRefreshPropertiesOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDataSetRefreshPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteDataSetRefreshProperties{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteDataSetRefreshProperties{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteDataSetRefreshPropertiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDataSetRefreshProperties(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDataSetRefreshProperties(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "DeleteDataSetRefreshProperties", + } +} diff --git a/service/quicksight/api_op_DeleteRefreshSchedule.go b/service/quicksight/api_op_DeleteRefreshSchedule.go new file mode 100644 index 00000000000..51de00a428e --- /dev/null +++ b/service/quicksight/api_op_DeleteRefreshSchedule.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a refresh schedule from a dataset. +func (c *Client) DeleteRefreshSchedule(ctx context.Context, params *DeleteRefreshScheduleInput, optFns ...func(*Options)) (*DeleteRefreshScheduleOutput, error) { + if params == nil { + params = &DeleteRefreshScheduleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRefreshSchedule", params, optFns, c.addOperationDeleteRefreshScheduleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRefreshScheduleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRefreshScheduleInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + // The ID of the refresh schedule. + // + // This member is required. + ScheduleId *string + + noSmithyDocumentSerde +} + +type DeleteRefreshScheduleOutput struct { + + // The Amazon Resource Name (ARN) for the refresh schedule. + Arn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The ID of the refresh schedule. + ScheduleId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRefreshScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteRefreshScheduleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRefreshSchedule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRefreshSchedule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "DeleteRefreshSchedule", + } +} diff --git a/service/quicksight/api_op_DescribeDataSetRefreshProperties.go b/service/quicksight/api_op_DescribeDataSetRefreshProperties.go new file mode 100644 index 00000000000..b8db2ead2c1 --- /dev/null +++ b/service/quicksight/api_op_DescribeDataSetRefreshProperties.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the refresh properties of a dataset. +func (c *Client) DescribeDataSetRefreshProperties(ctx context.Context, params *DescribeDataSetRefreshPropertiesInput, optFns ...func(*Options)) (*DescribeDataSetRefreshPropertiesOutput, error) { + if params == nil { + params = &DescribeDataSetRefreshPropertiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDataSetRefreshProperties", params, optFns, c.addOperationDescribeDataSetRefreshPropertiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDataSetRefreshPropertiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDataSetRefreshPropertiesInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + noSmithyDocumentSerde +} + +type DescribeDataSetRefreshPropertiesOutput struct { + + // The dataset refresh properties. + DataSetRefreshProperties *types.DataSetRefreshProperties + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDataSetRefreshPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDataSetRefreshProperties{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDataSetRefreshProperties{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeDataSetRefreshPropertiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDataSetRefreshProperties(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeDataSetRefreshProperties(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "DescribeDataSetRefreshProperties", + } +} diff --git a/service/quicksight/api_op_DescribeRefreshSchedule.go b/service/quicksight/api_op_DescribeRefreshSchedule.go new file mode 100644 index 00000000000..aac185d3f93 --- /dev/null +++ b/service/quicksight/api_op_DescribeRefreshSchedule.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides a summary of a refresh schedule. +func (c *Client) DescribeRefreshSchedule(ctx context.Context, params *DescribeRefreshScheduleInput, optFns ...func(*Options)) (*DescribeRefreshScheduleOutput, error) { + if params == nil { + params = &DescribeRefreshScheduleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeRefreshSchedule", params, optFns, c.addOperationDescribeRefreshScheduleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeRefreshScheduleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeRefreshScheduleInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + // The ID of the refresh schedule. + // + // This member is required. + ScheduleId *string + + noSmithyDocumentSerde +} + +type DescribeRefreshScheduleOutput struct { + + // The Amazon Resource Name (ARN) for the refresh schedule. + Arn *string + + // The refresh schedule. + RefreshSchedule *types.RefreshSchedule + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeRefreshScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeRefreshScheduleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRefreshSchedule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeRefreshSchedule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "DescribeRefreshSchedule", + } +} diff --git a/service/quicksight/api_op_ListRefreshSchedules.go b/service/quicksight/api_op_ListRefreshSchedules.go new file mode 100644 index 00000000000..622962aa96e --- /dev/null +++ b/service/quicksight/api_op_ListRefreshSchedules.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the refresh schedules of a dataset. Each dataset can have up to 5 +// schedules. +func (c *Client) ListRefreshSchedules(ctx context.Context, params *ListRefreshSchedulesInput, optFns ...func(*Options)) (*ListRefreshSchedulesOutput, error) { + if params == nil { + params = &ListRefreshSchedulesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRefreshSchedules", params, optFns, c.addOperationListRefreshSchedulesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRefreshSchedulesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRefreshSchedulesInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + noSmithyDocumentSerde +} + +type ListRefreshSchedulesOutput struct { + + // The list of refresh schedules for the dataset. + RefreshSchedules []types.RefreshSchedule + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRefreshSchedulesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListRefreshSchedules{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRefreshSchedules{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListRefreshSchedulesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRefreshSchedules(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListRefreshSchedules(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "ListRefreshSchedules", + } +} diff --git a/service/quicksight/api_op_PutDataSetRefreshProperties.go b/service/quicksight/api_op_PutDataSetRefreshProperties.go new file mode 100644 index 00000000000..c8d40ccf97b --- /dev/null +++ b/service/quicksight/api_op_PutDataSetRefreshProperties.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates the dataset refresh properties for the dataset. +func (c *Client) PutDataSetRefreshProperties(ctx context.Context, params *PutDataSetRefreshPropertiesInput, optFns ...func(*Options)) (*PutDataSetRefreshPropertiesOutput, error) { + if params == nil { + params = &PutDataSetRefreshPropertiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutDataSetRefreshProperties", params, optFns, c.addOperationPutDataSetRefreshPropertiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutDataSetRefreshPropertiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutDataSetRefreshPropertiesInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + // The dataset refresh properties. + // + // This member is required. + DataSetRefreshProperties *types.DataSetRefreshProperties + + noSmithyDocumentSerde +} + +type PutDataSetRefreshPropertiesOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutDataSetRefreshPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutDataSetRefreshProperties{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutDataSetRefreshProperties{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutDataSetRefreshPropertiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutDataSetRefreshProperties(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutDataSetRefreshProperties(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "PutDataSetRefreshProperties", + } +} diff --git a/service/quicksight/api_op_UpdateRefreshSchedule.go b/service/quicksight/api_op_UpdateRefreshSchedule.go new file mode 100644 index 00000000000..a44d16dfd0a --- /dev/null +++ b/service/quicksight/api_op_UpdateRefreshSchedule.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a refresh schedule for a dataset. +func (c *Client) UpdateRefreshSchedule(ctx context.Context, params *UpdateRefreshScheduleInput, optFns ...func(*Options)) (*UpdateRefreshScheduleOutput, error) { + if params == nil { + params = &UpdateRefreshScheduleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRefreshSchedule", params, optFns, c.addOperationUpdateRefreshScheduleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRefreshScheduleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRefreshScheduleInput struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AwsAccountId *string + + // The ID of the dataset. + // + // This member is required. + DataSetId *string + + // The refresh schedule. + // + // This member is required. + Schedule *types.RefreshSchedule + + noSmithyDocumentSerde +} + +type UpdateRefreshScheduleOutput struct { + + // The Amazon Resource Name (ARN) for the refresh schedule. + Arn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The ID of the refresh schedule. + ScheduleId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRefreshScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateRefreshSchedule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateRefreshScheduleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRefreshSchedule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateRefreshSchedule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "UpdateRefreshSchedule", + } +} diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index cfdec76892a..592c4fb1ce4 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -2954,14 +2954,14 @@ func awsRestjson1_deserializeOpDocumentCreateNamespaceOutput(v **CreateNamespace return nil } -type awsRestjson1_deserializeOpCreateTemplate struct { +type awsRestjson1_deserializeOpCreateRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpCreateTemplate) ID() string { +func (*awsRestjson1_deserializeOpCreateRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2975,12 +2975,12 @@ func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response, &metadata) } - output := &CreateTemplateOutput{} + output := &CreateRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3003,7 +3003,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3016,7 +3016,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3060,9 +3060,6 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -3072,6 +3069,9 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) @@ -3081,9 +3081,6 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3094,7 +3091,7 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(v *CreateTemplateOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateRefreshScheduleOutput(v *CreateRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3103,7 +3100,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(v *CreateTemplat return nil } -func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(v **CreateRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3116,9 +3113,9 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateTemplateOutput + var sv *CreateRefreshScheduleOutput if *v == nil { - sv = &CreateTemplateOutput{} + sv = &CreateRefreshScheduleOutput{} } else { sv = *v } @@ -3134,15 +3131,6 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu sv.Arn = ptr.String(jtv) } - case "CreationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.CreationStatus = types.ResourceStatus(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3152,22 +3140,13 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu sv.RequestId = ptr.String(jtv) } - case "TemplateId": + case "ScheduleId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) - } - - case "VersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.VersionArn = ptr.String(jtv) + sv.ScheduleId = ptr.String(jtv) } default: @@ -3179,14 +3158,14 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu return nil } -type awsRestjson1_deserializeOpCreateTemplateAlias struct { +type awsRestjson1_deserializeOpCreateTemplate struct { } -func (*awsRestjson1_deserializeOpCreateTemplateAlias) ID() string { +func (*awsRestjson1_deserializeOpCreateTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3200,12 +3179,12 @@ func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplateAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplate(response, &metadata) } - output := &CreateTemplateAliasOutput{} + output := &CreateTemplateOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3228,7 +3207,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3241,7 +3220,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3282,12 +3261,18 @@ func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) @@ -3313,7 +3298,7 @@ func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(v *CreateTemplateAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(v *CreateTemplateOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3322,7 +3307,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(v *CreateTe return nil } -func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTemplateAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3335,15 +3320,33 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTempl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateTemplateAliasOutput + var sv *CreateTemplateOutput if *v == nil { - sv = &CreateTemplateAliasOutput{} + sv = &CreateTemplateOutput{} } 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 Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.CreationStatus = types.ResourceStatus(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3353,9 +3356,22 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTempl sv.RequestId = ptr.String(jtv) } - case "TemplateAlias": - if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { - return err + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + case "VersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.VersionArn = ptr.String(jtv) } default: @@ -3367,14 +3383,14 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTempl return nil } -type awsRestjson1_deserializeOpCreateTheme struct { +type awsRestjson1_deserializeOpCreateTemplateAlias struct { } -func (*awsRestjson1_deserializeOpCreateTheme) ID() string { +func (*awsRestjson1_deserializeOpCreateTemplateAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3388,12 +3404,12 @@ func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTheme(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplateAlias(response, &metadata) } - output := &CreateThemeOutput{} + output := &CreateTemplateAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3416,7 +3432,7 @@ func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateThemeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3429,7 +3445,7 @@ func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3470,15 +3486,12 @@ func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, m } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) @@ -3504,7 +3517,7 @@ func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(v *CreateThemeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(v *CreateTemplateAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3513,7 +3526,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(v *CreateThemeOutpu return nil } -func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTemplateAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3526,33 +3539,15 @@ func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateThemeOutput + var sv *CreateTemplateAliasOutput if *v == nil { - sv = &CreateThemeOutput{} + sv = &CreateTemplateAliasOutput{} } 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 Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "CreationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.CreationStatus = types.ResourceStatus(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3562,22 +3557,9 @@ func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, sv.RequestId = ptr.String(jtv) } - case "ThemeId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.ThemeId = ptr.String(jtv) - } - - case "VersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.VersionArn = ptr.String(jtv) + case "TemplateAlias": + if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { + return err } default: @@ -3589,14 +3571,14 @@ func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, return nil } -type awsRestjson1_deserializeOpCreateThemeAlias struct { +type awsRestjson1_deserializeOpCreateTheme struct { } -func (*awsRestjson1_deserializeOpCreateThemeAlias) ID() string { +func (*awsRestjson1_deserializeOpCreateTheme) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3610,12 +3592,12 @@ func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateThemeAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTheme(response, &metadata) } - output := &CreateThemeAliasOutput{} + output := &CreateThemeOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3638,7 +3620,7 @@ func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateThemeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3651,7 +3633,7 @@ func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3692,8 +3674,8 @@ func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Respon } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -3726,7 +3708,7 @@ func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(v *CreateThemeAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(v *CreateThemeOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3735,7 +3717,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(v *CreateTheme return nil } -func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3748,15 +3730,33 @@ func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAli return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateThemeAliasOutput + var sv *CreateThemeOutput if *v == nil { - sv = &CreateThemeAliasOutput{} + sv = &CreateThemeOutput{} } 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 Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.CreationStatus = types.ResourceStatus(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3766,9 +3766,22 @@ func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAli sv.RequestId = ptr.String(jtv) } - case "ThemeAlias": - if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { - return err + case "ThemeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.ThemeId = ptr.String(jtv) + } + + case "VersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.VersionArn = ptr.String(jtv) } default: @@ -3780,14 +3793,14 @@ func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAli return nil } -type awsRestjson1_deserializeOpDeleteAccountCustomization struct { +type awsRestjson1_deserializeOpCreateThemeAlias struct { } -func (*awsRestjson1_deserializeOpDeleteAccountCustomization) ID() string { +func (*awsRestjson1_deserializeOpCreateThemeAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3801,12 +3814,12 @@ func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateThemeAlias(response, &metadata) } - output := &DeleteAccountCustomizationOutput{} + output := &CreateThemeAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteAccountCustomizationOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3829,7 +3842,7 @@ func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3842,7 +3855,198 @@ func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(v *CreateThemeAliasOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAliasOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateThemeAliasOutput + if *v == nil { + sv = &CreateThemeAliasOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "ThemeAlias": + if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteAccountCustomization struct { +} + +func (*awsRestjson1_deserializeOpDeleteAccountCustomization) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize(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_deserializeOpErrorDeleteAccountCustomization(response, &metadata) + } + output := &DeleteAccountCustomizationOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDeleteAccountCustomizationOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentDeleteAccountCustomizationOutput(&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_deserializeOpErrorDeleteAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4753,14 +4957,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(v **DeleteDataSetOutp return nil } -type awsRestjson1_deserializeOpDeleteDataSource struct { +type awsRestjson1_deserializeOpDeleteDataSetRefreshProperties struct { } -func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { +func (*awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4774,12 +4978,12 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response, &metadata) } - output := &DeleteDataSourceOutput{} + output := &DeleteDataSetRefreshPropertiesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSetRefreshPropertiesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -4802,7 +5006,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4815,7 +5019,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4859,12 +5063,18 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(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("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -4881,7 +5091,7 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(v *DeleteDataSourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteDataSetRefreshPropertiesOutput(v *DeleteDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -4890,7 +5100,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(v *DeleteDataS return nil } -func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(v **DeleteDataSetRefreshPropertiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4903,33 +5113,15 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteDataSourceOutput + var sv *DeleteDataSetRefreshPropertiesOutput if *v == nil { - sv = &DeleteDataSourceOutput{} + sv = &DeleteDataSetRefreshPropertiesOutput{} } 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 Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "DataSourceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSourceId = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -4948,14 +5140,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSour return nil } -type awsRestjson1_deserializeOpDeleteFolder struct { +type awsRestjson1_deserializeOpDeleteDataSource struct { } -func (*awsRestjson1_deserializeOpDeleteFolder) ID() string { +func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4969,12 +5161,12 @@ func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) } - output := &DeleteFolderOutput{} + output := &DeleteDataSourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -4997,7 +5189,7 @@ func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5010,7 +5202,7 @@ func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5054,27 +5246,18 @@ func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5085,7 +5268,7 @@ func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(v *DeleteFolderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(v *DeleteDataSourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -5094,7 +5277,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(v *DeleteFolderOut return nil } -func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5107,9 +5290,9 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteFolderOutput + var sv *DeleteDataSourceOutput if *v == nil { - sv = &DeleteFolderOutput{} + sv = &DeleteDataSourceOutput{} } else { sv = *v } @@ -5125,13 +5308,13 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput sv.Arn = ptr.String(jtv) } - case "FolderId": + case "DataSourceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.FolderId = ptr.String(jtv) + sv.DataSourceId = ptr.String(jtv) } case "RequestId": @@ -5152,14 +5335,14 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput return nil } -type awsRestjson1_deserializeOpDeleteFolderMembership struct { +type awsRestjson1_deserializeOpDeleteFolder struct { } -func (*awsRestjson1_deserializeOpDeleteFolderMembership) ID() string { +func (*awsRestjson1_deserializeOpDeleteFolder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5173,11 +5356,16 @@ func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFolderMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFolder(response, &metadata) } - output := &DeleteFolderMembershipOutput{} + output := &DeleteFolderOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5196,7 +5384,7 @@ func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteFolderMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteFolderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5209,7 +5397,206 @@ func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFolderMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(v *DeleteFolderOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteFolderOutput + if *v == nil { + sv = &DeleteFolderOutput{} + } 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 Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "FolderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + } + sv.FolderId = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteFolderMembership struct { +} + +func (*awsRestjson1_deserializeOpDeleteFolderMembership) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(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_deserializeOpErrorDeleteFolderMembership(response, &metadata) + } + output := &DeleteFolderMembershipOutput{} + 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_deserializeOpDocumentDeleteFolderMembershipOutput(&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_deserializeOpErrorDeleteFolderMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6072,14 +6459,14 @@ func awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(v **DeleteNamespace return nil } -type awsRestjson1_deserializeOpDeleteTemplate struct { +type awsRestjson1_deserializeOpDeleteRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpDeleteTemplate) ID() string { +func (*awsRestjson1_deserializeOpDeleteRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6093,12 +6480,12 @@ func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response, &metadata) } - output := &DeleteTemplateOutput{} + output := &DeleteRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -6121,7 +6508,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6134,7 +6521,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6175,8 +6562,8 @@ func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -6193,9 +6580,6 @@ func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6206,7 +6590,7 @@ func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(v *DeleteTemplateOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteRefreshScheduleOutput(v *DeleteRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -6215,7 +6599,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(v *DeleteTemplat return nil } -func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(v **DeleteRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6228,9 +6612,9 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteTemplateOutput + var sv *DeleteRefreshScheduleOutput if *v == nil { - sv = &DeleteTemplateOutput{} + sv = &DeleteRefreshScheduleOutput{} } else { sv = *v } @@ -6255,13 +6639,13 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOu sv.RequestId = ptr.String(jtv) } - case "TemplateId": + case "ScheduleId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.TemplateId = ptr.String(jtv) + sv.ScheduleId = ptr.String(jtv) } default: @@ -6273,14 +6657,14 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOu return nil } -type awsRestjson1_deserializeOpDeleteTemplateAlias struct { +type awsRestjson1_deserializeOpDeleteTemplate struct { } -func (*awsRestjson1_deserializeOpDeleteTemplateAlias) ID() string { +func (*awsRestjson1_deserializeOpDeleteTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6294,12 +6678,12 @@ func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTemplate(response, &metadata) } - output := &DeleteTemplateAliasOutput{} + output := &DeleteTemplateOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -6322,7 +6706,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6335,7 +6719,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6382,6 +6766,12 @@ func awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Res case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -6401,7 +6791,7 @@ func awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(v *DeleteTemplateAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(v *DeleteTemplateOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -6410,7 +6800,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(v *DeleteTe return nil } -func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTemplateAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6423,24 +6813,219 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTempl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteTemplateAliasOutput + var sv *DeleteTemplateOutput if *v == nil { - sv = &DeleteTemplateAliasOutput{} + sv = &DeleteTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AliasName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AliasName to be of type string, got %T instead", value) - } - sv.AliasName = ptr.String(jtv) - } - + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteTemplateAlias struct { +} + +func (*awsRestjson1_deserializeOpDeleteTemplateAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(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_deserializeOpErrorDeleteTemplateAlias(response, &metadata) + } + output := &DeleteTemplateAliasOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentDeleteTemplateAliasOutput(&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_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(v *DeleteTemplateAliasOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTemplateAliasOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteTemplateAliasOutput + if *v == nil { + sv = &DeleteTemplateAliasOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AliasName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AliasName to be of type string, got %T instead", value) + } + sv.AliasName = ptr.String(jtv) + } + case "Arn": if value != nil { jtv, ok := value.(string) @@ -9459,14 +10044,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeDataSource struct { +type awsRestjson1_deserializeOpDescribeDataSetRefreshProperties struct { } -func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9480,12 +10065,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response, &metadata) } - output := &DescribeDataSourceOutput{} + output := &DescribeDataSetRefreshPropertiesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -9508,7 +10093,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9521,7 +10106,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9571,6 +10156,12 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -9587,7 +10178,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(v *DescribeDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -9596,7 +10187,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeD return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v **DescribeDataSetRefreshPropertiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9609,17 +10200,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourceOutput + var sv *DescribeDataSetRefreshPropertiesOutput if *v == nil { - sv = &DescribeDataSourceOutput{} + sv = &DescribeDataSetRefreshPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSource": - if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + case "DataSetRefreshProperties": + if err := awsRestjson1_deserializeDocumentDataSetRefreshProperties(&sv.DataSetRefreshProperties, value); err != nil { return err } @@ -9641,14 +10232,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return nil } -type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { +type awsRestjson1_deserializeOpDescribeDataSource struct { } -func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9662,12 +10253,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) } - output := &DescribeDataSourcePermissionsOutput{} + output := &DescribeDataSourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -9690,7 +10281,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9703,7 +10294,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9769,7 +10360,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smit } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -9778,7 +10369,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9791,35 +10382,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourcePermissionsOutput + var sv *DescribeDataSourceOutput if *v == nil { - sv = &DescribeDataSourcePermissionsOutput{} + sv = &DescribeDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DataSourceArn = ptr.String(jtv) - } - - case "DataSourceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSourceId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "DataSource": + if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { return err } @@ -9841,14 +10414,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return nil } -type awsRestjson1_deserializeOpDescribeFolder struct { +type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { } -func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9862,12 +10435,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) } - output := &DescribeFolderOutput{} + output := &DescribeDataSourcePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -9890,7 +10463,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9903,7 +10476,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9959,9 +10532,6 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9972,7 +10542,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -9981,7 +10551,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolde return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9994,17 +10564,35 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderOutput + var sv *DescribeDataSourcePermissionsOutput if *v == nil { - sv = &DescribeFolderOutput{} + sv = &DescribeDataSourcePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Folder": - if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { + case "DataSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSourceArn = ptr.String(jtv) + } + + case "DataSourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSourceId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -10026,14 +10614,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return nil } -type awsRestjson1_deserializeOpDescribeFolderPermissions struct { +type awsRestjson1_deserializeOpDescribeFolder struct { } -func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10047,12 +10635,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) } - output := &DescribeFolderPermissionsOutput{} + output := &DescribeFolderOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10075,7 +10663,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10088,7 +10676,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10157,7 +10745,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *DescribeFolderPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10166,7 +10754,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *De return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **DescribeFolderPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10179,35 +10767,17 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **Descr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderPermissionsOutput + var sv *DescribeFolderOutput if *v == nil { - sv = &DescribeFolderPermissionsOutput{} + sv = &DescribeFolderOutput{} } 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 Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "FolderId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) - } - sv.FolderId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "Folder": + if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { return err } @@ -10229,14 +10799,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **Descr return nil } -type awsRestjson1_deserializeOpDescribeFolderResolvedPermissions struct { +type awsRestjson1_deserializeOpDescribeFolderPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10250,12 +10820,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response, &metadata) } - output := &DescribeFolderResolvedPermissionsOutput{} + output := &DescribeFolderPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10278,7 +10848,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10291,7 +10861,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10360,7 +10930,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response * } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(v *DescribeFolderResolvedPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *DescribeFolderPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10369,7 +10939,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutp return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v **DescribeFolderResolvedPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **DescribeFolderPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10382,9 +10952,9 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderResolvedPermissionsOutput + var sv *DescribeFolderPermissionsOutput if *v == nil { - sv = &DescribeFolderResolvedPermissionsOutput{} + sv = &DescribeFolderPermissionsOutput{} } else { sv = *v } @@ -10432,14 +11002,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v return nil } -type awsRestjson1_deserializeOpDescribeGroup struct { +type awsRestjson1_deserializeOpDescribeFolderResolvedPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeGroup) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10453,12 +11023,12 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response, &metadata) } - output := &DescribeGroupOutput{} + output := &DescribeFolderResolvedPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10481,7 +11051,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10494,7 +11064,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10544,18 +11114,15 @@ func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10566,7 +11133,7 @@ func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(v *DescribeFolderResolvedPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10575,7 +11142,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupO return nil } -func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v **DescribeFolderResolvedPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10588,17 +11155,35 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeGroupOutput + var sv *DescribeFolderResolvedPermissionsOutput if *v == nil { - sv = &DescribeGroupOutput{} + sv = &DescribeFolderResolvedPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Group": - if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "FolderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + } + sv.FolderId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -10620,14 +11205,14 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp return nil } -type awsRestjson1_deserializeOpDescribeGroupMembership struct { +type awsRestjson1_deserializeOpDescribeGroup struct { } -func (*awsRestjson1_deserializeOpDescribeGroupMembership) ID() string { +func (*awsRestjson1_deserializeOpDescribeGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10641,12 +11226,12 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroupMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroup(response, &metadata) } - output := &DescribeGroupMembershipOutput{} + output := &DescribeGroupOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10669,7 +11254,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10682,7 +11267,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10754,7 +11339,7 @@ func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *DescribeGroupMembershipOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10763,7 +11348,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *Desc return nil } -func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **DescribeGroupMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10776,17 +11361,17 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeGroupMembershipOutput + var sv *DescribeGroupOutput if *v == nil { - sv = &DescribeGroupMembershipOutput{} + sv = &DescribeGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupMember": - if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { + case "Group": + if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { return err } @@ -10808,14 +11393,14 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ return nil } -type awsRestjson1_deserializeOpDescribeIAMPolicyAssignment struct { +type awsRestjson1_deserializeOpDescribeGroupMembership struct { } -func (*awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) ID() string { +func (*awsRestjson1_deserializeOpDescribeGroupMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10829,12 +11414,12 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroupMembership(response, &metadata) } - output := &DescribeIAMPolicyAssignmentOutput{} + output := &DescribeGroupMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10857,7 +11442,7 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10870,7 +11455,7 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10917,15 +11502,18 @@ func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithy case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -10939,7 +11527,7 @@ func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v *DescribeIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *DescribeGroupMembershipOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10948,7 +11536,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **DescribeIAMPolicyAssignmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **DescribeGroupMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10961,17 +11549,17 @@ func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIAMPolicyAssignmentOutput + var sv *DescribeGroupMembershipOutput if *v == nil { - sv = &DescribeIAMPolicyAssignmentOutput{} + sv = &DescribeGroupMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IAMPolicyAssignment": - if err := awsRestjson1_deserializeDocumentIAMPolicyAssignment(&sv.IAMPolicyAssignment, value); err != nil { + case "GroupMember": + if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { return err } @@ -10993,14 +11581,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeIngestion struct { +type awsRestjson1_deserializeOpDescribeIAMPolicyAssignment struct { } -func (*awsRestjson1_deserializeOpDescribeIngestion) ID() string { +func (*awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11014,12 +11602,12 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIngestion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response, &metadata) } - output := &DescribeIngestionOutput{} + output := &DescribeIAMPolicyAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11042,7 +11630,7 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11055,7 +11643,7 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11102,12 +11690,12 @@ func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Respo case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11124,7 +11712,7 @@ func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIngestionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v *DescribeIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11133,7 +11721,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIn return nil } -func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeIngestionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **DescribeIAMPolicyAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11146,17 +11734,17 @@ func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeInges return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIngestionOutput + var sv *DescribeIAMPolicyAssignmentOutput if *v == nil { - sv = &DescribeIngestionOutput{} + sv = &DescribeIAMPolicyAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Ingestion": - if err := awsRestjson1_deserializeDocumentIngestion(&sv.Ingestion, value); err != nil { + case "IAMPolicyAssignment": + if err := awsRestjson1_deserializeDocumentIAMPolicyAssignment(&sv.IAMPolicyAssignment, value); err != nil { return err } @@ -11178,14 +11766,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeInges return nil } -type awsRestjson1_deserializeOpDescribeIpRestriction struct { +type awsRestjson1_deserializeOpDescribeIngestion struct { } -func (*awsRestjson1_deserializeOpDescribeIpRestriction) ID() string { +func (*awsRestjson1_deserializeOpDescribeIngestion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11199,12 +11787,12 @@ func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIpRestriction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIngestion(response, &metadata) } - output := &DescribeIpRestrictionOutput{} + output := &DescribeIngestionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11227,7 +11815,7 @@ func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11240,7 +11828,7 @@ func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11290,6 +11878,9 @@ func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.R case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11306,7 +11897,7 @@ func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(v *DescribeIpRestrictionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIngestionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11315,7 +11906,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(v *Descri return nil } -func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeIpRestrictionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeIngestionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11328,35 +11919,17 @@ func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIpRestrictionOutput + var sv *DescribeIngestionOutput if *v == nil { - sv = &DescribeIpRestrictionOutput{} + sv = &DescribeIngestionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "Enabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.Enabled = ptr.Bool(jtv) - } - - case "IpRestrictionRuleMap": - if err := awsRestjson1_deserializeDocumentIpRestrictionRuleMap(&sv.IpRestrictionRuleMap, value); err != nil { + case "Ingestion": + if err := awsRestjson1_deserializeDocumentIngestion(&sv.Ingestion, value); err != nil { return err } @@ -11378,14 +11951,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeI return nil } -type awsRestjson1_deserializeOpDescribeNamespace struct { +type awsRestjson1_deserializeOpDescribeIpRestriction struct { } -func (*awsRestjson1_deserializeOpDescribeNamespace) ID() string { +func (*awsRestjson1_deserializeOpDescribeIpRestriction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11399,12 +11972,12 @@ func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeNamespace(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIpRestriction(response, &metadata) } - output := &DescribeNamespaceOutput{} + output := &DescribeIpRestrictionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11427,7 +12000,7 @@ func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11440,7 +12013,7 @@ func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11493,9 +12066,6 @@ func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Respo case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -11509,7 +12079,7 @@ func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(v *DescribeNamespaceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(v *DescribeIpRestrictionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11518,7 +12088,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(v *DescribeNa return nil } -func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNamespaceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeIpRestrictionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11531,17 +12101,35 @@ func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNames return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeNamespaceOutput + var sv *DescribeIpRestrictionOutput if *v == nil { - sv = &DescribeNamespaceOutput{} + sv = &DescribeIpRestrictionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Namespace": - if err := awsRestjson1_deserializeDocumentNamespaceInfoV2(&sv.Namespace, value); err != nil { + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "IpRestrictionRuleMap": + if err := awsRestjson1_deserializeDocumentIpRestrictionRuleMap(&sv.IpRestrictionRuleMap, value); err != nil { return err } @@ -11563,14 +12151,14 @@ func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNames return nil } -type awsRestjson1_deserializeOpDescribeTemplate struct { +type awsRestjson1_deserializeOpDescribeNamespace struct { } -func (*awsRestjson1_deserializeOpDescribeTemplate) ID() string { +func (*awsRestjson1_deserializeOpDescribeNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11584,12 +12172,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeNamespace(response, &metadata) } - output := &DescribeTemplateOutput{} + output := &DescribeNamespaceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11612,7 +12200,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11625,7 +12213,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11669,27 +12257,21 @@ func awsRestjson1_deserializeOpErrorDescribeTemplate(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("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11700,7 +12282,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplate(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(v *DescribeTemplateOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(v *DescribeNamespaceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11709,7 +12291,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(v *DescribeTem return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11722,15 +12304,20 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTempla return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplateOutput + var sv *DescribeNamespaceOutput if *v == nil { - sv = &DescribeTemplateOutput{} + sv = &DescribeNamespaceOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Namespace": + if err := awsRestjson1_deserializeDocumentNamespaceInfoV2(&sv.Namespace, value); err != nil { + return err + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -11740,11 +12327,6 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTempla sv.RequestId = ptr.String(jtv) } - case "Template": - if err := awsRestjson1_deserializeDocumentTemplate(&sv.Template, value); err != nil { - return err - } - default: _, _ = key, value @@ -11754,14 +12336,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTempla return nil } -type awsRestjson1_deserializeOpDescribeTemplateAlias struct { +type awsRestjson1_deserializeOpDescribeRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpDescribeTemplateAlias) ID() string { +func (*awsRestjson1_deserializeOpDescribeRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11775,12 +12357,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response, &metadata) } - output := &DescribeTemplateAliasOutput{} + output := &DescribeRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11803,7 +12385,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11816,7 +12398,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11857,18 +12439,24 @@ func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11879,7 +12467,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(v *DescribeTemplateAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeRefreshScheduleOutput(v *DescribeRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11888,7 +12476,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(v *Descri return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeTemplateAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(v **DescribeRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11901,29 +12489,38 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeT return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplateAliasOutput + var sv *DescribeRefreshScheduleOutput if *v == nil { - sv = &DescribeTemplateAliasOutput{} + sv = &DescribeRefreshScheduleOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RequestId": + case "Arn": 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 Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "TemplateAlias": - if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { + case "RefreshSchedule": + if err := awsRestjson1_deserializeDocumentRefreshSchedule(&sv.RefreshSchedule, value); err != nil { return err } + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + default: _, _ = key, value @@ -11933,14 +12530,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeT return nil } -type awsRestjson1_deserializeOpDescribeTemplateDefinition struct { +type awsRestjson1_deserializeOpDescribeTemplate struct { } -func (*awsRestjson1_deserializeOpDescribeTemplateDefinition) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11954,12 +12551,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplate(response, &metadata) } - output := &DescribeTemplateDefinitionOutput{} + output := &DescribeTemplateOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11982,7 +12579,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11995,7 +12592,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12070,7 +12667,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(v *DescribeTemplateDefinitionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(v *DescribeTemplateOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12079,7 +12676,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **DescribeTemplateDefinitionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12092,34 +12689,15 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplateDefinitionOutput + var sv *DescribeTemplateOutput if *v == nil { - sv = &DescribeTemplateDefinitionOutput{} + sv = &DescribeTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Definition": - if err := awsRestjson1_deserializeDocumentTemplateVersionDefinition(&sv.Definition, value); err != nil { - return err - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentTemplateErrorList(&sv.Errors, value); err != nil { - return err - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -12129,31 +12707,9 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **Desc sv.RequestId = ptr.String(jtv) } - case "ResourceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.ResourceStatus = types.ResourceStatus(jtv) - } - - case "TemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) - } - - case "ThemeArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.ThemeArn = ptr.String(jtv) + case "Template": + if err := awsRestjson1_deserializeDocumentTemplate(&sv.Template, value); err != nil { + return err } default: @@ -12165,14 +12721,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeTemplatePermissions struct { +type awsRestjson1_deserializeOpDescribeTemplateAlias struct { } -func (*awsRestjson1_deserializeOpDescribeTemplatePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplateAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12186,12 +12742,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response, &metadata) } - output := &DescribeTemplatePermissionsOutput{} + output := &DescribeTemplateAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12214,7 +12770,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12227,7 +12783,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12268,15 +12824,9 @@ func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithy } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -12296,7 +12846,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(v *DescribeTemplatePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(v *DescribeTemplateAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12305,7 +12855,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **DescribeTemplatePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeTemplateAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12318,20 +12868,15 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplatePermissionsOutput + var sv *DescribeTemplateAliasOutput if *v == nil { - sv = &DescribeTemplatePermissionsOutput{} + sv = &DescribeTemplateAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -12341,22 +12886,9 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **Des sv.RequestId = ptr.String(jtv) } - case "TemplateArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.TemplateArn = ptr.String(jtv) - } - - case "TemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) + case "TemplateAlias": + if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { + return err } default: @@ -12368,14 +12900,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeTheme struct { +type awsRestjson1_deserializeOpDescribeTemplateDefinition struct { } -func (*awsRestjson1_deserializeOpDescribeTheme) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplateDefinition) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12389,12 +12921,12 @@ func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTheme(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response, &metadata) } - output := &DescribeThemeOutput{} + output := &DescribeTemplateDefinitionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12417,7 +12949,7 @@ func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeThemeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12430,7 +12962,7 @@ func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12474,6 +13006,9 @@ func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -12502,7 +13037,7 @@ func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(v *DescribeThemeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(v *DescribeTemplateDefinitionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12511,7 +13046,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(v *DescribeThemeO return nil } -func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **DescribeTemplateDefinitionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12524,15 +13059,34 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeThemeOutput + var sv *DescribeTemplateDefinitionOutput if *v == nil { - sv = &DescribeThemeOutput{} + sv = &DescribeTemplateDefinitionOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Definition": + if err := awsRestjson1_deserializeDocumentTemplateVersionDefinition(&sv.Definition, value); err != nil { + return err + } + + case "Errors": + if err := awsRestjson1_deserializeDocumentTemplateErrorList(&sv.Errors, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -12542,9 +13096,31 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutp sv.RequestId = ptr.String(jtv) } - case "Theme": - if err := awsRestjson1_deserializeDocumentTheme(&sv.Theme, value); err != nil { - return err + case "ResourceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.ResourceStatus = types.ResourceStatus(jtv) + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + case "ThemeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ThemeArn = ptr.String(jtv) } default: @@ -12556,14 +13132,14 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutp return nil } -type awsRestjson1_deserializeOpDescribeThemeAlias struct { +type awsRestjson1_deserializeOpDescribeTemplatePermissions struct { } -func (*awsRestjson1_deserializeOpDescribeThemeAlias) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplatePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12577,12 +13153,12 @@ func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemeAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response, &metadata) } - output := &DescribeThemeAliasOutput{} + output := &DescribeTemplatePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12605,7 +13181,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12618,7 +13194,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12687,7 +13263,7 @@ func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(v *DescribeThemeAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(v *DescribeTemplatePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12696,7 +13272,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(v *DescribeT return nil } -func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThemeAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **DescribeTemplatePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12709,15 +13285,20 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeThemeAliasOutput + var sv *DescribeTemplatePermissionsOutput if *v == nil { - sv = &DescribeThemeAliasOutput{} + sv = &DescribeTemplatePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -12727,9 +13308,22 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThem sv.RequestId = ptr.String(jtv) } - case "ThemeAlias": - if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { - return err + case "TemplateArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.TemplateArn = ptr.String(jtv) + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) } default: @@ -12741,14 +13335,14 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThem return nil } -type awsRestjson1_deserializeOpDescribeThemePermissions struct { +type awsRestjson1_deserializeOpDescribeTheme struct { } -func (*awsRestjson1_deserializeOpDescribeThemePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeTheme) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12762,12 +13356,12 @@ func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTheme(response, &metadata) } - output := &DescribeThemePermissionsOutput{} + output := &DescribeThemeOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12790,7 +13384,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeThemeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12803,7 +13397,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeThemePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12853,6 +13447,9 @@ func awsRestjson1_deserializeOpErrorDescribeThemePermissions(response *smithyhtt case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -12872,7 +13469,7 @@ func awsRestjson1_deserializeOpErrorDescribeThemePermissions(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(v *DescribeThemePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(v *DescribeThemeOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12881,7 +13478,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(v *Des return nil } -func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **DescribeThemePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12894,20 +13491,15 @@ func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **Descri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeThemePermissionsOutput + var sv *DescribeThemeOutput if *v == nil { - sv = &DescribeThemePermissionsOutput{} + sv = &DescribeThemeOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -12917,22 +13509,9 @@ func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **Descri sv.RequestId = ptr.String(jtv) } - case "ThemeArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.ThemeArn = ptr.String(jtv) - } - - case "ThemeId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.ThemeId = ptr.String(jtv) + case "Theme": + if err := awsRestjson1_deserializeDocumentTheme(&sv.Theme, value); err != nil { + return err } default: @@ -12944,14 +13523,14 @@ func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **Descri return nil } -type awsRestjson1_deserializeOpDescribeUser struct { +type awsRestjson1_deserializeOpDescribeThemeAlias struct { } -func (*awsRestjson1_deserializeOpDescribeUser) ID() string { +func (*awsRestjson1_deserializeOpDescribeThemeAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12965,12 +13544,12 @@ func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemeAlias(response, &metadata) } - output := &DescribeUserOutput{} + output := &DescribeThemeAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12993,7 +13572,7 @@ func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13006,7 +13585,7 @@ func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13047,8 +13626,8 @@ func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -13056,18 +13635,15 @@ func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13078,7 +13654,7 @@ func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(v *DescribeUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(v *DescribeThemeAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13087,7 +13663,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(v *DescribeUserOut return nil } -func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThemeAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13100,9 +13676,9 @@ func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeUserOutput + var sv *DescribeThemeAliasOutput if *v == nil { - sv = &DescribeUserOutput{} + sv = &DescribeThemeAliasOutput{} } else { sv = *v } @@ -13118,8 +13694,8 @@ func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput sv.RequestId = ptr.String(jtv) } - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + case "ThemeAlias": + if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { return err } @@ -13132,14 +13708,14 @@ func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput return nil } -type awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser struct { +type awsRestjson1_deserializeOpDescribeThemePermissions struct { } -func (*awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) ID() string { +func (*awsRestjson1_deserializeOpDescribeThemePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13153,12 +13729,12 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemePermissions(response, &metadata) } - output := &GenerateEmbedUrlForAnonymousUserOutput{} + output := &DescribeThemePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13181,7 +13757,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13194,7 +13770,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeThemePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13247,15 +13823,9 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *s case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): - return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedPricingPlanException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) @@ -13269,7 +13839,7 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *s } } -func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(v *GenerateEmbedUrlForAnonymousUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(v *DescribeThemePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13278,7 +13848,7 @@ func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutpu return nil } -func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v **GenerateEmbedUrlForAnonymousUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **DescribeThemePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13291,40 +13861,45 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GenerateEmbedUrlForAnonymousUserOutput + var sv *DescribeThemePermissionsOutput if *v == nil { - sv = &GenerateEmbedUrlForAnonymousUserOutput{} + sv = &DescribeThemePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnonymousUserArn": + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.AnonymousUserArn = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "EmbedUrl": + case "ThemeArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.EmbedUrl = ptr.String(jtv) + sv.ThemeArn = ptr.String(jtv) } - case "RequestId": + case "ThemeId": 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 ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.ThemeId = ptr.String(jtv) } default: @@ -13336,14 +13911,14 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v return nil } -type awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser struct { +type awsRestjson1_deserializeOpDescribeUser struct { } -func (*awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) ID() string { +func (*awsRestjson1_deserializeOpDescribeUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13357,12 +13932,12 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeUser(response, &metadata) } - output := &GenerateEmbedUrlForRegisteredUserOutput{} + output := &DescribeUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13385,7 +13960,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13398,7 +13973,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13448,24 +14023,18 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response * case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("QuickSightUserNotFoundException", errorCode): - return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): - return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedPricingPlanException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) - - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13476,7 +14045,7 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response * } } -func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(v *GenerateEmbedUrlForRegisteredUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(v *DescribeUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13485,7 +14054,7 @@ func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutp return nil } -func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v **GenerateEmbedUrlForRegisteredUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13498,24 +14067,15 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GenerateEmbedUrlForRegisteredUserOutput + var sv *DescribeUserOutput if *v == nil { - sv = &GenerateEmbedUrlForRegisteredUserOutput{} + sv = &DescribeUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EmbedUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) - } - sv.EmbedUrl = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -13525,6 +14085,11 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v sv.RequestId = ptr.String(jtv) } + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + return err + } + default: _, _ = key, value @@ -13534,14 +14099,14 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v return nil } -type awsRestjson1_deserializeOpGetDashboardEmbedUrl struct { +type awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser struct { } -func (*awsRestjson1_deserializeOpGetDashboardEmbedUrl) ID() string { +func (*awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13555,12 +14120,12 @@ func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response, &metadata) } - output := &GetDashboardEmbedUrlOutput{} + output := &GenerateEmbedUrlForAnonymousUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13583,7 +14148,7 @@ func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13596,7 +14161,7 @@ func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13640,24 +14205,12 @@ func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("DomainNotWhitelistedException", errorCode): - return awsRestjson1_deserializeErrorDomainNotWhitelistedException(response, errorBody) - - case strings.EqualFold("IdentityTypeNotSupportedException", errorCode): - return awsRestjson1_deserializeErrorIdentityTypeNotSupportedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("QuickSightUserNotFoundException", errorCode): - return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -13683,7 +14236,7 @@ func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(v *GetDashboardEmbedUrlOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(v *GenerateEmbedUrlForAnonymousUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13692,7 +14245,7 @@ func awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(v *GetDash return nil } -func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboardEmbedUrlOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v **GenerateEmbedUrlForAnonymousUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13705,15 +14258,24 @@ func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDashboardEmbedUrlOutput + var sv *GenerateEmbedUrlForAnonymousUserOutput if *v == nil { - sv = &GetDashboardEmbedUrlOutput{} + sv = &GenerateEmbedUrlForAnonymousUserOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AnonymousUserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AnonymousUserArn = ptr.String(jtv) + } + case "EmbedUrl": if value != nil { jtv, ok := value.(string) @@ -13741,14 +14303,14 @@ func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboa return nil } -type awsRestjson1_deserializeOpGetSessionEmbedUrl struct { +type awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser struct { } -func (*awsRestjson1_deserializeOpGetSessionEmbedUrl) ID() string { +func (*awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13762,12 +14324,12 @@ func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response, &metadata) } - output := &GetSessionEmbedUrlOutput{} + output := &GenerateEmbedUrlForRegisteredUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13790,7 +14352,7 @@ func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13803,7 +14365,7 @@ func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13856,9 +14418,6 @@ func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Resp case strings.EqualFold("QuickSightUserNotFoundException", errorCode): return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -13868,6 +14427,9 @@ func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Resp case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) @@ -13881,7 +14443,7 @@ func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(v *GetSessionEmbedUrlOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(v *GenerateEmbedUrlForRegisteredUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13890,7 +14452,7 @@ func awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(v *GetSessio return nil } -func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEmbedUrlOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v **GenerateEmbedUrlForRegisteredUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13903,9 +14465,9 @@ func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEm return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSessionEmbedUrlOutput + var sv *GenerateEmbedUrlForRegisteredUserOutput if *v == nil { - sv = &GetSessionEmbedUrlOutput{} + sv = &GenerateEmbedUrlForRegisteredUserOutput{} } else { sv = *v } @@ -13939,14 +14501,14 @@ func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEm return nil } -type awsRestjson1_deserializeOpListAnalyses struct { +type awsRestjson1_deserializeOpGetDashboardEmbedUrl struct { } -func (*awsRestjson1_deserializeOpListAnalyses) ID() string { +func (*awsRestjson1_deserializeOpGetDashboardEmbedUrl) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13960,12 +14522,12 @@ func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAnalyses(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response, &metadata) } - output := &ListAnalysesOutput{} + output := &GetDashboardEmbedUrlOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13988,7 +14550,7 @@ func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAnalysesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14001,7 +14563,7 @@ func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14042,15 +14604,39 @@ func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("DomainNotWhitelistedException", errorCode): + return awsRestjson1_deserializeErrorDomainNotWhitelistedException(response, errorBody) + + case strings.EqualFold("IdentityTypeNotSupportedException", errorCode): + return awsRestjson1_deserializeErrorIdentityTypeNotSupportedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("QuickSightUserNotFoundException", errorCode): + return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): + return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) @@ -14064,7 +14650,7 @@ func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(v *ListAnalysesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(v *GetDashboardEmbedUrlOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14073,7 +14659,7 @@ func awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(v *ListAnalysesOut return nil } -func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboardEmbedUrlOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14086,27 +14672,22 @@ func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAnalysesOutput + var sv *GetDashboardEmbedUrlOutput if *v == nil { - sv = &ListAnalysesOutput{} + sv = &GetDashboardEmbedUrlOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisSummaryList": - if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { - return err - } - - case "NextToken": + case "EmbedUrl": 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 EmbeddingUrl to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.EmbedUrl = ptr.String(jtv) } case "RequestId": @@ -14127,14 +14708,14 @@ func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput return nil } -type awsRestjson1_deserializeOpListDashboards struct { +type awsRestjson1_deserializeOpGetSessionEmbedUrl struct { } -func (*awsRestjson1_deserializeOpListDashboards) ID() string { +func (*awsRestjson1_deserializeOpGetSessionEmbedUrl) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14148,12 +14729,12 @@ func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDashboards(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response, &metadata) } - output := &ListDashboardsOutput{} + output := &GetSessionEmbedUrlOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14176,7 +14757,7 @@ func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDashboardsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14189,7 +14770,7 @@ func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14230,11 +14811,26 @@ func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("QuickSightUserNotFoundException", errorCode): + return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): + return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -14252,7 +14848,7 @@ func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(v *ListDashboardsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(v *GetSessionEmbedUrlOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14261,7 +14857,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(v *ListDashboard return nil } -func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEmbedUrlOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14274,27 +14870,22 @@ func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDashboardsOutput + var sv *GetSessionEmbedUrlOutput if *v == nil { - sv = &ListDashboardsOutput{} + sv = &GetSessionEmbedUrlOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardSummaryList": - if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { - return err - } - - case "NextToken": + case "EmbedUrl": 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 EmbeddingUrl to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.EmbedUrl = ptr.String(jtv) } case "RequestId": @@ -14315,14 +14906,14 @@ func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOu return nil } -type awsRestjson1_deserializeOpListDashboardVersions struct { +type awsRestjson1_deserializeOpListAnalyses struct { } -func (*awsRestjson1_deserializeOpListDashboardVersions) ID() string { +func (*awsRestjson1_deserializeOpListAnalyses) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14336,12 +14927,12 @@ func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDashboardVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAnalyses(response, &metadata) } - output := &ListDashboardVersionsOutput{} + output := &ListAnalysesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14364,7 +14955,7 @@ func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAnalysesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14377,7 +14968,7 @@ func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14424,12 +15015,6 @@ func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.R case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -14446,7 +15031,7 @@ func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(v *ListDashboardVersionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(v *ListAnalysesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14455,7 +15040,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(v *ListDa return nil } -func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashboardVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14468,17 +15053,17 @@ func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashb return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDashboardVersionsOutput + var sv *ListAnalysesOutput if *v == nil { - sv = &ListDashboardVersionsOutput{} + sv = &ListAnalysesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardVersionSummaryList": - if err := awsRestjson1_deserializeDocumentDashboardVersionSummaryList(&sv.DashboardVersionSummaryList, value); err != nil { + case "AnalysisSummaryList": + if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { return err } @@ -14509,14 +15094,14 @@ func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashb return nil } -type awsRestjson1_deserializeOpListDataSets struct { +type awsRestjson1_deserializeOpListDashboards struct { } -func (*awsRestjson1_deserializeOpListDataSets) ID() string { +func (*awsRestjson1_deserializeOpListDashboards) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14530,12 +15115,12 @@ func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDataSets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDashboards(response, &metadata) } - output := &ListDataSetsOutput{} + output := &ListDashboardsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14558,7 +15143,7 @@ func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDataSetsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDashboardsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14571,7 +15156,7 @@ func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14612,21 +15197,18 @@ func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -14637,7 +15219,7 @@ func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(v *ListDataSetsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(v *ListDashboardsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14646,7 +15228,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(v *ListDataSetsOut return nil } -func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14659,17 +15241,17 @@ func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDataSetsOutput + var sv *ListDashboardsOutput if *v == nil { - sv = &ListDataSetsOutput{} + sv = &ListDashboardsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetSummaries": - if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { + case "DashboardSummaryList": + if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { return err } @@ -14700,14 +15282,14 @@ func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput return nil } -type awsRestjson1_deserializeOpListDataSources struct { +type awsRestjson1_deserializeOpListDashboardVersions struct { } -func (*awsRestjson1_deserializeOpListDataSources) ID() string { +func (*awsRestjson1_deserializeOpListDashboardVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14721,12 +15303,12 @@ func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDataSources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDashboardVersions(response, &metadata) } - output := &ListDataSourcesOutput{} + output := &ListDashboardVersionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14749,7 +15331,7 @@ func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDataSourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14762,7 +15344,7 @@ func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14803,9 +15385,6 @@ func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Respons } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -14815,9 +15394,15 @@ func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -14828,7 +15413,7 @@ func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(v *ListDataSourcesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(v *ListDashboardVersionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14837,7 +15422,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(v *ListDataSour return nil } -func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashboardVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14850,17 +15435,17 @@ func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSources return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDataSourcesOutput + var sv *ListDashboardVersionsOutput if *v == nil { - sv = &ListDataSourcesOutput{} + sv = &ListDashboardVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSources": - if err := awsRestjson1_deserializeDocumentDataSourceList(&sv.DataSources, value); err != nil { + case "DashboardVersionSummaryList": + if err := awsRestjson1_deserializeDocumentDashboardVersionSummaryList(&sv.DashboardVersionSummaryList, value); err != nil { return err } @@ -14891,14 +15476,14 @@ func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSources return nil } -type awsRestjson1_deserializeOpListFolderMembers struct { +type awsRestjson1_deserializeOpListDataSets struct { } -func (*awsRestjson1_deserializeOpListFolderMembers) ID() string { +func (*awsRestjson1_deserializeOpListDataSets) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14912,12 +15497,12 @@ func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFolderMembers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDataSets(response, &metadata) } - output := &ListFolderMembersOutput{} + output := &ListDataSetsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14940,7 +15525,7 @@ func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFolderMembersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDataSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14953,7 +15538,7 @@ func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15006,15 +15591,9 @@ func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -15025,7 +15604,7 @@ func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(v *ListFolderMembersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(v *ListDataSetsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15034,7 +15613,7 @@ func awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(v *ListFolder return nil } -func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMembersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15047,17 +15626,17 @@ func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFolderMembersOutput + var sv *ListDataSetsOutput if *v == nil { - sv = &ListFolderMembersOutput{} + sv = &ListDataSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FolderMemberList": - if err := awsRestjson1_deserializeDocumentFolderMemberList(&sv.FolderMemberList, value); err != nil { + case "DataSetSummaries": + if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { return err } @@ -15088,14 +15667,14 @@ func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMem return nil } -type awsRestjson1_deserializeOpListFolders struct { +type awsRestjson1_deserializeOpListDataSources struct { } -func (*awsRestjson1_deserializeOpListFolders) ID() string { +func (*awsRestjson1_deserializeOpListDataSources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15109,12 +15688,12 @@ func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFolders(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDataSources(response, &metadata) } - output := &ListFoldersOutput{} + output := &ListDataSourcesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15137,7 +15716,7 @@ func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFoldersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDataSourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15150,7 +15729,7 @@ func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15203,15 +15782,9 @@ func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, m case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -15222,7 +15795,7 @@ func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(v *ListFoldersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(v *ListDataSourcesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15231,7 +15804,7 @@ func awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(v *ListFoldersOutpu return nil } -func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15244,17 +15817,17 @@ func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFoldersOutput + var sv *ListDataSourcesOutput if *v == nil { - sv = &ListFoldersOutput{} + sv = &ListDataSourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FolderSummaryList": - if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { + case "DataSources": + if err := awsRestjson1_deserializeDocumentDataSourceList(&sv.DataSources, value); err != nil { return err } @@ -15285,14 +15858,14 @@ func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, return nil } -type awsRestjson1_deserializeOpListGroupMemberships struct { +type awsRestjson1_deserializeOpListFolderMembers struct { } -func (*awsRestjson1_deserializeOpListGroupMemberships) ID() string { +func (*awsRestjson1_deserializeOpListFolderMembers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15306,12 +15879,12 @@ func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListGroupMemberships(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFolderMembers(response, &metadata) } - output := &ListGroupMembershipsOutput{} + output := &ListFolderMembersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15334,7 +15907,7 @@ func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFolderMembersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15347,7 +15920,7 @@ func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15400,18 +15973,15 @@ func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Re case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -15422,7 +15992,7 @@ func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(v *ListGroupMembershipsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(v *ListFolderMembersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15431,7 +16001,7 @@ func awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(v *ListGro return nil } -func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupMembershipsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMembersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15444,17 +16014,17 @@ func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupM return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListGroupMembershipsOutput + var sv *ListFolderMembersOutput if *v == nil { - sv = &ListGroupMembershipsOutput{} + sv = &ListFolderMembersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupMemberList": - if err := awsRestjson1_deserializeDocumentGroupMemberList(&sv.GroupMemberList, value); err != nil { + case "FolderMemberList": + if err := awsRestjson1_deserializeDocumentFolderMemberList(&sv.FolderMemberList, value); err != nil { return err } @@ -15485,14 +16055,14 @@ func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupM return nil } -type awsRestjson1_deserializeOpListGroups struct { +type awsRestjson1_deserializeOpListFolders struct { } -func (*awsRestjson1_deserializeOpListGroups) ID() string { +func (*awsRestjson1_deserializeOpListFolders) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15506,12 +16076,12 @@ func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListGroups(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFolders(response, &metadata) } - output := &ListGroupsOutput{} + output := &ListFoldersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15534,7 +16104,7 @@ func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListGroupsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFoldersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15547,7 +16117,7 @@ func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15600,18 +16170,15 @@ func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -15622,7 +16189,7 @@ func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(v *ListGroupsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(v *ListFoldersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15631,7 +16198,7 @@ func awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(v *ListGroupsOutput, return nil } -func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15644,17 +16211,17 @@ func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListGroupsOutput + var sv *ListFoldersOutput if *v == nil { - sv = &ListGroupsOutput{} + sv = &ListFoldersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupList": - if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { + case "FolderSummaryList": + if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { return err } @@ -15685,14 +16252,14 @@ func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, va return nil } -type awsRestjson1_deserializeOpListIAMPolicyAssignments struct { +type awsRestjson1_deserializeOpListGroupMemberships struct { } -func (*awsRestjson1_deserializeOpListIAMPolicyAssignments) ID() string { +func (*awsRestjson1_deserializeOpListGroupMemberships) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15706,12 +16273,12 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGroupMemberships(response, &metadata) } - output := &ListIAMPolicyAssignmentsOutput{} + output := &ListGroupMembershipsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15734,7 +16301,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15747,7 +16314,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15800,9 +16367,15 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhtt case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -15816,7 +16389,7 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(v *ListIAMPolicyAssignmentsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(v *ListGroupMembershipsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15825,7 +16398,7 @@ func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(v *Lis return nil } -func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIAMPolicyAssignmentsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupMembershipsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15838,17 +16411,17 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIAMPolicyAssignmentsOutput + var sv *ListGroupMembershipsOutput if *v == nil { - sv = &ListIAMPolicyAssignmentsOutput{} + sv = &ListGroupMembershipsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IAMPolicyAssignments": - if err := awsRestjson1_deserializeDocumentIAMPolicyAssignmentSummaryList(&sv.IAMPolicyAssignments, value); err != nil { + case "GroupMemberList": + if err := awsRestjson1_deserializeDocumentGroupMemberList(&sv.GroupMemberList, value); err != nil { return err } @@ -15879,14 +16452,14 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIA return nil } -type awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser struct { +type awsRestjson1_deserializeOpListGroups struct { } -func (*awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) ID() string { +func (*awsRestjson1_deserializeOpListGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15900,12 +16473,12 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGroups(response, &metadata) } - output := &ListIAMPolicyAssignmentsForUserOutput{} + output := &ListGroupsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15928,7 +16501,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15941,7 +16514,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15985,21 +16558,24 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *sm case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConcurrentUpdatingException", errorCode): - return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -16013,7 +16589,7 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *sm } } -func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(v *ListIAMPolicyAssignmentsForUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(v *ListGroupsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16022,7 +16598,7 @@ func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput return nil } -func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v **ListIAMPolicyAssignmentsForUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16035,17 +16611,17 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIAMPolicyAssignmentsForUserOutput + var sv *ListGroupsOutput if *v == nil { - sv = &ListIAMPolicyAssignmentsForUserOutput{} + sv = &ListGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ActiveAssignments": - if err := awsRestjson1_deserializeDocumentActiveIAMPolicyAssignmentList(&sv.ActiveAssignments, value); err != nil { + case "GroupList": + if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { return err } @@ -16076,14 +16652,14 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v * return nil } -type awsRestjson1_deserializeOpListIngestions struct { +type awsRestjson1_deserializeOpListIAMPolicyAssignments struct { } -func (*awsRestjson1_deserializeOpListIngestions) ID() string { +func (*awsRestjson1_deserializeOpListIAMPolicyAssignments) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16097,12 +16673,12 @@ func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIngestions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response, &metadata) } - output := &ListIngestionsOutput{} + output := &ListIAMPolicyAssignmentsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16125,7 +16701,7 @@ func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIngestionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16138,7 +16714,7 @@ func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16191,9 +16767,6 @@ func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -16210,7 +16783,7 @@ func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(v *ListIngestionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(v *ListIAMPolicyAssignmentsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16219,7 +16792,7 @@ func awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(v *ListIngestion return nil } -func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIAMPolicyAssignmentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16232,17 +16805,17 @@ func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIngestionsOutput + var sv *ListIAMPolicyAssignmentsOutput if *v == nil { - sv = &ListIngestionsOutput{} + sv = &ListIAMPolicyAssignmentsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Ingestions": - if err := awsRestjson1_deserializeDocumentIngestions(&sv.Ingestions, value); err != nil { + case "IAMPolicyAssignments": + if err := awsRestjson1_deserializeDocumentIAMPolicyAssignmentSummaryList(&sv.IAMPolicyAssignments, value); err != nil { return err } @@ -16273,14 +16846,14 @@ func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOu return nil } -type awsRestjson1_deserializeOpListNamespaces struct { +type awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser struct { } -func (*awsRestjson1_deserializeOpListNamespaces) ID() string { +func (*awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16294,12 +16867,12 @@ func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListNamespaces(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response, &metadata) } - output := &ListNamespacesOutput{} + output := &ListIAMPolicyAssignmentsForUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16322,7 +16895,7 @@ func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListNamespacesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16335,7 +16908,7 @@ func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16379,24 +16952,21 @@ func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConcurrentUpdatingException", errorCode): + return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -16410,7 +16980,7 @@ func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(v *ListNamespacesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(v *ListIAMPolicyAssignmentsForUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16419,7 +16989,7 @@ func awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(v *ListNamespace return nil } -func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v **ListIAMPolicyAssignmentsForUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16432,17 +17002,17 @@ func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListNamespacesOutput + var sv *ListIAMPolicyAssignmentsForUserOutput if *v == nil { - sv = &ListNamespacesOutput{} + sv = &ListIAMPolicyAssignmentsForUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Namespaces": - if err := awsRestjson1_deserializeDocumentNamespaces(&sv.Namespaces, value); err != nil { + case "ActiveAssignments": + if err := awsRestjson1_deserializeDocumentActiveIAMPolicyAssignmentList(&sv.ActiveAssignments, value); err != nil { return err } @@ -16473,14 +17043,14 @@ func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOu return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListIngestions struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListIngestions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16494,12 +17064,12 @@ 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_deserializeOpErrorListIngestions(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListIngestionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16522,7 +17092,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIngestionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16535,7 +17105,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16582,9 +17152,15 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -16601,7 +17177,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(v *ListTagsForResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(v *ListIngestionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16610,7 +17186,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(v *ListTags return nil } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16623,27 +17199,36 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListIngestionsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListIngestionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RequestId": + case "Ingestions": + if err := awsRestjson1_deserializeDocumentIngestions(&sv.Ingestions, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { - return err + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) } default: @@ -16655,14 +17240,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpListTemplateAliases struct { +type awsRestjson1_deserializeOpListNamespaces struct { } -func (*awsRestjson1_deserializeOpListTemplateAliases) ID() string { +func (*awsRestjson1_deserializeOpListNamespaces) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16676,12 +17261,12 @@ func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTemplateAliases(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListNamespaces(response, &metadata) } - output := &ListTemplateAliasesOutput{} + output := &ListNamespacesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16704,7 +17289,7 @@ func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListNamespacesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16717,7 +17302,7 @@ func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTemplateAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16758,21 +17343,30 @@ func awsRestjson1_deserializeOpErrorListTemplateAliases(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16783,7 +17377,7 @@ func awsRestjson1_deserializeOpErrorListTemplateAliases(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(v *ListTemplateAliasesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(v *ListNamespacesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16792,7 +17386,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(v *ListTemp return nil } -func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplateAliasesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16805,15 +17399,20 @@ func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTemplateAliasesOutput + var sv *ListNamespacesOutput if *v == nil { - sv = &ListTemplateAliasesOutput{} + sv = &ListNamespacesOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Namespaces": + if err := awsRestjson1_deserializeDocumentNamespaces(&sv.Namespaces, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -16832,11 +17431,6 @@ func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplat sv.RequestId = ptr.String(jtv) } - case "TemplateAliasList": - if err := awsRestjson1_deserializeDocumentTemplateAliasList(&sv.TemplateAliasList, value); err != nil { - return err - } - default: _, _ = key, value @@ -16846,14 +17440,14 @@ func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplat return nil } -type awsRestjson1_deserializeOpListTemplates struct { +type awsRestjson1_deserializeOpListRefreshSchedules struct { } -func (*awsRestjson1_deserializeOpListTemplates) ID() string { +func (*awsRestjson1_deserializeOpListRefreshSchedules) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListRefreshSchedules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16867,12 +17461,12 @@ func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTemplates(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListRefreshSchedules(response, &metadata) } - output := &ListTemplatesOutput{} + output := &ListRefreshSchedulesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListRefreshSchedulesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16895,7 +17489,7 @@ func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTemplatesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16908,7 +17502,7 @@ func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListRefreshSchedules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16949,24 +17543,24 @@ func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16977,7 +17571,7 @@ func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(v *ListTemplatesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListRefreshSchedulesOutput(v *ListRefreshSchedulesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16986,7 +17580,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(v *ListTemplatesO return nil } -func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(v **ListRefreshSchedulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16999,22 +17593,18 @@ func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTemplatesOutput + var sv *ListRefreshSchedulesOutput if *v == nil { - sv = &ListTemplatesOutput{} + sv = &ListRefreshSchedulesOutput{} } 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 String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) + case "RefreshSchedules": + if err := awsRestjson1_deserializeDocumentRefreshSchedules(&sv.RefreshSchedules, value); err != nil { + return err } case "RequestId": @@ -17026,11 +17616,6 @@ func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutp sv.RequestId = ptr.String(jtv) } - case "TemplateSummaryList": - if err := awsRestjson1_deserializeDocumentTemplateSummaryList(&sv.TemplateSummaryList, value); err != nil { - return err - } - default: _, _ = key, value @@ -17040,14 +17625,14 @@ func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutp return nil } -type awsRestjson1_deserializeOpListTemplateVersions struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpListTemplateVersions) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTemplateVersions) 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) @@ -17061,12 +17646,12 @@ func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTemplateVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &ListTemplateVersionsOutput{} + output := &ListTagsForResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17089,7 +17674,7 @@ func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17102,7 +17687,7 @@ func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTemplateVersions(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)} @@ -17143,12 +17728,12 @@ func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Re } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -17158,6 +17743,185 @@ func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Re case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(v *ListTagsForResourceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +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 "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTemplateAliases struct { +} + +func (*awsRestjson1_deserializeOpListTemplateAliases) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(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_deserializeOpErrorListTemplateAliases(response, &metadata) + } + output := &ListTemplateAliasesOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentListTemplateAliasesOutput(&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_deserializeOpErrorListTemplateAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(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("UnsupportedUserEditionException", errorCode): return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) @@ -17171,7 +17935,7 @@ func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(v *ListTemplateVersionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(v *ListTemplateAliasesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17180,7 +17944,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(v *ListTem return nil } -func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTemplateVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplateAliasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17193,9 +17957,9 @@ func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTempla return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTemplateVersionsOutput + var sv *ListTemplateAliasesOutput if *v == nil { - sv = &ListTemplateVersionsOutput{} + sv = &ListTemplateAliasesOutput{} } else { sv = *v } @@ -17220,8 +17984,8 @@ func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTempla sv.RequestId = ptr.String(jtv) } - case "TemplateVersionSummaryList": - if err := awsRestjson1_deserializeDocumentTemplateVersionSummaryList(&sv.TemplateVersionSummaryList, value); err != nil { + case "TemplateAliasList": + if err := awsRestjson1_deserializeDocumentTemplateAliasList(&sv.TemplateAliasList, value); err != nil { return err } @@ -17234,14 +17998,14 @@ func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTempla return nil } -type awsRestjson1_deserializeOpListThemeAliases struct { +type awsRestjson1_deserializeOpListTemplates struct { } -func (*awsRestjson1_deserializeOpListThemeAliases) ID() string { +func (*awsRestjson1_deserializeOpListTemplates) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17255,12 +18019,12 @@ func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListThemeAliases(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTemplates(response, &metadata) } - output := &ListThemeAliasesOutput{} + output := &ListTemplatesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17283,7 +18047,7 @@ func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTemplatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17296,7 +18060,7 @@ func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17337,9 +18101,6 @@ func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Respon } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -17368,7 +18129,7 @@ func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(v *ListThemeAliasesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(v *ListTemplatesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17377,7 +18138,7 @@ func awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(v *ListThemeAl return nil } -func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAliasesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17390,9 +18151,9 @@ func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAlias return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListThemeAliasesOutput + var sv *ListTemplatesOutput if *v == nil { - sv = &ListThemeAliasesOutput{} + sv = &ListTemplatesOutput{} } else { sv = *v } @@ -17417,8 +18178,8 @@ func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAlias sv.RequestId = ptr.String(jtv) } - case "ThemeAliasList": - if err := awsRestjson1_deserializeDocumentThemeAliasList(&sv.ThemeAliasList, value); err != nil { + case "TemplateSummaryList": + if err := awsRestjson1_deserializeDocumentTemplateSummaryList(&sv.TemplateSummaryList, value); err != nil { return err } @@ -17431,14 +18192,14 @@ func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAlias return nil } -type awsRestjson1_deserializeOpListThemes struct { +type awsRestjson1_deserializeOpListTemplateVersions struct { } -func (*awsRestjson1_deserializeOpListThemes) ID() string { +func (*awsRestjson1_deserializeOpListTemplateVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17452,12 +18213,12 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListThemes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTemplateVersions(response, &metadata) } - output := &ListThemesOutput{} + output := &ListTemplateVersionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListThemesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17480,7 +18241,7 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListThemesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17493,7 +18254,7 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17534,9 +18295,6 @@ func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, me } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -17565,7 +18323,7 @@ func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpHttpBindingsListThemesOutput(v *ListThemesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(v *ListTemplateVersionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17574,7 +18332,7 @@ func awsRestjson1_deserializeOpHttpBindingsListThemesOutput(v *ListThemesOutput, return nil } -func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTemplateVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17587,9 +18345,9 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListThemesOutput + var sv *ListTemplateVersionsOutput if *v == nil { - sv = &ListThemesOutput{} + sv = &ListTemplateVersionsOutput{} } else { sv = *v } @@ -17614,8 +18372,8 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va sv.RequestId = ptr.String(jtv) } - case "ThemeSummaryList": - if err := awsRestjson1_deserializeDocumentThemeSummaryList(&sv.ThemeSummaryList, value); err != nil { + case "TemplateVersionSummaryList": + if err := awsRestjson1_deserializeDocumentTemplateVersionSummaryList(&sv.TemplateVersionSummaryList, value); err != nil { return err } @@ -17628,14 +18386,14 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va return nil } -type awsRestjson1_deserializeOpListThemeVersions struct { +type awsRestjson1_deserializeOpListThemeAliases struct { } -func (*awsRestjson1_deserializeOpListThemeVersions) ID() string { +func (*awsRestjson1_deserializeOpListThemeAliases) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17649,12 +18407,12 @@ func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListThemeVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListThemeAliases(response, &metadata) } - output := &ListThemeVersionsOutput{} + output := &ListThemeAliasesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17677,7 +18435,7 @@ func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17690,7 +18448,7 @@ func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17731,8 +18489,8 @@ func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Respo } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -17762,7 +18520,7 @@ func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(v *ListThemeVersionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(v *ListThemeAliasesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17771,7 +18529,7 @@ func awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(v *ListThemeV return nil } -func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAliasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17784,9 +18542,9 @@ func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVers return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListThemeVersionsOutput + var sv *ListThemeAliasesOutput if *v == nil { - sv = &ListThemeVersionsOutput{} + sv = &ListThemeAliasesOutput{} } else { sv = *v } @@ -17811,8 +18569,8 @@ func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVers sv.RequestId = ptr.String(jtv) } - case "ThemeVersionSummaryList": - if err := awsRestjson1_deserializeDocumentThemeVersionSummaryList(&sv.ThemeVersionSummaryList, value); err != nil { + case "ThemeAliasList": + if err := awsRestjson1_deserializeDocumentThemeAliasList(&sv.ThemeAliasList, value); err != nil { return err } @@ -17825,14 +18583,14 @@ func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVers return nil } -type awsRestjson1_deserializeOpListUserGroups struct { +type awsRestjson1_deserializeOpListThemes struct { } -func (*awsRestjson1_deserializeOpListUserGroups) ID() string { +func (*awsRestjson1_deserializeOpListThemes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17846,12 +18604,12 @@ func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListUserGroups(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListThemes(response, &metadata) } - output := &ListUserGroupsOutput{} + output := &ListThemesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListThemesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17874,7 +18632,7 @@ func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListUserGroupsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListThemesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17887,7 +18645,7 @@ func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17934,21 +18692,21 @@ func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17959,7 +18717,7 @@ func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(v *ListUserGroupsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListThemesOutput(v *ListThemesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17968,7 +18726,7 @@ func awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(v *ListUserGroup return nil } -func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17981,20 +18739,15 @@ func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListUserGroupsOutput + var sv *ListThemesOutput if *v == nil { - sv = &ListUserGroupsOutput{} + sv = &ListThemesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupList": - if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -18013,6 +18766,11 @@ func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOu sv.RequestId = ptr.String(jtv) } + case "ThemeSummaryList": + if err := awsRestjson1_deserializeDocumentThemeSummaryList(&sv.ThemeSummaryList, value); err != nil { + return err + } + default: _, _ = key, value @@ -18022,14 +18780,14 @@ func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOu return nil } -type awsRestjson1_deserializeOpListUsers struct { +type awsRestjson1_deserializeOpListThemeVersions struct { } -func (*awsRestjson1_deserializeOpListUsers) ID() string { +func (*awsRestjson1_deserializeOpListThemeVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18043,12 +18801,12 @@ func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListUsers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListThemeVersions(response, &metadata) } - output := &ListUsersOutput{} + output := &ListThemeVersionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListUsersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18071,7 +18829,7 @@ func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListUsersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18084,7 +18842,7 @@ func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18137,18 +18895,15 @@ func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, met case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18159,7 +18914,7 @@ func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpHttpBindingsListUsersOutput(v *ListUsersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(v *ListThemeVersionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18168,7 +18923,7 @@ func awsRestjson1_deserializeOpHttpBindingsListUsersOutput(v *ListUsersOutput, r return nil } -func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18181,9 +18936,9 @@ func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListUsersOutput + var sv *ListThemeVersionsOutput if *v == nil { - sv = &ListUsersOutput{} + sv = &ListThemeVersionsOutput{} } else { sv = *v } @@ -18208,8 +18963,8 @@ func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu sv.RequestId = ptr.String(jtv) } - case "UserList": - if err := awsRestjson1_deserializeDocumentUserList(&sv.UserList, value); err != nil { + case "ThemeVersionSummaryList": + if err := awsRestjson1_deserializeDocumentThemeVersionSummaryList(&sv.ThemeVersionSummaryList, value); err != nil { return err } @@ -18222,14 +18977,14 @@ func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu return nil } -type awsRestjson1_deserializeOpRegisterUser struct { +type awsRestjson1_deserializeOpListUserGroups struct { } -func (*awsRestjson1_deserializeOpRegisterUser) ID() string { +func (*awsRestjson1_deserializeOpListUserGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18243,12 +18998,12 @@ func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRegisterUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListUserGroups(response, &metadata) } - output := &RegisterUserOutput{} + output := &ListUserGroupsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18271,7 +19026,7 @@ func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRegisterUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListUserGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18284,7 +19039,7 @@ func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18334,15 +19089,9 @@ func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -18362,7 +19111,7 @@ func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(v *RegisterUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(v *ListUserGroupsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18371,7 +19120,7 @@ func awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(v *RegisterUserOut return nil } -func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18384,36 +19133,36 @@ func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RegisterUserOutput + var sv *ListUserGroupsOutput if *v == nil { - sv = &RegisterUserOutput{} + sv = &ListUserGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RequestId": + case "GroupList": + if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) - } - - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { - return err + sv.NextToken = ptr.String(jtv) } - case "UserInvitationUrl": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.UserInvitationUrl = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } default: @@ -18425,14 +19174,14 @@ func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput return nil } -type awsRestjson1_deserializeOpRestoreAnalysis struct { +type awsRestjson1_deserializeOpListUsers struct { } -func (*awsRestjson1_deserializeOpRestoreAnalysis) ID() string { +func (*awsRestjson1_deserializeOpListUsers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18446,12 +19195,12 @@ func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRestoreAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListUsers(response, &metadata) } - output := &RestoreAnalysisOutput{} + output := &ListUsersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListUsersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18474,7 +19223,7 @@ func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListUsersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18487,7 +19236,7 @@ func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18528,24 +19277,30 @@ func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Respons } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18556,7 +19311,7 @@ func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(v *RestoreAnalysisOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListUsersOutput(v *ListUsersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18565,7 +19320,7 @@ func awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(v *RestoreAnaly return nil } -func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18578,31 +19333,22 @@ func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysis return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RestoreAnalysisOutput + var sv *ListUsersOutput if *v == nil { - sv = &RestoreAnalysisOutput{} + sv = &ListUsersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AnalysisId = ptr.String(jtv) - } - - case "Arn": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } case "RequestId": @@ -18614,6 +19360,11 @@ func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysis sv.RequestId = ptr.String(jtv) } + case "UserList": + if err := awsRestjson1_deserializeDocumentUserList(&sv.UserList, value); err != nil { + return err + } + default: _, _ = key, value @@ -18623,14 +19374,14 @@ func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysis return nil } -type awsRestjson1_deserializeOpSearchAnalyses struct { +type awsRestjson1_deserializeOpPutDataSetRefreshProperties struct { } -func (*awsRestjson1_deserializeOpSearchAnalyses) ID() string { +func (*awsRestjson1_deserializeOpPutDataSetRefreshProperties) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18644,12 +19395,12 @@ func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchAnalyses(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response, &metadata) } - output := &SearchAnalysesOutput{} + output := &PutDataSetRefreshPropertiesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsPutDataSetRefreshPropertiesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18672,7 +19423,7 @@ func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18685,7 +19436,7 @@ func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18726,24 +19477,30 @@ func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18754,7 +19511,7 @@ func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(v *SearchAnalysesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsPutDataSetRefreshPropertiesOutput(v *PutDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18763,7 +19520,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(v *SearchAnalyse return nil } -func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(v **PutDataSetRefreshPropertiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18776,29 +19533,15 @@ func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchAnalysesOutput + var sv *PutDataSetRefreshPropertiesOutput if *v == nil { - sv = &SearchAnalysesOutput{} + sv = &PutDataSetRefreshPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisSummaryList": - if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -18817,14 +19560,14 @@ func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOu return nil } -type awsRestjson1_deserializeOpSearchDashboards struct { +type awsRestjson1_deserializeOpRegisterUser struct { } -func (*awsRestjson1_deserializeOpSearchDashboards) ID() string { +func (*awsRestjson1_deserializeOpRegisterUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18838,12 +19581,12 @@ func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchDashboards(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRegisterUser(response, &metadata) } - output := &SearchDashboardsOutput{} + output := &RegisterUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18866,7 +19609,7 @@ func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRegisterUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18879,7 +19622,7 @@ func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18920,24 +19663,33 @@ func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18948,7 +19700,7 @@ func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(v *SearchDashboardsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(v *RegisterUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18957,7 +19709,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(v *SearchDashb return nil } -func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboardsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18970,36 +19722,36 @@ func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboar return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchDashboardsOutput + var sv *RegisterUserOutput if *v == nil { - sv = &SearchDashboardsOutput{} + sv = &RegisterUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardSummaryList": - if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { - return err - } - - case "NextToken": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + return err + } + + case "UserInvitationUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.UserInvitationUrl = ptr.String(jtv) } default: @@ -19011,14 +19763,14 @@ func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboar return nil } -type awsRestjson1_deserializeOpSearchDataSets struct { +type awsRestjson1_deserializeOpRestoreAnalysis struct { } -func (*awsRestjson1_deserializeOpSearchDataSets) ID() string { +func (*awsRestjson1_deserializeOpRestoreAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19032,12 +19784,12 @@ func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchDataSets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRestoreAnalysis(response, &metadata) } - output := &SearchDataSetsOutput{} + output := &RestoreAnalysisOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19060,7 +19812,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19073,7 +19825,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19114,15 +19866,12 @@ func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -19132,6 +19881,9 @@ func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19142,7 +19894,7 @@ func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(v *SearchDataSetsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(v *RestoreAnalysisOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19151,7 +19903,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(v *SearchDataSet return nil } -func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19164,27 +19916,31 @@ func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchDataSetsOutput + var sv *RestoreAnalysisOutput if *v == nil { - sv = &SearchDataSetsOutput{} + sv = &RestoreAnalysisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetSummaries": - if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { - return err + case "AnalysisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AnalysisId = ptr.String(jtv) } - case "NextToken": + case "Arn": 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 Arn to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } case "RequestId": @@ -19205,14 +19961,14 @@ func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOu return nil } -type awsRestjson1_deserializeOpSearchDataSources struct { +type awsRestjson1_deserializeOpSearchAnalyses struct { } -func (*awsRestjson1_deserializeOpSearchDataSources) ID() string { +func (*awsRestjson1_deserializeOpSearchAnalyses) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19226,12 +19982,12 @@ func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchDataSources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchAnalyses(response, &metadata) } - output := &SearchDataSourcesOutput{} + output := &SearchAnalysesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19254,7 +20010,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19267,7 +20023,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19308,9 +20064,6 @@ func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Respo } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -19326,6 +20079,9 @@ func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Respo case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19336,7 +20092,7 @@ func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(v *SearchDataSourcesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(v *SearchAnalysesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19345,7 +20101,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(v *SearchData return nil } -func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19358,17 +20114,17 @@ func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSou return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchDataSourcesOutput + var sv *SearchAnalysesOutput if *v == nil { - sv = &SearchDataSourcesOutput{} + sv = &SearchAnalysesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceSummaries": - if err := awsRestjson1_deserializeDocumentDataSourceSummaryList(&sv.DataSourceSummaries, value); err != nil { + case "AnalysisSummaryList": + if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { return err } @@ -19399,14 +20155,14 @@ func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSou return nil } -type awsRestjson1_deserializeOpSearchFolders struct { +type awsRestjson1_deserializeOpSearchDashboards struct { } -func (*awsRestjson1_deserializeOpSearchFolders) ID() string { +func (*awsRestjson1_deserializeOpSearchDashboards) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19420,12 +20176,12 @@ func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchFolders(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchDashboards(response, &metadata) } - output := &SearchFoldersOutput{} + output := &SearchDashboardsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19448,7 +20204,7 @@ func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchFoldersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19461,7 +20217,7 @@ func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19502,9 +20258,6 @@ func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -19514,9 +20267,6 @@ func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -19536,7 +20286,7 @@ func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(v *SearchFoldersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(v *SearchDashboardsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19545,7 +20295,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(v *SearchFoldersO return nil } -func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboardsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19558,17 +20308,17 @@ func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchFoldersOutput + var sv *SearchDashboardsOutput if *v == nil { - sv = &SearchFoldersOutput{} + sv = &SearchDashboardsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FolderSummaryList": - if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { + case "DashboardSummaryList": + if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { return err } @@ -19599,14 +20349,14 @@ func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutp return nil } -type awsRestjson1_deserializeOpSearchGroups struct { +type awsRestjson1_deserializeOpSearchDataSets struct { } -func (*awsRestjson1_deserializeOpSearchGroups) ID() string { +func (*awsRestjson1_deserializeOpSearchDataSets) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19620,12 +20370,12 @@ func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchGroups(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchDataSets(response, &metadata) } - output := &SearchGroupsOutput{} + output := &SearchDataSetsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19648,7 +20398,7 @@ func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchGroupsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19661,7 +20411,7 @@ func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19714,15 +20464,9 @@ func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -19736,7 +20480,7 @@ func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(v *SearchGroupsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(v *SearchDataSetsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19745,7 +20489,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(v *SearchGroupsOut return nil } -func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19758,17 +20502,17 @@ func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchGroupsOutput + var sv *SearchDataSetsOutput if *v == nil { - sv = &SearchGroupsOutput{} + sv = &SearchDataSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupList": - if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { + case "DataSetSummaries": + if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { return err } @@ -19799,14 +20543,14 @@ func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpSearchDataSources struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpSearchDataSources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19820,12 +20564,12 @@ 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_deserializeOpErrorSearchDataSources(response, &metadata) } - output := &TagResourceOutput{} + output := &SearchDataSourcesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19848,7 +20592,7 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19861,7 +20605,7 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19908,12 +20652,12 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -19930,7 +20674,7 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(v *SearchDataSourcesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19939,7 +20683,7 @@ func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutpu return nil } -func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19952,15 +20696,29 @@ func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *TagResourceOutput + var sv *SearchDataSourcesOutput if *v == nil { - sv = &TagResourceOutput{} + sv = &SearchDataSourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "DataSourceSummaries": + if err := awsRestjson1_deserializeDocumentDataSourceSummaryList(&sv.DataSourceSummaries, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -19979,14 +20737,14 @@ func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, return nil } -type awsRestjson1_deserializeOpUntagResource struct { +type awsRestjson1_deserializeOpSearchFolders struct { } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +func (*awsRestjson1_deserializeOpSearchFolders) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20000,12 +20758,12 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchFolders(response, &metadata) } - output := &UntagResourceOutput{} + output := &SearchFoldersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20028,7 +20786,7 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchFoldersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20041,7 +20799,7 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20088,15 +20846,24 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20107,7 +20874,7 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(v *SearchFoldersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20116,7 +20883,7 @@ func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceO return nil } -func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20129,15 +20896,29 @@ func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UntagResourceOutput + var sv *SearchFoldersOutput if *v == nil { - sv = &UntagResourceOutput{} + sv = &SearchFoldersOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "FolderSummaryList": + if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -20156,14 +20937,14 @@ func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutp return nil } -type awsRestjson1_deserializeOpUpdateAccountCustomization struct { +type awsRestjson1_deserializeOpSearchGroups struct { } -func (*awsRestjson1_deserializeOpUpdateAccountCustomization) ID() string { +func (*awsRestjson1_deserializeOpSearchGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20177,12 +20958,12 @@ func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchGroups(response, &metadata) } - output := &UpdateAccountCustomizationOutput{} + output := &SearchGroupsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20205,7 +20986,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20218,7 +20999,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20262,15 +21043,18 @@ func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyh case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -20290,7 +21074,7 @@ func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(v *UpdateAccountCustomizationOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(v *SearchGroupsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20299,7 +21083,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(v *U return nil } -func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **UpdateAccountCustomizationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20312,45 +21096,27 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **Upda return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAccountCustomizationOutput + var sv *SearchGroupsOutput if *v == nil { - sv = &UpdateAccountCustomizationOutput{} + sv = &SearchGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountCustomization": - if err := awsRestjson1_deserializeDocumentAccountCustomization(&sv.AccountCustomization, value); err != nil { + case "GroupList": + if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { return err } - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "Namespace": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Namespace = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } case "RequestId": @@ -20371,14 +21137,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **Upda return nil } -type awsRestjson1_deserializeOpUpdateAccountSettings struct { +type awsRestjson1_deserializeOpTagResource struct { } -func (*awsRestjson1_deserializeOpUpdateAccountSettings) ID() string { +func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -20392,12 +21158,12 @@ func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateAccountSettingsOutput{} + output := &TagResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20420,7 +21186,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20433,7 +21199,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -20483,12 +21249,12 @@ func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -20502,7 +21268,7 @@ func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(v *UpdateAccountSettingsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20511,7 +21277,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(v *Update return nil } -func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAccountSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20524,9 +21290,9 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAcc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAccountSettingsOutput + var sv *TagResourceOutput if *v == nil { - sv = &UpdateAccountSettingsOutput{} + sv = &TagResourceOutput{} } else { sv = *v } @@ -20551,14 +21317,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAcc return nil } -type awsRestjson1_deserializeOpUpdateAnalysis struct { +type awsRestjson1_deserializeOpUntagResource struct { } -func (*awsRestjson1_deserializeOpUpdateAnalysis) ID() string { +func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -20572,12 +21338,12 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateAnalysisOutput{} + output := &UntagResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20600,7 +21366,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20613,7 +21379,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -20654,8 +21420,8 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -20663,18 +21429,12 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20685,7 +21445,7 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(v *UpdateAnalysisOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20694,7 +21454,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(v *UpdateAnalysi return nil } -func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20707,33 +21467,15 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAnalysisOutput + var sv *UntagResourceOutput if *v == nil { - sv = &UpdateAnalysisOutput{} + sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AnalysisId = ptr.String(jtv) - } - - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -20743,15 +21485,6 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOu sv.RequestId = ptr.String(jtv) } - case "UpdateStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.UpdateStatus = types.ResourceStatus(jtv) - } - default: _, _ = key, value @@ -20761,14 +21494,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOu return nil } -type awsRestjson1_deserializeOpUpdateAnalysisPermissions struct { +type awsRestjson1_deserializeOpUpdateAccountCustomization struct { } -func (*awsRestjson1_deserializeOpUpdateAnalysisPermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateAccountCustomization) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20782,12 +21515,12 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response, &metadata) } - output := &UpdateAnalysisPermissionsOutput{} + output := &UpdateAccountCustomizationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20810,7 +21543,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20823,7 +21556,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20864,6 +21597,9 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyht } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -20873,18 +21609,15 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyht case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20895,7 +21628,7 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(v *UpdateAnalysisPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(v *UpdateAccountCustomizationOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20904,7 +21637,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(v *Up return nil } -func awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(v **UpdateAnalysisPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **UpdateAccountCustomizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20917,36 +21650,45 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(v **Updat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAnalysisPermissionsOutput + var sv *UpdateAccountCustomizationOutput if *v == nil { - sv = &UpdateAnalysisPermissionsOutput{} + sv = &UpdateAccountCustomizationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisArn": + case "AccountCustomization": + if err := awsRestjson1_deserializeDocumentAccountCustomization(&sv.AccountCustomization, value); err != nil { + return err + } + + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AnalysisArn = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "AnalysisId": + case "AwsAccountId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) } - sv.AnalysisId = ptr.String(jtv) + sv.AwsAccountId = ptr.String(jtv) } - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err + case "Namespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) + } + sv.Namespace = ptr.String(jtv) } case "RequestId": @@ -20967,14 +21709,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(v **Updat return nil } -type awsRestjson1_deserializeOpUpdateDashboard struct { +type awsRestjson1_deserializeOpUpdateAccountSettings struct { } -func (*awsRestjson1_deserializeOpUpdateDashboard) ID() string { +func (*awsRestjson1_deserializeOpUpdateAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20988,11 +21730,16 @@ func (m *awsRestjson1_deserializeOpUpdateDashboard) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDashboard(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountSettings(response, &metadata) } - output := &UpdateDashboardOutput{} + output := &UpdateAccountSettingsOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -21011,7 +21758,7 @@ func (m *awsRestjson1_deserializeOpUpdateDashboard) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDashboardOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21024,7 +21771,7 @@ func (m *awsRestjson1_deserializeOpUpdateDashboard) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21065,8 +21812,8 @@ func awsRestjson1_deserializeOpErrorUpdateDashboard(response *smithyhttp.Respons } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -21074,18 +21821,15 @@ func awsRestjson1_deserializeOpErrorUpdateDashboard(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -21096,7 +21840,16 @@ func awsRestjson1_deserializeOpErrorUpdateDashboard(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentUpdateDashboardOutput(v **UpdateDashboardOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(v *UpdateAccountSettingsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAccountSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21109,42 +21862,15 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardOutput(v **UpdateDashboard return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDashboardOutput + var sv *UpdateAccountSettingsOutput if *v == nil { - sv = &UpdateDashboardOutput{} + sv = &UpdateAccountSettingsOutput{} } 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 Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "CreationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.CreationStatus = types.ResourceStatus(jtv) - } - - case "DashboardId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.DashboardId = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -21154,28 +21880,6 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardOutput(v **UpdateDashboard sv.RequestId = ptr.String(jtv) } - case "Status": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Status = int32(i64) - } - - case "VersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.VersionArn = ptr.String(jtv) - } - default: _, _ = key, value @@ -21185,14 +21889,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardOutput(v **UpdateDashboard return nil } -type awsRestjson1_deserializeOpUpdateDashboardPermissions struct { +type awsRestjson1_deserializeOpUpdateAnalysis struct { } -func (*awsRestjson1_deserializeOpUpdateDashboardPermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDashboardPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21206,12 +21910,12 @@ func (m *awsRestjson1_deserializeOpUpdateDashboardPermissions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDashboardPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysis(response, &metadata) } - output := &UpdateDashboardPermissionsOutput{} + output := &UpdateAnalysisOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21234,7 +21938,7 @@ func (m *awsRestjson1_deserializeOpUpdateDashboardPermissions) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21247,7 +21951,7 @@ func (m *awsRestjson1_deserializeOpUpdateDashboardPermissions) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDashboardPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21297,8 +22001,8 @@ func awsRestjson1_deserializeOpErrorUpdateDashboardPermissions(response *smithyh case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -21319,7 +22023,7 @@ func awsRestjson1_deserializeOpErrorUpdateDashboardPermissions(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPermissionsOutput(v *UpdateDashboardPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(v *UpdateAnalysisOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21328,7 +22032,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPermissionsOutput(v *U return nil } -func awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(v **UpdateDashboardPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21341,41 +22045,31 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(v **Upda return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDashboardPermissionsOutput + var sv *UpdateAnalysisOutput if *v == nil { - sv = &UpdateDashboardPermissionsOutput{} + sv = &UpdateAnalysisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardArn": + case "AnalysisId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.DashboardArn = ptr.String(jtv) + sv.AnalysisId = ptr.String(jtv) } - case "DashboardId": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DashboardId = ptr.String(jtv) - } - - case "LinkSharingConfiguration": - if err := awsRestjson1_deserializeDocumentLinkSharingConfiguration(&sv.LinkSharingConfiguration, value); err != nil { - return err - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err + sv.Arn = ptr.String(jtv) } case "RequestId": @@ -21387,6 +22081,15 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(v **Upda sv.RequestId = ptr.String(jtv) } + case "UpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.UpdateStatus = types.ResourceStatus(jtv) + } + default: _, _ = key, value @@ -21396,14 +22099,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(v **Upda return nil } -type awsRestjson1_deserializeOpUpdateDashboardPublishedVersion struct { +type awsRestjson1_deserializeOpUpdateAnalysisPermissions struct { } -func (*awsRestjson1_deserializeOpUpdateDashboardPublishedVersion) ID() string { +func (*awsRestjson1_deserializeOpUpdateAnalysisPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDashboardPublishedVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21417,12 +22120,12 @@ func (m *awsRestjson1_deserializeOpUpdateDashboardPublishedVersion) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDashboardPublishedVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response, &metadata) } - output := &UpdateDashboardPublishedVersionOutput{} + output := &UpdateAnalysisPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPublishedVersionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21445,7 +22148,7 @@ func (m *awsRestjson1_deserializeOpUpdateDashboardPublishedVersion) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDashboardPublishedVersionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21458,7 +22161,7 @@ func (m *awsRestjson1_deserializeOpUpdateDashboardPublishedVersion) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDashboardPublishedVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21508,6 +22211,9 @@ func awsRestjson1_deserializeOpErrorUpdateDashboardPublishedVersion(response *sm case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -21527,7 +22233,7 @@ func awsRestjson1_deserializeOpErrorUpdateDashboardPublishedVersion(response *sm } } -func awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPublishedVersionOutput(v *UpdateDashboardPublishedVersionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(v *UpdateAnalysisPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21536,7 +22242,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPublishedVersionOutput return nil } -func awsRestjson1_deserializeOpDocumentUpdateDashboardPublishedVersionOutput(v **UpdateDashboardPublishedVersionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(v **UpdateAnalysisPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21549,31 +22255,36 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardPublishedVersionOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDashboardPublishedVersionOutput + var sv *UpdateAnalysisPermissionsOutput if *v == nil { - sv = &UpdateDashboardPublishedVersionOutput{} + sv = &UpdateAnalysisPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardArn": + case "AnalysisArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DashboardArn = ptr.String(jtv) + sv.AnalysisArn = ptr.String(jtv) } - case "DashboardId": + case "AnalysisId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.DashboardId = ptr.String(jtv) + sv.AnalysisId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err } case "RequestId": @@ -21594,14 +22305,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardPublishedVersionOutput(v * return nil } -type awsRestjson1_deserializeOpUpdateDataSet struct { +type awsRestjson1_deserializeOpUpdateDashboard struct { } -func (*awsRestjson1_deserializeOpUpdateDataSet) ID() string { +func (*awsRestjson1_deserializeOpUpdateDashboard) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21615,16 +22326,11 @@ func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSet(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDashboard(response, &metadata) } - output := &UpdateDataSetOutput{} + output := &UpdateDashboardOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -21643,7 +22349,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDashboardOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21656,7 +22362,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21697,9 +22403,6 @@ func awsRestjson1_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -21731,16 +22434,7 @@ func awsRestjson1_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(v *UpdateDataSetOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDashboardOutput(v **UpdateDashboardOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21753,9 +22447,9 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDataSetOutput + var sv *UpdateDashboardOutput if *v == nil { - sv = &UpdateDataSetOutput{} + sv = &UpdateDashboardOutput{} } else { sv = *v } @@ -21771,40 +22465,53 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutp sv.Arn = ptr.String(jtv) } - case "DataSetId": + case "CreationStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) } - sv.DataSetId = ptr.String(jtv) + sv.CreationStatus = types.ResourceStatus(jtv) } - case "IngestionArn": + case "DashboardId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.IngestionArn = ptr.String(jtv) + sv.DashboardId = ptr.String(jtv) } - case "IngestionId": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.IngestionId = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + + case "VersionArn": 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 Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.VersionArn = ptr.String(jtv) } default: @@ -21816,14 +22523,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutp return nil } -type awsRestjson1_deserializeOpUpdateDataSetPermissions struct { +type awsRestjson1_deserializeOpUpdateDashboardPermissions struct { } -func (*awsRestjson1_deserializeOpUpdateDataSetPermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateDashboardPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDashboardPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21837,12 +22544,12 @@ func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDashboardPermissions(response, &metadata) } - output := &UpdateDataSetPermissionsOutput{} + output := &UpdateDashboardPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21865,7 +22572,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDataSetPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21878,7 +22585,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDashboardPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21919,9 +22626,6 @@ func awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response *smithyhtt } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -21931,12 +22635,18 @@ func awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response *smithyhtt case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -21947,7 +22657,7 @@ func awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetPermissionsOutput(v *UpdateDataSetPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPermissionsOutput(v *UpdateDashboardPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21956,7 +22666,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetPermissionsOutput(v *Upd return nil } -func awsRestjson1_deserializeOpDocumentUpdateDataSetPermissionsOutput(v **UpdateDataSetPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(v **UpdateDashboardPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21969,31 +22679,41 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSetPermissionsOutput(v **Update return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDataSetPermissionsOutput + var sv *UpdateDashboardPermissionsOutput if *v == nil { - sv = &UpdateDataSetPermissionsOutput{} + sv = &UpdateDashboardPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetArn": + case "DashboardArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DataSetArn = ptr.String(jtv) + sv.DashboardArn = ptr.String(jtv) } - case "DataSetId": + case "DashboardId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.DataSetId = ptr.String(jtv) + sv.DashboardId = ptr.String(jtv) + } + + case "LinkSharingConfiguration": + if err := awsRestjson1_deserializeDocumentLinkSharingConfiguration(&sv.LinkSharingConfiguration, value); err != nil { + return err + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err } case "RequestId": @@ -22014,14 +22734,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSetPermissionsOutput(v **Update return nil } -type awsRestjson1_deserializeOpUpdateDataSource struct { +type awsRestjson1_deserializeOpUpdateDashboardPublishedVersion struct { } -func (*awsRestjson1_deserializeOpUpdateDataSource) ID() string { +func (*awsRestjson1_deserializeOpUpdateDashboardPublishedVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDashboardPublishedVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22035,12 +22755,12 @@ func (m *awsRestjson1_deserializeOpUpdateDataSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDashboardPublishedVersion(response, &metadata) } - output := &UpdateDataSourceOutput{} + output := &UpdateDashboardPublishedVersionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPublishedVersionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22063,7 +22783,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDashboardPublishedVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22076,7 +22796,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSource) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDashboardPublishedVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22117,9 +22837,6 @@ func awsRestjson1_deserializeOpErrorUpdateDataSource(response *smithyhttp.Respon } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -22135,6 +22852,9 @@ func awsRestjson1_deserializeOpErrorUpdateDataSource(response *smithyhttp.Respon case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22145,7 +22865,7 @@ func awsRestjson1_deserializeOpErrorUpdateDataSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsUpdateDataSourceOutput(v *UpdateDataSourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateDashboardPublishedVersionOutput(v *UpdateDashboardPublishedVersionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22154,7 +22874,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateDataSourceOutput(v *UpdateDataS return nil } -func awsRestjson1_deserializeOpDocumentUpdateDataSourceOutput(v **UpdateDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDashboardPublishedVersionOutput(v **UpdateDashboardPublishedVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22167,31 +22887,31 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSourceOutput(v **UpdateDataSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDataSourceOutput + var sv *UpdateDashboardPublishedVersionOutput if *v == nil { - sv = &UpdateDataSourceOutput{} + sv = &UpdateDashboardPublishedVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": + case "DashboardArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.DashboardArn = ptr.String(jtv) } - case "DataSourceId": + case "DashboardId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.DataSourceId = ptr.String(jtv) + sv.DashboardId = ptr.String(jtv) } case "RequestId": @@ -22203,15 +22923,6 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSourceOutput(v **UpdateDataSour sv.RequestId = ptr.String(jtv) } - case "UpdateStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.UpdateStatus = types.ResourceStatus(jtv) - } - default: _, _ = key, value @@ -22221,14 +22932,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSourceOutput(v **UpdateDataSour return nil } -type awsRestjson1_deserializeOpUpdateDataSourcePermissions struct { +type awsRestjson1_deserializeOpUpdateDataSet struct { } -func (*awsRestjson1_deserializeOpUpdateDataSourcePermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateDataSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22242,12 +22953,12 @@ func (m *awsRestjson1_deserializeOpUpdateDataSourcePermissions) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSourcePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSet(response, &metadata) } - output := &UpdateDataSourcePermissionsOutput{} + output := &UpdateDataSetOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSourcePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22270,7 +22981,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSourcePermissions) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDataSourcePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22283,7 +22994,7 @@ func (m *awsRestjson1_deserializeOpUpdateDataSourcePermissions) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22336,12 +23047,18 @@ func awsRestjson1_deserializeOpErrorUpdateDataSourcePermissions(response *smithy case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22352,7 +23069,7 @@ func awsRestjson1_deserializeOpErrorUpdateDataSourcePermissions(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsUpdateDataSourcePermissionsOutput(v *UpdateDataSourcePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetOutput(v *UpdateDataSetOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22361,7 +23078,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateDataSourcePermissionsOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentUpdateDataSourcePermissionsOutput(v **UpdateDataSourcePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDataSetOutput(v **UpdateDataSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22374,31 +23091,49 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSourcePermissionsOutput(v **Upd return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDataSourcePermissionsOutput + var sv *UpdateDataSetOutput if *v == nil { - sv = &UpdateDataSourcePermissionsOutput{} + sv = &UpdateDataSetOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceArn": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DataSourceArn = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "DataSourceId": + case "DataSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.DataSourceId = ptr.String(jtv) + sv.DataSetId = ptr.String(jtv) + } + + case "IngestionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IngestionArn = ptr.String(jtv) + } + + case "IngestionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.IngestionId = ptr.String(jtv) } case "RequestId": @@ -22419,14 +23154,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDataSourcePermissionsOutput(v **Upd return nil } -type awsRestjson1_deserializeOpUpdateFolder struct { +type awsRestjson1_deserializeOpUpdateDataSetPermissions struct { } -func (*awsRestjson1_deserializeOpUpdateFolder) ID() string { +func (*awsRestjson1_deserializeOpUpdateDataSetPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22440,12 +23175,12 @@ func (m *awsRestjson1_deserializeOpUpdateFolder) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response, &metadata) } - output := &UpdateFolderOutput{} + output := &UpdateDataSetPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateFolderOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSetPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22468,7 +23203,7 @@ func (m *awsRestjson1_deserializeOpUpdateFolder) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDataSetPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22481,7 +23216,7 @@ func (m *awsRestjson1_deserializeOpUpdateFolder) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDataSetPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22534,18 +23269,12 @@ func awsRestjson1_deserializeOpErrorUpdateFolder(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22556,7 +23285,7 @@ func awsRestjson1_deserializeOpErrorUpdateFolder(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsUpdateFolderOutput(v *UpdateFolderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateDataSetPermissionsOutput(v *UpdateDataSetPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22565,7 +23294,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateFolderOutput(v *UpdateFolderOut return nil } -func awsRestjson1_deserializeOpDocumentUpdateFolderOutput(v **UpdateFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDataSetPermissionsOutput(v **UpdateDataSetPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22578,31 +23307,31 @@ func awsRestjson1_deserializeOpDocumentUpdateFolderOutput(v **UpdateFolderOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFolderOutput + var sv *UpdateDataSetPermissionsOutput if *v == nil { - sv = &UpdateFolderOutput{} + sv = &UpdateDataSetPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": + case "DataSetArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.DataSetArn = ptr.String(jtv) } - case "FolderId": + case "DataSetId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.FolderId = ptr.String(jtv) + sv.DataSetId = ptr.String(jtv) } case "RequestId": @@ -22623,14 +23352,14 @@ func awsRestjson1_deserializeOpDocumentUpdateFolderOutput(v **UpdateFolderOutput return nil } -type awsRestjson1_deserializeOpUpdateFolderPermissions struct { +type awsRestjson1_deserializeOpUpdateDataSource struct { } -func (*awsRestjson1_deserializeOpUpdateFolderPermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22644,11 +23373,16 @@ func (m *awsRestjson1_deserializeOpUpdateFolderPermissions) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFolderPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSource(response, &metadata) } - output := &UpdateFolderPermissionsOutput{} + output := &UpdateDataSourceOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSourceOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -22667,7 +23401,7 @@ func (m *awsRestjson1_deserializeOpUpdateFolderPermissions) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22680,7 +23414,7 @@ func (m *awsRestjson1_deserializeOpUpdateFolderPermissions) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateFolderPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22724,24 +23458,21 @@ func awsRestjson1_deserializeOpErrorUpdateFolderPermissions(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("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22752,7 +23483,16 @@ func awsRestjson1_deserializeOpErrorUpdateFolderPermissions(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(v **UpdateFolderPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateDataSourceOutput(v *UpdateDataSourceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateDataSourceOutput(v **UpdateDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22765,9 +23505,9 @@ func awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(v **UpdateF return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFolderPermissionsOutput + var sv *UpdateDataSourceOutput if *v == nil { - sv = &UpdateFolderPermissionsOutput{} + sv = &UpdateDataSourceOutput{} } else { sv = *v } @@ -22783,18 +23523,13 @@ func awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(v **UpdateF sv.Arn = ptr.String(jtv) } - case "FolderId": + case "DataSourceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.FolderId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err + sv.DataSourceId = ptr.String(jtv) } case "RequestId": @@ -22806,17 +23541,13 @@ func awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(v **UpdateF sv.RequestId = ptr.String(jtv) } - case "Status": + case "UpdateStatus": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) } - sv.Status = int32(i64) + sv.UpdateStatus = types.ResourceStatus(jtv) } default: @@ -22828,14 +23559,14 @@ func awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(v **UpdateF return nil } -type awsRestjson1_deserializeOpUpdateGroup struct { +type awsRestjson1_deserializeOpUpdateDataSourcePermissions struct { } -func (*awsRestjson1_deserializeOpUpdateGroup) ID() string { +func (*awsRestjson1_deserializeOpUpdateDataSourcePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22849,12 +23580,12 @@ func (m *awsRestjson1_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataSourcePermissions(response, &metadata) } - output := &UpdateGroupOutput{} + output := &UpdateDataSourcePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateGroupOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateDataSourcePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22877,7 +23608,7 @@ func (m *awsRestjson1_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDataSourcePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22890,7 +23621,7 @@ func (m *awsRestjson1_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22934,21 +23665,18 @@ func awsRestjson1_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -22962,7 +23690,7 @@ func awsRestjson1_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsUpdateGroupOutput(v *UpdateGroupOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateDataSourcePermissionsOutput(v *UpdateDataSourcePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22971,7 +23699,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateGroupOutput(v *UpdateGroupOutpu return nil } -func awsRestjson1_deserializeOpDocumentUpdateGroupOutput(v **UpdateGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDataSourcePermissionsOutput(v **UpdateDataSourcePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22984,18 +23712,31 @@ func awsRestjson1_deserializeOpDocumentUpdateGroupOutput(v **UpdateGroupOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateGroupOutput + var sv *UpdateDataSourcePermissionsOutput if *v == nil { - sv = &UpdateGroupOutput{} + sv = &UpdateDataSourcePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Group": - if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { - return err + case "DataSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSourceArn = ptr.String(jtv) + } + + case "DataSourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSourceId = ptr.String(jtv) } case "RequestId": @@ -23016,14 +23757,14 @@ func awsRestjson1_deserializeOpDocumentUpdateGroupOutput(v **UpdateGroupOutput, return nil } -type awsRestjson1_deserializeOpUpdateIAMPolicyAssignment struct { +type awsRestjson1_deserializeOpUpdateFolder struct { } -func (*awsRestjson1_deserializeOpUpdateIAMPolicyAssignment) ID() string { +func (*awsRestjson1_deserializeOpUpdateFolder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23037,12 +23778,12 @@ func (m *awsRestjson1_deserializeOpUpdateIAMPolicyAssignment) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateIAMPolicyAssignment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateFolder(response, &metadata) } - output := &UpdateIAMPolicyAssignmentOutput{} + output := &UpdateFolderOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateIAMPolicyAssignmentOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateFolderOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23065,7 +23806,7 @@ func (m *awsRestjson1_deserializeOpUpdateIAMPolicyAssignment) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateIAMPolicyAssignmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateFolderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23078,7 +23819,7 @@ func (m *awsRestjson1_deserializeOpUpdateIAMPolicyAssignment) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23122,8 +23863,8 @@ func awsRestjson1_deserializeOpErrorUpdateIAMPolicyAssignment(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConcurrentUpdatingException", errorCode): - return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -23140,6 +23881,9 @@ func awsRestjson1_deserializeOpErrorUpdateIAMPolicyAssignment(response *smithyht case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23150,7 +23894,7 @@ func awsRestjson1_deserializeOpErrorUpdateIAMPolicyAssignment(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsUpdateIAMPolicyAssignmentOutput(v *UpdateIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateFolderOutput(v *UpdateFolderOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23159,7 +23903,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateIAMPolicyAssignmentOutput(v *Up return nil } -func awsRestjson1_deserializeOpDocumentUpdateIAMPolicyAssignmentOutput(v **UpdateIAMPolicyAssignmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateFolderOutput(v **UpdateFolderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23172,54 +23916,31 @@ func awsRestjson1_deserializeOpDocumentUpdateIAMPolicyAssignmentOutput(v **Updat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateIAMPolicyAssignmentOutput + var sv *UpdateFolderOutput if *v == nil { - sv = &UpdateIAMPolicyAssignmentOutput{} + sv = &UpdateFolderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AssignmentId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AssignmentId = ptr.String(jtv) - } - - case "AssignmentName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IAMPolicyAssignmentName to be of type string, got %T instead", value) - } - sv.AssignmentName = ptr.String(jtv) - } - - case "AssignmentStatus": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AssignmentStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AssignmentStatus = types.AssignmentStatus(jtv) - } - - case "Identities": - if err := awsRestjson1_deserializeDocumentIdentityMap(&sv.Identities, value); err != nil { - return err + sv.Arn = ptr.String(jtv) } - case "PolicyArn": + case "FolderId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) } - sv.PolicyArn = ptr.String(jtv) + sv.FolderId = ptr.String(jtv) } case "RequestId": @@ -23240,14 +23961,14 @@ func awsRestjson1_deserializeOpDocumentUpdateIAMPolicyAssignmentOutput(v **Updat return nil } -type awsRestjson1_deserializeOpUpdateIpRestriction struct { +type awsRestjson1_deserializeOpUpdateFolderPermissions struct { } -func (*awsRestjson1_deserializeOpUpdateIpRestriction) ID() string { +func (*awsRestjson1_deserializeOpUpdateFolderPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateIpRestriction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23261,16 +23982,11 @@ func (m *awsRestjson1_deserializeOpUpdateIpRestriction) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateIpRestriction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateFolderPermissions(response, &metadata) } - output := &UpdateIpRestrictionOutput{} + output := &UpdateFolderPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateIpRestrictionOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -23289,7 +24005,7 @@ func (m *awsRestjson1_deserializeOpUpdateIpRestriction) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateIpRestrictionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23302,7 +24018,7 @@ func (m *awsRestjson1_deserializeOpUpdateIpRestriction) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateIpRestriction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateFolderPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23361,6 +24077,9 @@ func awsRestjson1_deserializeOpErrorUpdateIpRestriction(response *smithyhttp.Res case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23371,16 +24090,7 @@ func awsRestjson1_deserializeOpErrorUpdateIpRestriction(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsUpdateIpRestrictionOutput(v *UpdateIpRestrictionOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentUpdateIpRestrictionOutput(v **UpdateIpRestrictionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateFolderPermissionsOutput(v **UpdateFolderPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23393,22 +24103,36 @@ func awsRestjson1_deserializeOpDocumentUpdateIpRestrictionOutput(v **UpdateIpRes return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateIpRestrictionOutput + var sv *UpdateFolderPermissionsOutput if *v == nil { - sv = &UpdateIpRestrictionOutput{} + sv = &UpdateFolderPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsAccountId": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AwsAccountId = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "FolderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + } + sv.FolderId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err } case "RequestId": @@ -23420,6 +24144,19 @@ func awsRestjson1_deserializeOpDocumentUpdateIpRestrictionOutput(v **UpdateIpRes sv.RequestId = ptr.String(jtv) } + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + default: _, _ = key, value @@ -23429,14 +24166,14 @@ func awsRestjson1_deserializeOpDocumentUpdateIpRestrictionOutput(v **UpdateIpRes return nil } -type awsRestjson1_deserializeOpUpdatePublicSharingSettings struct { +type awsRestjson1_deserializeOpUpdateGroup struct { } -func (*awsRestjson1_deserializeOpUpdatePublicSharingSettings) ID() string { +func (*awsRestjson1_deserializeOpUpdateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdatePublicSharingSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23450,12 +24187,12 @@ func (m *awsRestjson1_deserializeOpUpdatePublicSharingSettings) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePublicSharingSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateGroup(response, &metadata) } - output := &UpdatePublicSharingSettingsOutput{} + output := &UpdateGroupOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdatePublicSharingSettingsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateGroupOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23478,7 +24215,7 @@ func (m *awsRestjson1_deserializeOpUpdatePublicSharingSettings) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdatePublicSharingSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23491,7 +24228,7 @@ func (m *awsRestjson1_deserializeOpUpdatePublicSharingSettings) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdatePublicSharingSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23541,15 +24278,18 @@ func awsRestjson1_deserializeOpErrorUpdatePublicSharingSettings(response *smithy case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedPricingPlanException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23560,7 +24300,7 @@ func awsRestjson1_deserializeOpErrorUpdatePublicSharingSettings(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsUpdatePublicSharingSettingsOutput(v *UpdatePublicSharingSettingsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateGroupOutput(v *UpdateGroupOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23569,7 +24309,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdatePublicSharingSettingsOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentUpdatePublicSharingSettingsOutput(v **UpdatePublicSharingSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateGroupOutput(v **UpdateGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23582,15 +24322,20 @@ func awsRestjson1_deserializeOpDocumentUpdatePublicSharingSettingsOutput(v **Upd return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdatePublicSharingSettingsOutput + var sv *UpdateGroupOutput if *v == nil { - sv = &UpdatePublicSharingSettingsOutput{} + sv = &UpdateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Group": + if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { + return err + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -23609,14 +24354,14 @@ func awsRestjson1_deserializeOpDocumentUpdatePublicSharingSettingsOutput(v **Upd return nil } -type awsRestjson1_deserializeOpUpdateTemplate struct { +type awsRestjson1_deserializeOpUpdateIAMPolicyAssignment struct { } -func (*awsRestjson1_deserializeOpUpdateTemplate) ID() string { +func (*awsRestjson1_deserializeOpUpdateIAMPolicyAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23630,12 +24375,12 @@ func (m *awsRestjson1_deserializeOpUpdateTemplate) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateIAMPolicyAssignment(response, &metadata) } - output := &UpdateTemplateOutput{} + output := &UpdateIAMPolicyAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateTemplateOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateIAMPolicyAssignmentOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23658,7 +24403,7 @@ func (m *awsRestjson1_deserializeOpUpdateTemplate) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateIAMPolicyAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23671,7 +24416,7 @@ func (m *awsRestjson1_deserializeOpUpdateTemplate) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23712,8 +24457,11 @@ func awsRestjson1_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConcurrentUpdatingException", errorCode): + return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -23721,9 +24469,6 @@ func awsRestjson1_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) @@ -23733,9 +24478,6 @@ func awsRestjson1_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23746,7 +24488,7 @@ func awsRestjson1_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsUpdateTemplateOutput(v *UpdateTemplateOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateIAMPolicyAssignmentOutput(v *UpdateIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23755,7 +24497,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateTemplateOutput(v *UpdateTemplat return nil } -func awsRestjson1_deserializeOpDocumentUpdateTemplateOutput(v **UpdateTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateIAMPolicyAssignmentOutput(v **UpdateIAMPolicyAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23768,58 +24510,63 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplateOutput(v **UpdateTemplateOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateTemplateOutput + var sv *UpdateIAMPolicyAssignmentOutput if *v == nil { - sv = &UpdateTemplateOutput{} + sv = &UpdateIAMPolicyAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": + case "AssignmentId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.AssignmentId = ptr.String(jtv) } - case "CreationStatus": + case "AssignmentName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected IAMPolicyAssignmentName to be of type string, got %T instead", value) } - sv.CreationStatus = types.ResourceStatus(jtv) + sv.AssignmentName = ptr.String(jtv) } - case "RequestId": + case "AssignmentStatus": 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 AssignmentStatus to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.AssignmentStatus = types.AssignmentStatus(jtv) } - case "TemplateId": + case "Identities": + if err := awsRestjson1_deserializeDocumentIdentityMap(&sv.Identities, value); err != nil { + return err + } + + case "PolicyArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.TemplateId = ptr.String(jtv) + sv.PolicyArn = ptr.String(jtv) } - case "VersionArn": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.VersionArn = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } default: @@ -23831,14 +24578,14 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplateOutput(v **UpdateTemplateOu return nil } -type awsRestjson1_deserializeOpUpdateTemplateAlias struct { +type awsRestjson1_deserializeOpUpdateIpRestriction struct { } -func (*awsRestjson1_deserializeOpUpdateTemplateAlias) ID() string { +func (*awsRestjson1_deserializeOpUpdateIpRestriction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateIpRestriction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23852,12 +24599,12 @@ func (m *awsRestjson1_deserializeOpUpdateTemplateAlias) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTemplateAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateIpRestriction(response, &metadata) } - output := &UpdateTemplateAliasOutput{} + output := &UpdateIpRestrictionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateTemplateAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateIpRestrictionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23880,7 +24627,7 @@ func (m *awsRestjson1_deserializeOpUpdateTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateTemplateAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateIpRestrictionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23893,7 +24640,7 @@ func (m *awsRestjson1_deserializeOpUpdateTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateIpRestriction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23934,21 +24681,24 @@ func awsRestjson1_deserializeOpErrorUpdateTemplateAlias(response *smithyhttp.Res } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23959,7 +24709,7 @@ func awsRestjson1_deserializeOpErrorUpdateTemplateAlias(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsUpdateTemplateAliasOutput(v *UpdateTemplateAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateIpRestrictionOutput(v *UpdateIpRestrictionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23968,7 +24718,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateTemplateAliasOutput(v *UpdateTe return nil } -func awsRestjson1_deserializeOpDocumentUpdateTemplateAliasOutput(v **UpdateTemplateAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateIpRestrictionOutput(v **UpdateIpRestrictionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23981,15 +24731,24 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplateAliasOutput(v **UpdateTempl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateTemplateAliasOutput + var sv *UpdateIpRestrictionOutput if *v == nil { - sv = &UpdateTemplateAliasOutput{} + sv = &UpdateIpRestrictionOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -23999,11 +24758,6 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplateAliasOutput(v **UpdateTempl sv.RequestId = ptr.String(jtv) } - case "TemplateAlias": - if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { - return err - } - default: _, _ = key, value @@ -24013,14 +24767,14 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplateAliasOutput(v **UpdateTempl return nil } -type awsRestjson1_deserializeOpUpdateTemplatePermissions struct { +type awsRestjson1_deserializeOpUpdatePublicSharingSettings struct { } -func (*awsRestjson1_deserializeOpUpdateTemplatePermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdatePublicSharingSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTemplatePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePublicSharingSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24034,12 +24788,12 @@ func (m *awsRestjson1_deserializeOpUpdateTemplatePermissions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTemplatePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePublicSharingSettings(response, &metadata) } - output := &UpdateTemplatePermissionsOutput{} + output := &UpdatePublicSharingSettingsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateTemplatePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdatePublicSharingSettingsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24062,7 +24816,7 @@ func (m *awsRestjson1_deserializeOpUpdateTemplatePermissions) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateTemplatePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdatePublicSharingSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24075,7 +24829,7 @@ func (m *awsRestjson1_deserializeOpUpdateTemplatePermissions) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTemplatePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdatePublicSharingSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24116,8 +24870,8 @@ func awsRestjson1_deserializeOpErrorUpdateTemplatePermissions(response *smithyht } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -24125,17 +24879,14 @@ func awsRestjson1_deserializeOpErrorUpdateTemplatePermissions(response *smithyht case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -24147,7 +24898,7 @@ func awsRestjson1_deserializeOpErrorUpdateTemplatePermissions(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsUpdateTemplatePermissionsOutput(v *UpdateTemplatePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdatePublicSharingSettingsOutput(v *UpdatePublicSharingSettingsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24156,7 +24907,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateTemplatePermissionsOutput(v *Up return nil } -func awsRestjson1_deserializeOpDocumentUpdateTemplatePermissionsOutput(v **UpdateTemplatePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdatePublicSharingSettingsOutput(v **UpdatePublicSharingSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24169,20 +24920,15 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplatePermissionsOutput(v **Updat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateTemplatePermissionsOutput + var sv *UpdatePublicSharingSettingsOutput if *v == nil { - sv = &UpdateTemplatePermissionsOutput{} + sv = &UpdatePublicSharingSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -24192,24 +24938,6 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplatePermissionsOutput(v **Updat sv.RequestId = ptr.String(jtv) } - case "TemplateArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.TemplateArn = ptr.String(jtv) - } - - case "TemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) - } - default: _, _ = key, value @@ -24219,14 +24947,14 @@ func awsRestjson1_deserializeOpDocumentUpdateTemplatePermissionsOutput(v **Updat return nil } -type awsRestjson1_deserializeOpUpdateTheme struct { +type awsRestjson1_deserializeOpUpdateRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpUpdateTheme) ID() string { +func (*awsRestjson1_deserializeOpUpdateRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24240,12 +24968,12 @@ func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTheme(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRefreshSchedule(response, &metadata) } - output := &UpdateThemeOutput{} + output := &UpdateRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateThemeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24268,7 +24996,7 @@ func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateThemeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24281,7 +25009,7 @@ func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24334,8 +25062,8 @@ func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, m case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -24343,9 +25071,6 @@ func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, m case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -24356,7 +25081,7 @@ func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsUpdateThemeOutput(v *UpdateThemeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateRefreshScheduleOutput(v *UpdateRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24365,7 +25090,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateThemeOutput(v *UpdateThemeOutpu return nil } -func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateRefreshScheduleOutput(v **UpdateRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24378,9 +25103,9 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateThemeOutput + var sv *UpdateRefreshScheduleOutput if *v == nil { - sv = &UpdateThemeOutput{} + sv = &UpdateRefreshScheduleOutput{} } else { sv = *v } @@ -24396,15 +25121,6 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, sv.Arn = ptr.String(jtv) } - case "CreationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.CreationStatus = types.ResourceStatus(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -24414,22 +25130,13 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, sv.RequestId = ptr.String(jtv) } - case "ThemeId": + case "ScheduleId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.ThemeId = ptr.String(jtv) - } - - case "VersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.VersionArn = ptr.String(jtv) + sv.ScheduleId = ptr.String(jtv) } default: @@ -24441,14 +25148,14 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, return nil } -type awsRestjson1_deserializeOpUpdateThemeAlias struct { +type awsRestjson1_deserializeOpUpdateTemplate struct { } -func (*awsRestjson1_deserializeOpUpdateThemeAlias) ID() string { +func (*awsRestjson1_deserializeOpUpdateTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24462,12 +25169,12 @@ func (m *awsRestjson1_deserializeOpUpdateThemeAlias) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateThemeAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTemplate(response, &metadata) } - output := &UpdateThemeAliasOutput{} + output := &UpdateTemplateOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateThemeAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateTemplateOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24490,7 +25197,7 @@ func (m *awsRestjson1_deserializeOpUpdateThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateThemeAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24503,7 +25210,7 @@ func (m *awsRestjson1_deserializeOpUpdateThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24553,6 +25260,9 @@ func awsRestjson1_deserializeOpErrorUpdateThemeAlias(response *smithyhttp.Respon case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) @@ -24575,7 +25285,7 @@ func awsRestjson1_deserializeOpErrorUpdateThemeAlias(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsUpdateThemeAliasOutput(v *UpdateThemeAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateTemplateOutput(v *UpdateTemplateOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24584,7 +25294,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateThemeAliasOutput(v *UpdateTheme return nil } -func awsRestjson1_deserializeOpDocumentUpdateThemeAliasOutput(v **UpdateThemeAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateTemplateOutput(v **UpdateTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24597,15 +25307,33 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeAliasOutput(v **UpdateThemeAli return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateThemeAliasOutput + var sv *UpdateTemplateOutput if *v == nil { - sv = &UpdateThemeAliasOutput{} + sv = &UpdateTemplateOutput{} } 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 Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.CreationStatus = types.ResourceStatus(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -24615,9 +25343,22 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeAliasOutput(v **UpdateThemeAli sv.RequestId = ptr.String(jtv) } - case "ThemeAlias": - if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { - return err + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + case "VersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.VersionArn = ptr.String(jtv) } default: @@ -24629,14 +25370,14 @@ func awsRestjson1_deserializeOpDocumentUpdateThemeAliasOutput(v **UpdateThemeAli return nil } -type awsRestjson1_deserializeOpUpdateThemePermissions struct { +type awsRestjson1_deserializeOpUpdateTemplateAlias struct { } -func (*awsRestjson1_deserializeOpUpdateThemePermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateTemplateAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateThemePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24650,12 +25391,12 @@ func (m *awsRestjson1_deserializeOpUpdateThemePermissions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateThemePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTemplateAlias(response, &metadata) } - output := &UpdateThemePermissionsOutput{} + output := &UpdateTemplateAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateTemplateAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24678,7 +25419,7 @@ func (m *awsRestjson1_deserializeOpUpdateThemePermissions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateTemplateAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24691,7 +25432,7 @@ func (m *awsRestjson1_deserializeOpUpdateThemePermissions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateThemePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24732,18 +25473,12 @@ func awsRestjson1_deserializeOpErrorUpdateThemePermissions(response *smithyhttp. } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -24763,7 +25498,7 @@ func awsRestjson1_deserializeOpErrorUpdateThemePermissions(response *smithyhttp. } } -func awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(v *UpdateThemePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateTemplateAliasOutput(v *UpdateTemplateAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24772,7 +25507,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(v *Updat return nil } -func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateThemePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateTemplateAliasOutput(v **UpdateTemplateAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24785,20 +25520,15 @@ func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateTh return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateThemePermissionsOutput + var sv *UpdateTemplateAliasOutput if *v == nil { - sv = &UpdateThemePermissionsOutput{} + sv = &UpdateTemplateAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -24808,22 +25538,9 @@ func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateTh sv.RequestId = ptr.String(jtv) } - case "ThemeArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.ThemeArn = ptr.String(jtv) - } - - case "ThemeId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.ThemeId = ptr.String(jtv) + case "TemplateAlias": + if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { + return err } default: @@ -24835,14 +25552,14 @@ func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateTh return nil } -type awsRestjson1_deserializeOpUpdateUser struct { +type awsRestjson1_deserializeOpUpdateTemplatePermissions struct { } -func (*awsRestjson1_deserializeOpUpdateUser) ID() string { +func (*awsRestjson1_deserializeOpUpdateTemplatePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateTemplatePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24856,12 +25573,834 @@ func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTemplatePermissions(response, &metadata) } - output := &UpdateUserOutput{} + output := &UpdateTemplatePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateTemplatePermissionsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentUpdateTemplatePermissionsOutput(&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_deserializeOpErrorUpdateTemplatePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUpdateTemplatePermissionsOutput(v *UpdateTemplatePermissionsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateTemplatePermissionsOutput(v **UpdateTemplatePermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateTemplatePermissionsOutput + if *v == nil { + sv = &UpdateTemplatePermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "TemplateArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.TemplateArn = ptr.String(jtv) + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateTheme struct { +} + +func (*awsRestjson1_deserializeOpUpdateTheme) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTheme(response, &metadata) + } + output := &UpdateThemeOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateThemeOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentUpdateThemeOutput(&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_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUpdateThemeOutput(v *UpdateThemeOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateThemeOutput + if *v == nil { + sv = &UpdateThemeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.CreationStatus = types.ResourceStatus(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "ThemeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.ThemeId = ptr.String(jtv) + } + + case "VersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.VersionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateThemeAlias struct { +} + +func (*awsRestjson1_deserializeOpUpdateThemeAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateThemeAlias) HandleDeserialize(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_deserializeOpErrorUpdateThemeAlias(response, &metadata) + } + output := &UpdateThemeAliasOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateThemeAliasOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentUpdateThemeAliasOutput(&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_deserializeOpErrorUpdateThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUpdateThemeAliasOutput(v *UpdateThemeAliasOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateThemeAliasOutput(v **UpdateThemeAliasOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateThemeAliasOutput + if *v == nil { + sv = &UpdateThemeAliasOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "ThemeAlias": + if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateThemePermissions struct { +} + +func (*awsRestjson1_deserializeOpUpdateThemePermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateThemePermissions) HandleDeserialize(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_deserializeOpErrorUpdateThemePermissions(response, &metadata) + } + output := &UpdateThemePermissionsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + 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_deserializeOpDocumentUpdateThemePermissionsOutput(&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_deserializeOpErrorUpdateThemePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(v *UpdateThemePermissionsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateThemePermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateThemePermissionsOutput + if *v == nil { + sv = &UpdateThemePermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "ThemeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ThemeArn = ptr.String(jtv) + } + + case "ThemeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.ThemeId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateUser struct { +} + +func (*awsRestjson1_deserializeOpUpdateUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(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_deserializeOpErrorUpdateUser(response, &metadata) + } + output := &UpdateUserOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -34811,6 +36350,42 @@ func awsRestjson1_deserializeDocumentDataSetIdentifierDeclarationList(v *[]types return nil } +func awsRestjson1_deserializeDocumentDataSetRefreshProperties(v **types.DataSetRefreshProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.DataSetRefreshProperties + if *v == nil { + sv = &types.DataSetRefreshProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RefreshConfiguration": + if err := awsRestjson1_deserializeDocumentRefreshConfiguration(&sv.RefreshConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDataSetSchema(v **types.DataSetSchema, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44288,6 +45863,42 @@ func awsRestjson1_deserializeDocumentIdentityTypeNotSupportedException(v **types return nil } +func awsRestjson1_deserializeDocumentIncrementalRefresh(v **types.IncrementalRefresh, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IncrementalRefresh + if *v == nil { + sv = &types.IncrementalRefresh{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LookbackWindow": + if err := awsRestjson1_deserializeDocumentLookbackWindow(&sv.LookbackWindow, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentIngestion(v **types.Ingestion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -47073,6 +48684,68 @@ func awsRestjson1_deserializeDocumentLongFormatText(v **types.LongFormatText, va return nil } +func awsRestjson1_deserializeDocumentLookbackWindow(v **types.LookbackWindow, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LookbackWindow + if *v == nil { + sv = &types.LookbackWindow{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ColumnName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ColumnName = ptr.String(jtv) + } + + case "Size": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Size = i64 + } + + case "SizeUnit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LookbackWindowSizeUnit to be of type string, got %T instead", value) + } + sv.SizeUnit = types.LookbackWindowSizeUnit(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentManifestFileLocation(v **types.ManifestFileLocation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -53490,6 +55163,218 @@ func awsRestjson1_deserializeDocumentReferenceLineValueLabelConfiguration(v **ty return nil } +func awsRestjson1_deserializeDocumentRefreshConfiguration(v **types.RefreshConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RefreshConfiguration + if *v == nil { + sv = &types.RefreshConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "IncrementalRefresh": + if err := awsRestjson1_deserializeDocumentIncrementalRefresh(&sv.IncrementalRefresh, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRefreshFrequency(v **types.RefreshFrequency, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RefreshFrequency + if *v == nil { + sv = &types.RefreshFrequency{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Interval": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RefreshInterval to be of type string, got %T instead", value) + } + sv.Interval = types.RefreshInterval(jtv) + } + + case "RefreshOnDay": + if err := awsRestjson1_deserializeDocumentScheduleRefreshOnEntity(&sv.RefreshOnDay, value); err != nil { + return err + } + + case "TimeOfTheDay": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TimeOfTheDay = ptr.String(jtv) + } + + case "Timezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Timezone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRefreshSchedule(v **types.RefreshSchedule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RefreshSchedule + if *v == nil { + sv = &types.RefreshSchedule{} + } 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 Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "RefreshType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestionType to be of type string, got %T instead", value) + } + sv.RefreshType = types.IngestionType(jtv) + } + + case "ScheduleFrequency": + if err := awsRestjson1_deserializeDocumentRefreshFrequency(&sv.ScheduleFrequency, value); err != nil { + return err + } + + case "ScheduleId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ScheduleId = ptr.String(jtv) + } + + case "StartAfterDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartAfterDateTime = 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_deserializeDocumentRefreshSchedules(v *[]types.RefreshSchedule, 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.RefreshSchedule + if *v == nil { + cv = []types.RefreshSchedule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RefreshSchedule + destAddr := &col + if err := awsRestjson1_deserializeDocumentRefreshSchedule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentRelationalTable(v **types.RelationalTable, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -54329,6 +56214,11 @@ func awsRestjson1_deserializeDocumentRowLevelPermissionTagConfiguration(v **type sv.Status = types.Status(jtv) } + case "TagRuleConfigurations": + if err := awsRestjson1_deserializeDocumentRowLevelPermissionTagRuleConfigurationList(&sv.TagRuleConfigurations, value); err != nil { + return err + } + case "TagRules": if err := awsRestjson1_deserializeDocumentRowLevelPermissionTagRuleList(&sv.TagRules, value); err != nil { return err @@ -54410,6 +56300,74 @@ func awsRestjson1_deserializeDocumentRowLevelPermissionTagRule(v **types.RowLeve return nil } +func awsRestjson1_deserializeDocumentRowLevelPermissionTagRuleConfiguration(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 SessionTagKey to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRowLevelPermissionTagRuleConfigurationList(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_deserializeDocumentRowLevelPermissionTagRuleConfiguration(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentRowLevelPermissionTagRuleList(v *[]types.RowLevelPermissionTagRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -55131,6 +57089,55 @@ func awsRestjson1_deserializeDocumentScatterPlotVisual(v **types.ScatterPlotVisu return nil } +func awsRestjson1_deserializeDocumentScheduleRefreshOnEntity(v **types.ScheduleRefreshOnEntity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ScheduleRefreshOnEntity + if *v == nil { + sv = &types.ScheduleRefreshOnEntity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DayOfMonth": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DayOfMonth to be of type string, got %T instead", value) + } + sv.DayOfMonth = ptr.String(jtv) + } + + case "DayOfWeek": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DayOfWeek to be of type string, got %T instead", value) + } + sv.DayOfWeek = types.DayOfWeek(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentScrollBarOptions(v **types.ScrollBarOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/quicksight/generated.json b/service/quicksight/generated.json index 89ee31a8f87..a1f479de782 100644 --- a/service/quicksight/generated.json +++ b/service/quicksight/generated.json @@ -22,6 +22,7 @@ "api_op_CreateIAMPolicyAssignment.go", "api_op_CreateIngestion.go", "api_op_CreateNamespace.go", + "api_op_CreateRefreshSchedule.go", "api_op_CreateTemplate.go", "api_op_CreateTemplateAlias.go", "api_op_CreateTheme.go", @@ -31,6 +32,7 @@ "api_op_DeleteAnalysis.go", "api_op_DeleteDashboard.go", "api_op_DeleteDataSet.go", + "api_op_DeleteDataSetRefreshProperties.go", "api_op_DeleteDataSource.go", "api_op_DeleteFolder.go", "api_op_DeleteFolderMembership.go", @@ -38,6 +40,7 @@ "api_op_DeleteGroupMembership.go", "api_op_DeleteIAMPolicyAssignment.go", "api_op_DeleteNamespace.go", + "api_op_DeleteRefreshSchedule.go", "api_op_DeleteTemplate.go", "api_op_DeleteTemplateAlias.go", "api_op_DeleteTheme.go", @@ -55,6 +58,7 @@ "api_op_DescribeDashboardPermissions.go", "api_op_DescribeDataSet.go", "api_op_DescribeDataSetPermissions.go", + "api_op_DescribeDataSetRefreshProperties.go", "api_op_DescribeDataSource.go", "api_op_DescribeDataSourcePermissions.go", "api_op_DescribeFolder.go", @@ -66,6 +70,7 @@ "api_op_DescribeIngestion.go", "api_op_DescribeIpRestriction.go", "api_op_DescribeNamespace.go", + "api_op_DescribeRefreshSchedule.go", "api_op_DescribeTemplate.go", "api_op_DescribeTemplateAlias.go", "api_op_DescribeTemplateDefinition.go", @@ -91,6 +96,7 @@ "api_op_ListIAMPolicyAssignmentsForUser.go", "api_op_ListIngestions.go", "api_op_ListNamespaces.go", + "api_op_ListRefreshSchedules.go", "api_op_ListTagsForResource.go", "api_op_ListTemplateAliases.go", "api_op_ListTemplateVersions.go", @@ -100,6 +106,7 @@ "api_op_ListThemes.go", "api_op_ListUserGroups.go", "api_op_ListUsers.go", + "api_op_PutDataSetRefreshProperties.go", "api_op_RegisterUser.go", "api_op_RestoreAnalysis.go", "api_op_SearchAnalyses.go", @@ -127,6 +134,7 @@ "api_op_UpdateIAMPolicyAssignment.go", "api_op_UpdateIpRestriction.go", "api_op_UpdatePublicSharingSettings.go", + "api_op_UpdateRefreshSchedule.go", "api_op_UpdateTemplate.go", "api_op_UpdateTemplateAlias.go", "api_op_UpdateTemplatePermissions.go", diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index 5fcfea5701b..0337a8ea2f6 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -1583,6 +1583,98 @@ func awsRestjson1_serializeOpDocumentCreateNamespaceInput(v *CreateNamespaceInpu return nil } +type awsRestjson1_serializeOpCreateRefreshSchedule struct { +} + +func (*awsRestjson1_serializeOpCreateRefreshSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateRefreshSchedule) 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.(*CreateRefreshScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateRefreshScheduleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateRefreshScheduleInput(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_serializeOpHttpBindingsCreateRefreshScheduleInput(v *CreateRefreshScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateRefreshScheduleInput(v *CreateRefreshScheduleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Schedule != nil { + ok := object.Key("Schedule") + if err := awsRestjson1_serializeDocumentRefreshSchedule(v.Schedule, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateTemplate struct { } @@ -2358,6 +2450,73 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDataSetInput(v *DeleteDataSetInpu return nil } +type awsRestjson1_serializeOpDeleteDataSetRefreshProperties struct { +} + +func (*awsRestjson1_serializeOpDeleteDataSetRefreshProperties) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDataSetRefreshProperties) 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.(*DeleteDataSetRefreshPropertiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(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_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(v *DeleteDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteDataSource struct { } @@ -2881,6 +3040,82 @@ func awsRestjson1_serializeOpHttpBindingsDeleteNamespaceInput(v *DeleteNamespace return nil } +type awsRestjson1_serializeOpDeleteRefreshSchedule struct { +} + +func (*awsRestjson1_serializeOpDeleteRefreshSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteRefreshSchedule) 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.(*DeleteRefreshScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules/{ScheduleId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteRefreshScheduleInput(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_serializeOpHttpBindingsDeleteRefreshScheduleInput(v *DeleteRefreshScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + if v.ScheduleId == nil || len(*v.ScheduleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ScheduleId must not be empty")} + } + if v.ScheduleId != nil { + if err := encoder.SetURI("ScheduleId").String(*v.ScheduleId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteTemplate struct { } @@ -4061,6 +4296,73 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSetPermissionsInput(v *Desc return nil } +type awsRestjson1_serializeOpDescribeDataSetRefreshProperties struct { +} + +func (*awsRestjson1_serializeOpDescribeDataSetRefreshProperties) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDataSetRefreshProperties) 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.(*DescribeDataSetRefreshPropertiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(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_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(v *DescribeDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeDataSource struct { } @@ -4834,6 +5136,82 @@ func awsRestjson1_serializeOpHttpBindingsDescribeNamespaceInput(v *DescribeNames return nil } +type awsRestjson1_serializeOpDescribeRefreshSchedule struct { +} + +func (*awsRestjson1_serializeOpDescribeRefreshSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeRefreshSchedule) 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.(*DescribeRefreshScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules/{ScheduleId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeRefreshScheduleInput(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_serializeOpHttpBindingsDescribeRefreshScheduleInput(v *DescribeRefreshScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + if v.ScheduleId == nil || len(*v.ScheduleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ScheduleId must not be empty")} + } + if v.ScheduleId != nil { + if err := encoder.SetURI("ScheduleId").String(*v.ScheduleId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeTemplate struct { } @@ -6768,6 +7146,73 @@ func awsRestjson1_serializeOpHttpBindingsListNamespacesInput(v *ListNamespacesIn return nil } +type awsRestjson1_serializeOpListRefreshSchedules struct { +} + +func (*awsRestjson1_serializeOpListRefreshSchedules) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRefreshSchedules) 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.(*ListRefreshSchedulesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListRefreshSchedulesInput(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_serializeOpHttpBindingsListRefreshSchedulesInput(v *ListRefreshSchedulesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListTagsForResource struct { } @@ -7292,7 +7737,91 @@ func (m *awsRestjson1_serializeOpListUserGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(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_serializeOpHttpBindingsListUserGroupsInput(v *ListUserGroupsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.UserName == nil || len(*v.UserName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} + } + if v.UserName != nil { + if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListUsers struct { +} + +func (*awsRestjson1_serializeOpListUsers) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListUsersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListUsersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7303,7 +7832,7 @@ func (m *awsRestjson1_serializeOpListUserGroups) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(v *ListUserGroupsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7334,26 +7863,17 @@ func awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(v *ListUserGroupsIn encoder.SetQuery("next-token").String(*v.NextToken) } - if v.UserName == nil || len(*v.UserName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} - } - if v.UserName != nil { - if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpListUsers struct { +type awsRestjson1_serializeOpPutDataSetRefreshProperties struct { } -func (*awsRestjson1_serializeOpListUsers) ID() string { +func (*awsRestjson1_serializeOpPutDataSetRefreshProperties) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpPutDataSetRefreshProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -7361,22 +7881,33 @@ func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListUsersInput) + input, ok := in.Parameters.(*PutDataSetRefreshPropertiesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListUsersInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsPutDataSetRefreshPropertiesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutDataSetRefreshPropertiesInput(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} } @@ -7387,7 +7918,7 @@ func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsPutDataSetRefreshPropertiesInput(v *PutDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7401,21 +7932,27 @@ func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encod } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { return err } } - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) + return nil +} + +func awsRestjson1_serializeOpDocumentPutDataSetRefreshPropertiesInput(v *PutDataSetRefreshPropertiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DataSetRefreshProperties != nil { + ok := object.Key("DataSetRefreshProperties") + if err := awsRestjson1_serializeDocumentDataSetRefreshProperties(v.DataSetRefreshProperties, ok); err != nil { + return err + } } return nil @@ -10080,6 +10617,98 @@ func awsRestjson1_serializeOpDocumentUpdatePublicSharingSettingsInput(v *UpdateP return nil } +type awsRestjson1_serializeOpUpdateRefreshSchedule struct { +} + +func (*awsRestjson1_serializeOpUpdateRefreshSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateRefreshSchedule) 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.(*UpdateRefreshScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateRefreshScheduleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateRefreshScheduleInput(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_serializeOpHttpBindingsUpdateRefreshScheduleInput(v *UpdateRefreshScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateRefreshScheduleInput(v *UpdateRefreshScheduleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Schedule != nil { + ok := object.Key("Schedule") + if err := awsRestjson1_serializeDocumentRefreshSchedule(v.Schedule, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateTemplate struct { } @@ -14757,6 +15386,20 @@ func awsRestjson1_serializeDocumentDataSetReferenceList(v []types.DataSetReferen return nil } +func awsRestjson1_serializeDocumentDataSetRefreshProperties(v *types.DataSetRefreshProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RefreshConfiguration != nil { + ok := object.Key("RefreshConfiguration") + if err := awsRestjson1_serializeDocumentRefreshConfiguration(v.RefreshConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentDataSetSchema(v *types.DataSetSchema, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -18929,6 +19572,20 @@ func awsRestjson1_serializeDocumentIdentityNameList(v []string, value smithyjson return nil } +func awsRestjson1_serializeDocumentIncrementalRefresh(v *types.IncrementalRefresh, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LookbackWindow != nil { + ok := object.Key("LookbackWindow") + if err := awsRestjson1_serializeDocumentLookbackWindow(v.LookbackWindow, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentInputColumn(v *types.InputColumn, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -20159,6 +20816,28 @@ func awsRestjson1_serializeDocumentLongFormatText(v *types.LongFormatText, value return nil } +func awsRestjson1_serializeDocumentLookbackWindow(v *types.LookbackWindow, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ColumnName != nil { + ok := object.Key("ColumnName") + ok.String(*v.ColumnName) + } + + { + ok := object.Key("Size") + ok.Long(v.Size) + } + + if len(v.SizeUnit) > 0 { + ok := object.Key("SizeUnit") + ok.String(string(v.SizeUnit)) + } + + return nil +} + func awsRestjson1_serializeDocumentManifestFileLocation(v *types.ManifestFileLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -23124,6 +23803,83 @@ func awsRestjson1_serializeDocumentReferenceLineValueLabelConfiguration(v *types return nil } +func awsRestjson1_serializeDocumentRefreshConfiguration(v *types.RefreshConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncrementalRefresh != nil { + ok := object.Key("IncrementalRefresh") + if err := awsRestjson1_serializeDocumentIncrementalRefresh(v.IncrementalRefresh, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRefreshFrequency(v *types.RefreshFrequency, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Interval) > 0 { + ok := object.Key("Interval") + ok.String(string(v.Interval)) + } + + if v.RefreshOnDay != nil { + ok := object.Key("RefreshOnDay") + if err := awsRestjson1_serializeDocumentScheduleRefreshOnEntity(v.RefreshOnDay, ok); err != nil { + return err + } + } + + if v.TimeOfTheDay != nil { + ok := object.Key("TimeOfTheDay") + ok.String(*v.TimeOfTheDay) + } + + if v.Timezone != nil { + ok := object.Key("Timezone") + ok.String(*v.Timezone) + } + + return nil +} + +func awsRestjson1_serializeDocumentRefreshSchedule(v *types.RefreshSchedule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("Arn") + ok.String(*v.Arn) + } + + if len(v.RefreshType) > 0 { + ok := object.Key("RefreshType") + ok.String(string(v.RefreshType)) + } + + if v.ScheduleFrequency != nil { + ok := object.Key("ScheduleFrequency") + if err := awsRestjson1_serializeDocumentRefreshFrequency(v.ScheduleFrequency, ok); err != nil { + return err + } + } + + if v.ScheduleId != nil { + ok := object.Key("ScheduleId") + ok.String(*v.ScheduleId) + } + + if v.StartAfterDateTime != nil { + ok := object.Key("StartAfterDateTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartAfterDateTime)) + } + + return nil +} + func awsRestjson1_serializeDocumentRegisteredUserConsoleFeatureConfigurations(v *types.RegisteredUserConsoleFeatureConfigurations, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -23504,6 +24260,13 @@ func awsRestjson1_serializeDocumentRowLevelPermissionTagConfiguration(v *types.R ok.String(string(v.Status)) } + if v.TagRuleConfigurations != nil { + ok := object.Key("TagRuleConfigurations") + if err := awsRestjson1_serializeDocumentRowLevelPermissionTagRuleConfigurationList(v.TagRuleConfigurations, ok); err != nil { + return err + } + } + if v.TagRules != nil { ok := object.Key("TagRules") if err := awsRestjson1_serializeDocumentRowLevelPermissionTagRuleList(v.TagRules, ok); err != nil { @@ -23541,6 +24304,33 @@ func awsRestjson1_serializeDocumentRowLevelPermissionTagRule(v *types.RowLevelPe return nil } +func awsRestjson1_serializeDocumentRowLevelPermissionTagRuleConfiguration(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_serializeDocumentRowLevelPermissionTagRuleConfigurationList(v [][]string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentRowLevelPermissionTagRuleConfiguration(v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentRowLevelPermissionTagRuleList(v []types.RowLevelPermissionTagRule, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -23970,6 +24760,23 @@ func awsRestjson1_serializeDocumentScatterPlotVisual(v *types.ScatterPlotVisual, return nil } +func awsRestjson1_serializeDocumentScheduleRefreshOnEntity(v *types.ScheduleRefreshOnEntity, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DayOfMonth != nil { + ok := object.Key("DayOfMonth") + ok.String(*v.DayOfMonth) + } + + if len(v.DayOfWeek) > 0 { + ok := object.Key("DayOfWeek") + ok.String(string(v.DayOfWeek)) + } + + return nil +} + func awsRestjson1_serializeDocumentScrollBarOptions(v *types.ScrollBarOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index 9430c4a5698..9482e944967 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -875,6 +875,34 @@ func (DateAggregationFunction) Values() []DateAggregationFunction { } } +type DayOfWeek string + +// Enum values for DayOfWeek +const ( + DayOfWeekSunday DayOfWeek = "SUNDAY" + DayOfWeekMonday DayOfWeek = "MONDAY" + DayOfWeekTuesday DayOfWeek = "TUESDAY" + DayOfWeekWednesday DayOfWeek = "WEDNESDAY" + DayOfWeekThursday DayOfWeek = "THURSDAY" + DayOfWeekFriday DayOfWeek = "FRIDAY" + DayOfWeekSaturday DayOfWeek = "SATURDAY" +) + +// Values returns all known values for DayOfWeek. 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 (DayOfWeek) Values() []DayOfWeek { + return []DayOfWeek{ + "SUNDAY", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + } +} + type Edition string // Enum values for Edition @@ -1453,6 +1481,7 @@ const ( IngestionErrorTypePermissionNotFound IngestionErrorType = "PERMISSION_NOT_FOUND" IngestionErrorTypeElasticsearchCursorNotEnabled IngestionErrorType = "ELASTICSEARCH_CURSOR_NOT_ENABLED" IngestionErrorTypeCursorNotEnabled IngestionErrorType = "CURSOR_NOT_ENABLED" + IngestionErrorTypeDuplicateColumnNamesFound IngestionErrorType = "DUPLICATE_COLUMN_NAMES_FOUND" ) // Values returns all known values for IngestionErrorType. Note that this can be @@ -1504,6 +1533,7 @@ func (IngestionErrorType) Values() []IngestionErrorType { "PERMISSION_NOT_FOUND", "ELASTICSEARCH_CURSOR_NOT_ENABLED", "CURSOR_NOT_ENABLED", + "DUPLICATE_COLUMN_NAMES_FOUND", } } @@ -1769,6 +1799,26 @@ func (LineInterpolation) Values() []LineInterpolation { } } +type LookbackWindowSizeUnit string + +// Enum values for LookbackWindowSizeUnit +const ( + LookbackWindowSizeUnitHour LookbackWindowSizeUnit = "HOUR" + LookbackWindowSizeUnitDay LookbackWindowSizeUnit = "DAY" + LookbackWindowSizeUnitWeek LookbackWindowSizeUnit = "WEEK" +) + +// Values returns all known values for LookbackWindowSizeUnit. 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 (LookbackWindowSizeUnit) Values() []LookbackWindowSizeUnit { + return []LookbackWindowSizeUnit{ + "HOUR", + "DAY", + "WEEK", + } +} + type MapZoomMode string // Enum values for MapZoomMode @@ -2273,6 +2323,32 @@ func (ReferenceLineValueLabelRelativePosition) Values() []ReferenceLineValueLabe } } +type RefreshInterval string + +// Enum values for RefreshInterval +const ( + RefreshIntervalMinute15 RefreshInterval = "MINUTE15" + RefreshIntervalMinute30 RefreshInterval = "MINUTE30" + RefreshIntervalHourly RefreshInterval = "HOURLY" + RefreshIntervalDaily RefreshInterval = "DAILY" + RefreshIntervalWeekly RefreshInterval = "WEEKLY" + RefreshIntervalMonthly RefreshInterval = "MONTHLY" +) + +// Values returns all known values for RefreshInterval. 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 (RefreshInterval) Values() []RefreshInterval { + return []RefreshInterval{ + "MINUTE15", + "MINUTE30", + "HOURLY", + "DAILY", + "WEEKLY", + "MONTHLY", + } +} + type RelativeDateType string // Enum values for RelativeDateType diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index d6486ff4561..8c14ea11b01 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -2918,6 +2918,17 @@ type DataSetReference struct { noSmithyDocumentSerde } +// The refresh properties of a dataset. +type DataSetRefreshProperties struct { + + // The refresh configuration for a dataset. + // + // This member is required. + RefreshConfiguration *RefreshConfiguration + + noSmithyDocumentSerde +} + // Dataset schema. type DataSetSchema struct { @@ -5975,6 +5986,17 @@ type IAMPolicyAssignmentSummary struct { noSmithyDocumentSerde } +// The incremental refresh configuration for a dataset. +type IncrementalRefresh struct { + + // The lookback window setup for an incremental refresh configuration. + // + // This member is required. + LookbackWindow *LookbackWindow + + noSmithyDocumentSerde +} + // Information about the SPICE ingestion for a dataset. type Ingestion struct { @@ -6814,6 +6836,28 @@ type LongFormatText struct { noSmithyDocumentSerde } +// The lookback window setup of an incremental refresh configuration. +type LookbackWindow struct { + + // The name of the lookback window column. + // + // This member is required. + ColumnName *string + + // The lookback window column size. + // + // This member is required. + Size int64 + + // The size unit that is used for the lookback window column. Valid values for this + // structure are HOUR, DAY, and WEEK. + // + // This member is required. + SizeUnit LookbackWindowSizeUnit + + noSmithyDocumentSerde +} + // Amazon S3 manifest file location. type ManifestFileLocation struct { @@ -8749,6 +8793,99 @@ type ReferenceLineValueLabelConfiguration struct { noSmithyDocumentSerde } +// The refresh configuration of a dataset. +type RefreshConfiguration struct { + + // The incremental refresh for the dataset. + // + // This member is required. + IncrementalRefresh *IncrementalRefresh + + noSmithyDocumentSerde +} + +// Specifies the interval between each scheduled refresh of a dataset. +type RefreshFrequency struct { + + // The interval between scheduled refreshes. Valid values are as follows: + // + // * + // MINUTE15: The dataset refreshes every 15 minutes. This value is only supported + // for incremental refreshes. This interval can only be used for one schedule per + // dataset. + // + // * MINUTE30:The dataset refreshes every 30 minutes. This value is only + // supported for incremental refreshes. This interval can only be used for one + // schedule per dataset. + // + // * HOURLY: The dataset refreshes every hour. This interval + // can only be used for one schedule per dataset. + // + // * DAILY: The dataset refreshes + // every day. + // + // * WEEKLY: The dataset refreshes every week. + // + // * MONTHLY: The dataset + // refreshes every month. + // + // This member is required. + Interval RefreshInterval + + // The day of the week that you want to schedule the refresh on. This value is + // required for weekly and monthly refresh intervals. + RefreshOnDay *ScheduleRefreshOnEntity + + // The time of day that you want the datset to refresh. This value is expressed in + // HH:MM format. This field is not required for schedules that refresh hourly. + TimeOfTheDay *string + + // The timezone that you want the refresh schedule to use. The timezone ID must + // match a corresponding ID found on java.util.time.getAvailableIDs(). + Timezone *string + + noSmithyDocumentSerde +} + +// The refresh schedule of a dataset. +type RefreshSchedule struct { + + // The type of refresh that a datset undergoes. Valid values are as follows: + // + // * + // FULL_REFRESH: A complete refresh of a dataset. + // + // * INCREMENTAL_REFRESH: A partial + // refresh of some rows of a dataset, based on the time window specified. + // + // For more + // information on full and incremental refreshes, see Refreshing SPICE data + // (https://docs.aws.amazon.com/quicksight/latest/user/refreshing-imported-data.html) + // in the Amazon QuickSight User Guide. + // + // This member is required. + RefreshType IngestionType + + // The frequency for the refresh schedule. + // + // This member is required. + ScheduleFrequency *RefreshFrequency + + // An identifier for the refresh schedule. + // + // This member is required. + ScheduleId *string + + // The Amazon Resource Name (ARN) for the refresh schedule. + Arn *string + + // Time after which the refresh schedule can be started, expressed in + // YYYY-MM-DDTHH:MM:SS format. + StartAfterDateTime *time.Time + + noSmithyDocumentSerde +} + // The feature configurations of an embedded Amazon QuickSight console. type RegisteredUserConsoleFeatureConfigurations struct { @@ -9142,6 +9279,12 @@ type RowLevelPermissionTagConfiguration struct { // disabled, the status is DISABLED. Status Status + // A list of tag configuration rules to apply to a dataset. All tag configurations + // have the OR condition. Tags within each tile will be joined (AND). At least one + // rule in this structure must have all tag values assigned to it to apply + // Row-level security (RLS) to the dataset. + TagRuleConfigurations [][]string + noSmithyDocumentSerde } @@ -9430,6 +9573,18 @@ type ScatterPlotVisual struct { noSmithyDocumentSerde } +// The refresh on entity for weekly or monthly schedules. +type ScheduleRefreshOnEntity struct { + + // The day of the month that you want to schedule refresh on. + DayOfMonth *string + + // The day of the week that you want to schedule a refresh on. + DayOfWeek DayOfWeek + + noSmithyDocumentSerde +} + // The visual display options for a data zoom scroll bar. type ScrollBarOptions struct { diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index 335494abefb..4dd23850a01 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -290,6 +290,26 @@ func (m *validateOpCreateNamespace) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpCreateRefreshSchedule struct { +} + +func (*validateOpCreateRefreshSchedule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRefreshSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRefreshScheduleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRefreshScheduleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateTemplateAlias struct { } @@ -470,6 +490,26 @@ func (m *validateOpDeleteDataSet) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpDeleteDataSetRefreshProperties struct { +} + +func (*validateOpDeleteDataSetRefreshProperties) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDataSetRefreshProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDataSetRefreshPropertiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDataSetRefreshPropertiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteDataSource struct { } @@ -610,6 +650,26 @@ func (m *validateOpDeleteNamespace) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpDeleteRefreshSchedule struct { +} + +func (*validateOpDeleteRefreshSchedule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRefreshSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRefreshScheduleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRefreshScheduleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteTemplateAlias struct { } @@ -950,6 +1010,26 @@ func (m *validateOpDescribeDataSetPermissions) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpDescribeDataSetRefreshProperties struct { +} + +func (*validateOpDescribeDataSetRefreshProperties) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDataSetRefreshProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDataSetRefreshPropertiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDataSetRefreshPropertiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeDataSource struct { } @@ -1170,6 +1250,26 @@ func (m *validateOpDescribeNamespace) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpDescribeRefreshSchedule struct { +} + +func (*validateOpDescribeRefreshSchedule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeRefreshSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeRefreshScheduleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeRefreshScheduleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeTemplateAlias struct { } @@ -1670,6 +1770,26 @@ func (m *validateOpListNamespaces) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpListRefreshSchedules struct { +} + +func (*validateOpListRefreshSchedules) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRefreshSchedules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRefreshSchedulesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRefreshSchedulesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -1850,6 +1970,26 @@ func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpPutDataSetRefreshProperties struct { +} + +func (*validateOpPutDataSetRefreshProperties) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutDataSetRefreshProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutDataSetRefreshPropertiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutDataSetRefreshPropertiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRegisterUser struct { } @@ -2390,6 +2530,26 @@ func (m *validateOpUpdatePublicSharingSettings) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpUpdateRefreshSchedule struct { +} + +func (*validateOpUpdateRefreshSchedule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRefreshSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRefreshScheduleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRefreshScheduleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateTemplateAlias struct { } @@ -2586,6 +2746,10 @@ func addOpCreateNamespaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateNamespace{}, middleware.After) } +func addOpCreateRefreshScheduleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRefreshSchedule{}, middleware.After) +} + func addOpCreateTemplateAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTemplateAlias{}, middleware.After) } @@ -2622,6 +2786,10 @@ func addOpDeleteDataSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDataSet{}, middleware.After) } +func addOpDeleteDataSetRefreshPropertiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDataSetRefreshProperties{}, middleware.After) +} + func addOpDeleteDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDataSource{}, middleware.After) } @@ -2650,6 +2818,10 @@ func addOpDeleteNamespaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteNamespace{}, middleware.After) } +func addOpDeleteRefreshScheduleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRefreshSchedule{}, middleware.After) +} + func addOpDeleteTemplateAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTemplateAlias{}, middleware.After) } @@ -2718,6 +2890,10 @@ func addOpDescribeDataSetPermissionsValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpDescribeDataSetPermissions{}, middleware.After) } +func addOpDescribeDataSetRefreshPropertiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDataSetRefreshProperties{}, middleware.After) +} + func addOpDescribeDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDataSource{}, middleware.After) } @@ -2762,6 +2938,10 @@ func addOpDescribeNamespaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeNamespace{}, middleware.After) } +func addOpDescribeRefreshScheduleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeRefreshSchedule{}, middleware.After) +} + func addOpDescribeTemplateAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeTemplateAlias{}, middleware.After) } @@ -2862,6 +3042,10 @@ func addOpListNamespacesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListNamespaces{}, middleware.After) } +func addOpListRefreshSchedulesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRefreshSchedules{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -2898,6 +3082,10 @@ func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) } +func addOpPutDataSetRefreshPropertiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutDataSetRefreshProperties{}, middleware.After) +} + func addOpRegisterUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRegisterUser{}, middleware.After) } @@ -3006,6 +3194,10 @@ func addOpUpdatePublicSharingSettingsValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpUpdatePublicSharingSettings{}, middleware.After) } +func addOpUpdateRefreshScheduleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRefreshSchedule{}, middleware.After) +} + func addOpUpdateTemplateAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTemplateAlias{}, middleware.After) } @@ -5355,6 +5547,25 @@ func validateDataSetReferenceList(v []types.DataSetReference) error { } } +func validateDataSetRefreshProperties(v *types.DataSetRefreshProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DataSetRefreshProperties"} + if v.RefreshConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("RefreshConfiguration")) + } else if v.RefreshConfiguration != nil { + if err := validateRefreshConfiguration(v.RefreshConfiguration); err != nil { + invalidParams.AddNested("RefreshConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDataSetSearchFilter(v *types.DataSetSearchFilter) error { if v == nil { return nil @@ -8207,6 +8418,25 @@ func validateHistogramVisual(v *types.HistogramVisual) error { } } +func validateIncrementalRefresh(v *types.IncrementalRefresh) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IncrementalRefresh"} + if v.LookbackWindow == nil { + invalidParams.Add(smithy.NewErrParamRequired("LookbackWindow")) + } else if v.LookbackWindow != nil { + if err := validateLookbackWindow(v.LookbackWindow); err != nil { + invalidParams.AddNested("LookbackWindow", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInputColumn(v *types.InputColumn) error { if v == nil { return nil @@ -8932,6 +9162,24 @@ func validateLogicalTableSource(v *types.LogicalTableSource) error { } } +func validateLookbackWindow(v *types.LookbackWindow) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LookbackWindow"} + if v.ColumnName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ColumnName")) + } + if len(v.SizeUnit) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SizeUnit")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateManifestFileLocation(v *types.ManifestFileLocation) error { if v == nil { return nil @@ -10782,6 +11030,65 @@ func validateReferenceLineValueLabelConfiguration(v *types.ReferenceLineValueLab } } +func validateRefreshConfiguration(v *types.RefreshConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RefreshConfiguration"} + if v.IncrementalRefresh == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncrementalRefresh")) + } else if v.IncrementalRefresh != nil { + if err := validateIncrementalRefresh(v.IncrementalRefresh); err != nil { + invalidParams.AddNested("IncrementalRefresh", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRefreshFrequency(v *types.RefreshFrequency) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RefreshFrequency"} + if len(v.Interval) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Interval")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRefreshSchedule(v *types.RefreshSchedule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RefreshSchedule"} + if v.ScheduleId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleId")) + } + if v.ScheduleFrequency == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleFrequency")) + } else if v.ScheduleFrequency != nil { + if err := validateRefreshFrequency(v.ScheduleFrequency); err != nil { + invalidParams.AddNested("ScheduleFrequency", err.(smithy.InvalidParamsError)) + } + } + if len(v.RefreshType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RefreshType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRegisteredUserConsoleFeatureConfigurations(v *types.RegisteredUserConsoleFeatureConfigurations) error { if v == nil { return nil @@ -14308,6 +14615,31 @@ func validateOpCreateNamespaceInput(v *CreateNamespaceInput) error { } } +func validateOpCreateRefreshScheduleInput(v *CreateRefreshScheduleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRefreshScheduleInput"} + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.Schedule == nil { + invalidParams.Add(smithy.NewErrParamRequired("Schedule")) + } else if v.Schedule != nil { + if err := validateRefreshSchedule(v.Schedule); err != nil { + invalidParams.AddNested("Schedule", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateTemplateAliasInput(v *CreateTemplateAliasInput) error { if v == nil { return nil @@ -14515,6 +14847,24 @@ func validateOpDeleteDataSetInput(v *DeleteDataSetInput) error { } } +func validateOpDeleteDataSetRefreshPropertiesInput(v *DeleteDataSetRefreshPropertiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDataSetRefreshPropertiesInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteDataSourceInput(v *DeleteDataSourceInput) error { if v == nil { return nil @@ -14659,6 +15009,27 @@ func validateOpDeleteNamespaceInput(v *DeleteNamespaceInput) error { } } +func validateOpDeleteRefreshScheduleInput(v *DeleteRefreshScheduleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRefreshScheduleInput"} + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.ScheduleId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteTemplateAliasInput(v *DeleteTemplateAliasInput) error { if v == nil { return nil @@ -14968,6 +15339,24 @@ func validateOpDescribeDataSetPermissionsInput(v *DescribeDataSetPermissionsInpu } } +func validateOpDescribeDataSetRefreshPropertiesInput(v *DescribeDataSetRefreshPropertiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDataSetRefreshPropertiesInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeDataSourceInput(v *DescribeDataSourceInput) error { if v == nil { return nil @@ -15178,6 +15567,27 @@ func validateOpDescribeNamespaceInput(v *DescribeNamespaceInput) error { } } +func validateOpDescribeRefreshScheduleInput(v *DescribeRefreshScheduleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeRefreshScheduleInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if v.ScheduleId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeTemplateAliasInput(v *DescribeTemplateAliasInput) error { if v == nil { return nil @@ -15647,6 +16057,24 @@ func validateOpListNamespacesInput(v *ListNamespacesInput) error { } } +func validateOpListRefreshSchedulesInput(v *ListRefreshSchedulesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRefreshSchedulesInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -15803,6 +16231,31 @@ func validateOpListUsersInput(v *ListUsersInput) error { } } +func validateOpPutDataSetRefreshPropertiesInput(v *PutDataSetRefreshPropertiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutDataSetRefreshPropertiesInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if v.DataSetRefreshProperties == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetRefreshProperties")) + } else if v.DataSetRefreshProperties != nil { + if err := validateDataSetRefreshProperties(v.DataSetRefreshProperties); err != nil { + invalidParams.AddNested("DataSetRefreshProperties", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRegisterUserInput(v *RegisterUserInput) error { if v == nil { return nil @@ -16474,6 +16927,31 @@ func validateOpUpdatePublicSharingSettingsInput(v *UpdatePublicSharingSettingsIn } } +func validateOpUpdateRefreshScheduleInput(v *UpdateRefreshScheduleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRefreshScheduleInput"} + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.Schedule == nil { + invalidParams.Add(smithy.NewErrParamRequired("Schedule")) + } else if v.Schedule != nil { + if err := validateRefreshSchedule(v.Schedule); err != nil { + invalidParams.AddNested("Schedule", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateTemplateAliasInput(v *UpdateTemplateAliasInput) error { if v == nil { return nil diff --git a/service/redshiftdata/api_op_BatchExecuteStatement.go b/service/redshiftdata/api_op_BatchExecuteStatement.go index 34c828409a4..9c06637e7c8 100644 --- a/service/redshiftdata/api_op_BatchExecuteStatement.go +++ b/service/redshiftdata/api_op_BatchExecuteStatement.go @@ -17,21 +17,38 @@ import ( // one of the following combinations of request parameters: // // * Secrets Manager - -// when connecting to a cluster, specify the Amazon Resource Name (ARN) of the -// secret, the database name, and the cluster identifier that matches the cluster -// in the secret. When connecting to a serverless workgroup, specify the Amazon -// Resource Name (ARN) of the secret and the database name. +// when connecting to a cluster, provide the secret-arn of a secret stored in +// Secrets Manager which has username and password. The specified secret contains +// credentials to connect to the database you specify. When you are connecting to a +// cluster, you also supply the database name, If you provide a cluster identifier +// (dbClusterIdentifier), it must match the cluster identifier stored in the +// secret. When you are connecting to a serverless workgroup, you also supply the +// database name. // -// * Temporary -// credentials - when connecting to a cluster, specify the cluster identifier, the -// database name, and the database user name. Also, permission to call the -// redshift:GetClusterCredentials operation is required. When connecting to a -// serverless workgroup, specify the workgroup name and database name. Also, +// * Temporary credentials - when connecting to your data +// warehouse, choose one of the following options: +// +// * When connecting to a +// serverless workgroup, specify the workgroup name and database name. The database +// user name is derived from the IAM identity. For example, +// arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, // permission to call the redshift-serverless:GetCredentials operation is // required. // -// For more information about the Amazon Redshift Data API and CLI usage -// examples, see Using the Amazon Redshift Data API +// * When connecting to a cluster as an IAM identity, specify the +// cluster identifier and the database name. The database user name is derived from +// the IAM identity. For example, arn:iam::123456789012:user:foo has the database +// user name IAM:foo. Also, permission to call the +// redshift:GetClusterCredentialsWithIAM operation is required. +// +// * When connecting +// to a cluster as a database user, specify the cluster identifier, the database +// name, and the database user name. Also, permission to call the +// redshift:GetClusterCredentials operation is required. +// +// For more information +// about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon +// Redshift Data API // (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon // Redshift Management Guide. func (c *Client) BatchExecuteStatement(ctx context.Context, params *BatchExecuteStatementInput, optFns ...func(*Options)) (*BatchExecuteStatementOutput, error) { @@ -75,7 +92,7 @@ type BatchExecuteStatementInput struct { ClusterIdentifier *string // The database user name. This parameter is required when connecting to a cluster - // and authenticating using temporary credentials. + // as a database user and authenticating using temporary credentials. DbUser *string // The name or ARN of the secret that enables access to the database. This diff --git a/service/redshiftdata/api_op_DescribeTable.go b/service/redshiftdata/api_op_DescribeTable.go index 994ee97ce01..08f80cf47c2 100644 --- a/service/redshiftdata/api_op_DescribeTable.go +++ b/service/redshiftdata/api_op_DescribeTable.go @@ -18,17 +18,33 @@ import ( // combinations of request parameters: // // * Secrets Manager - when connecting to a -// cluster, specify the Amazon Resource Name (ARN) of the secret, the database -// name, and the cluster identifier that matches the cluster in the secret. When -// connecting to a serverless workgroup, specify the Amazon Resource Name (ARN) of -// the secret and the database name. +// cluster, provide the secret-arn of a secret stored in Secrets Manager which has +// username and password. The specified secret contains credentials to connect to +// the database you specify. When you are connecting to a cluster, you also supply +// the database name, If you provide a cluster identifier (dbClusterIdentifier), it +// must match the cluster identifier stored in the secret. When you are connecting +// to a serverless workgroup, you also supply the database name. // -// * Temporary credentials - when connecting to -// a cluster, specify the cluster identifier, the database name, and the database -// user name. Also, permission to call the redshift:GetClusterCredentials operation -// is required. When connecting to a serverless workgroup, specify the workgroup -// name and database name. Also, permission to call the -// redshift-serverless:GetCredentials operation is required. +// * Temporary +// credentials - when connecting to your data warehouse, choose one of the +// following options: +// +// * When connecting to a serverless workgroup, specify the +// workgroup name and database name. The database user name is derived from the IAM +// identity. For example, arn:iam::123456789012:user:foo has the database user name +// IAM:foo. Also, permission to call the redshift-serverless:GetCredentials +// operation is required. +// +// * When connecting to a cluster as an IAM identity, +// specify the cluster identifier and the database name. The database user name is +// derived from the IAM identity. For example, arn:iam::123456789012:user:foo has +// the database user name IAM:foo. Also, permission to call the +// redshift:GetClusterCredentialsWithIAM operation is required. +// +// * When connecting +// to a cluster as a database user, specify the cluster identifier, the database +// name, and the database user name. Also, permission to call the +// redshift:GetClusterCredentials operation is required. // // For more information // about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon @@ -68,7 +84,7 @@ type DescribeTableInput struct { ConnectedDatabase *string // The database user name. This parameter is required when connecting to a cluster - // and authenticating using temporary credentials. + // as a database user and authenticating using temporary credentials. DbUser *string // The maximum number of tables to return in the response. If more tables exist diff --git a/service/redshiftdata/api_op_ExecuteStatement.go b/service/redshiftdata/api_op_ExecuteStatement.go index 22c2f8a49e7..8fba27abf50 100644 --- a/service/redshiftdata/api_op_ExecuteStatement.go +++ b/service/redshiftdata/api_op_ExecuteStatement.go @@ -18,18 +18,34 @@ import ( // Depending on the authorization method, use one of the following combinations of // request parameters: // -// * Secrets Manager - when connecting to a cluster, specify -// the Amazon Resource Name (ARN) of the secret, the database name, and the cluster -// identifier that matches the cluster in the secret. When connecting to a -// serverless workgroup, specify the Amazon Resource Name (ARN) of the secret and -// the database name. +// * Secrets Manager - when connecting to a cluster, provide +// the secret-arn of a secret stored in Secrets Manager which has username and +// password. The specified secret contains credentials to connect to the database +// you specify. When you are connecting to a cluster, you also supply the database +// name, If you provide a cluster identifier (dbClusterIdentifier), it must match +// the cluster identifier stored in the secret. When you are connecting to a +// serverless workgroup, you also supply the database name. // -// * Temporary credentials - when connecting to a cluster, -// specify the cluster identifier, the database name, and the database user name. -// Also, permission to call the redshift:GetClusterCredentials operation is -// required. When connecting to a serverless workgroup, specify the workgroup name -// and database name. Also, permission to call the -// redshift-serverless:GetCredentials operation is required. +// * Temporary +// credentials - when connecting to your data warehouse, choose one of the +// following options: +// +// * When connecting to a serverless workgroup, specify the +// workgroup name and database name. The database user name is derived from the IAM +// identity. For example, arn:iam::123456789012:user:foo has the database user name +// IAM:foo. Also, permission to call the redshift-serverless:GetCredentials +// operation is required. +// +// * When connecting to a cluster as an IAM identity, +// specify the cluster identifier and the database name. The database user name is +// derived from the IAM identity. For example, arn:iam::123456789012:user:foo has +// the database user name IAM:foo. Also, permission to call the +// redshift:GetClusterCredentialsWithIAM operation is required. +// +// * When connecting +// to a cluster as a database user, specify the cluster identifier, the database +// name, and the database user name. Also, permission to call the +// redshift:GetClusterCredentials operation is required. // // For more information // about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon @@ -73,7 +89,7 @@ type ExecuteStatementInput struct { ClusterIdentifier *string // The database user name. This parameter is required when connecting to a cluster - // and authenticating using temporary credentials. + // as a database user and authenticating using temporary credentials. DbUser *string // The parameters for the SQL statement. diff --git a/service/redshiftdata/api_op_ListDatabases.go b/service/redshiftdata/api_op_ListDatabases.go index 88f9ad9fc41..708ef263be5 100644 --- a/service/redshiftdata/api_op_ListDatabases.go +++ b/service/redshiftdata/api_op_ListDatabases.go @@ -16,17 +16,33 @@ import ( // combinations of request parameters: // // * Secrets Manager - when connecting to a -// cluster, specify the Amazon Resource Name (ARN) of the secret, the database -// name, and the cluster identifier that matches the cluster in the secret. When -// connecting to a serverless workgroup, specify the Amazon Resource Name (ARN) of -// the secret and the database name. +// cluster, provide the secret-arn of a secret stored in Secrets Manager which has +// username and password. The specified secret contains credentials to connect to +// the database you specify. When you are connecting to a cluster, you also supply +// the database name, If you provide a cluster identifier (dbClusterIdentifier), it +// must match the cluster identifier stored in the secret. When you are connecting +// to a serverless workgroup, you also supply the database name. // -// * Temporary credentials - when connecting to -// a cluster, specify the cluster identifier, the database name, and the database -// user name. Also, permission to call the redshift:GetClusterCredentials operation -// is required. When connecting to a serverless workgroup, specify the workgroup -// name and database name. Also, permission to call the -// redshift-serverless:GetCredentials operation is required. +// * Temporary +// credentials - when connecting to your data warehouse, choose one of the +// following options: +// +// * When connecting to a serverless workgroup, specify the +// workgroup name and database name. The database user name is derived from the IAM +// identity. For example, arn:iam::123456789012:user:foo has the database user name +// IAM:foo. Also, permission to call the redshift-serverless:GetCredentials +// operation is required. +// +// * When connecting to a cluster as an IAM identity, +// specify the cluster identifier and the database name. The database user name is +// derived from the IAM identity. For example, arn:iam::123456789012:user:foo has +// the database user name IAM:foo. Also, permission to call the +// redshift:GetClusterCredentialsWithIAM operation is required. +// +// * When connecting +// to a cluster as a database user, specify the cluster identifier, the database +// name, and the database user name. Also, permission to call the +// redshift:GetClusterCredentials operation is required. // // For more information // about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon @@ -61,7 +77,7 @@ type ListDatabasesInput struct { ClusterIdentifier *string // The database user name. This parameter is required when connecting to a cluster - // and authenticating using temporary credentials. + // as a database user and authenticating using temporary credentials. DbUser *string // The maximum number of databases to return in the response. If more databases diff --git a/service/redshiftdata/api_op_ListSchemas.go b/service/redshiftdata/api_op_ListSchemas.go index b16d9e56618..ae9dde958c2 100644 --- a/service/redshiftdata/api_op_ListSchemas.go +++ b/service/redshiftdata/api_op_ListSchemas.go @@ -16,17 +16,33 @@ import ( // combinations of request parameters: // // * Secrets Manager - when connecting to a -// cluster, specify the Amazon Resource Name (ARN) of the secret, the database -// name, and the cluster identifier that matches the cluster in the secret. When -// connecting to a serverless workgroup, specify the Amazon Resource Name (ARN) of -// the secret and the database name. +// cluster, provide the secret-arn of a secret stored in Secrets Manager which has +// username and password. The specified secret contains credentials to connect to +// the database you specify. When you are connecting to a cluster, you also supply +// the database name, If you provide a cluster identifier (dbClusterIdentifier), it +// must match the cluster identifier stored in the secret. When you are connecting +// to a serverless workgroup, you also supply the database name. // -// * Temporary credentials - when connecting to -// a cluster, specify the cluster identifier, the database name, and the database -// user name. Also, permission to call the redshift:GetClusterCredentials operation -// is required. When connecting to a serverless workgroup, specify the workgroup -// name and database name. Also, permission to call the -// redshift-serverless:GetCredentials operation is required. +// * Temporary +// credentials - when connecting to your data warehouse, choose one of the +// following options: +// +// * When connecting to a serverless workgroup, specify the +// workgroup name and database name. The database user name is derived from the IAM +// identity. For example, arn:iam::123456789012:user:foo has the database user name +// IAM:foo. Also, permission to call the redshift-serverless:GetCredentials +// operation is required. +// +// * When connecting to a cluster as an IAM identity, +// specify the cluster identifier and the database name. The database user name is +// derived from the IAM identity. For example, arn:iam::123456789012:user:foo has +// the database user name IAM:foo. Also, permission to call the +// redshift:GetClusterCredentialsWithIAM operation is required. +// +// * When connecting +// to a cluster as a database user, specify the cluster identifier, the database +// name, and the database user name. Also, permission to call the +// redshift:GetClusterCredentials operation is required. // // For more information // about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon @@ -66,7 +82,7 @@ type ListSchemasInput struct { ConnectedDatabase *string // The database user name. This parameter is required when connecting to a cluster - // and authenticating using temporary credentials. + // as a database user and authenticating using temporary credentials. DbUser *string // The maximum number of schemas to return in the response. If more schemas exist diff --git a/service/redshiftdata/api_op_ListTables.go b/service/redshiftdata/api_op_ListTables.go index dde3911decb..455beb1a038 100644 --- a/service/redshiftdata/api_op_ListTables.go +++ b/service/redshiftdata/api_op_ListTables.go @@ -18,21 +18,38 @@ import ( // the following combinations of request parameters: // // * Secrets Manager - when -// connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, -// the database name, and the cluster identifier that matches the cluster in the -// secret. When connecting to a serverless workgroup, specify the Amazon Resource -// Name (ARN) of the secret and the database name. +// connecting to a cluster, provide the secret-arn of a secret stored in Secrets +// Manager which has username and password. The specified secret contains +// credentials to connect to the database you specify. When you are connecting to a +// cluster, you also supply the database name, If you provide a cluster identifier +// (dbClusterIdentifier), it must match the cluster identifier stored in the +// secret. When you are connecting to a serverless workgroup, you also supply the +// database name. // -// * Temporary credentials - when -// connecting to a cluster, specify the cluster identifier, the database name, and -// the database user name. Also, permission to call the -// redshift:GetClusterCredentials operation is required. When connecting to a -// serverless workgroup, specify the workgroup name and database name. Also, +// * Temporary credentials - when connecting to your data +// warehouse, choose one of the following options: +// +// * When connecting to a +// serverless workgroup, specify the workgroup name and database name. The database +// user name is derived from the IAM identity. For example, +// arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, // permission to call the redshift-serverless:GetCredentials operation is // required. // -// For more information about the Amazon Redshift Data API and CLI usage -// examples, see Using the Amazon Redshift Data API +// * When connecting to a cluster as an IAM identity, specify the +// cluster identifier and the database name. The database user name is derived from +// the IAM identity. For example, arn:iam::123456789012:user:foo has the database +// user name IAM:foo. Also, permission to call the +// redshift:GetClusterCredentialsWithIAM operation is required. +// +// * When connecting +// to a cluster as a database user, specify the cluster identifier, the database +// name, and the database user name. Also, permission to call the +// redshift:GetClusterCredentials operation is required. +// +// For more information +// about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon +// Redshift Data API // (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon // Redshift Management Guide. func (c *Client) ListTables(ctx context.Context, params *ListTablesInput, optFns ...func(*Options)) (*ListTablesOutput, error) { @@ -68,7 +85,7 @@ type ListTablesInput struct { ConnectedDatabase *string // The database user name. This parameter is required when connecting to a cluster - // and authenticating using temporary credentials. + // as a database user and authenticating using temporary credentials. DbUser *string // The maximum number of tables to return in the response. If more tables exist diff --git a/service/servicecatalog/types/types.go b/service/servicecatalog/types/types.go index cfff7a06bdb..8918e4daed8 100644 --- a/service/servicecatalog/types/types.go +++ b/service/servicecatalog/types/types.go @@ -938,6 +938,9 @@ type ProvisioningArtifactProperties struct { // * // MARKETPLACE_CAR - Amazon Web Services Marketplace Clusters and Amazon Web // Services Resources + // + // * TERRAFORM_OPEN_SOURCE - Terraform open source + // configuration file Type ProvisioningArtifactType noSmithyDocumentSerde