From 5e3583451cd8a91dbca2cc22672c2cfa0c7860cf Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 9 Jul 2024 18:27:29 +0000 Subject: [PATCH] Regenerated Clients --- .../213a44746978483cb972593b937ed195.json | 8 + .../d11ee9b573164b888cb4b07e5271ca7f.json | 8 + .../d5f414f544f54dc6856447ec0c367346.json | 8 + .../fccb8e6db25c4996a27a3843d692153d.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- service/datazone/types/types.go | 4 + service/fsx/serializers.go | 5 + service/fsx/types/enums.go | 16 +- service/fsx/types/types.go | 160 +- service/opensearch/api_op_CreateDomain.go | 3 + .../opensearch/api_op_UpdateDomainConfig.go | 3 + service/opensearch/deserializers.go | 136 + service/opensearch/serializers.go | 40 + service/opensearch/types/enums.go | 50 + service/opensearch/types/types.go | 65 + .../redshift/internal/endpoints/endpoints.go | 42 +- .../sagemaker/api_op_CreateOptimizationJob.go | 230 ++ .../sagemaker/api_op_DeleteOptimizationJob.go | 137 + .../api_op_DescribeOptimizationJob.go | 231 ++ .../sagemaker/api_op_ListOptimizationJobs.go | 280 ++ .../sagemaker/api_op_StopOptimizationJob.go | 137 + service/sagemaker/deserializers.go | 3299 ++++++++++++----- service/sagemaker/generated.json | 5 + service/sagemaker/serializers.go | 708 ++++ .../api_op_CreateOptimizationJob.go.snap | 36 + .../api_op_DeleteOptimizationJob.go.snap | 36 + .../api_op_DescribeOptimizationJob.go.snap | 36 + .../api_op_ListOptimizationJobs.go.snap | 35 + .../api_op_StopOptimizationJob.go.snap | 36 + service/sagemaker/snapshot_test.go | 120 + service/sagemaker/types/enums.go | 116 + service/sagemaker/types/types.go | 243 +- .../sagemaker/types/types_exported_test.go | 22 + service/sagemaker/validators.go | 318 ++ 34 files changed, 5657 insertions(+), 926 deletions(-) create mode 100644 .changelog/213a44746978483cb972593b937ed195.json create mode 100644 .changelog/d11ee9b573164b888cb4b07e5271ca7f.json create mode 100644 .changelog/d5f414f544f54dc6856447ec0c367346.json create mode 100644 .changelog/fccb8e6db25c4996a27a3843d692153d.json create mode 100644 service/sagemaker/api_op_CreateOptimizationJob.go create mode 100644 service/sagemaker/api_op_DeleteOptimizationJob.go create mode 100644 service/sagemaker/api_op_DescribeOptimizationJob.go create mode 100644 service/sagemaker/api_op_ListOptimizationJobs.go create mode 100644 service/sagemaker/api_op_StopOptimizationJob.go create mode 100644 service/sagemaker/snapshot/api_op_CreateOptimizationJob.go.snap create mode 100644 service/sagemaker/snapshot/api_op_DeleteOptimizationJob.go.snap create mode 100644 service/sagemaker/snapshot/api_op_DescribeOptimizationJob.go.snap create mode 100644 service/sagemaker/snapshot/api_op_ListOptimizationJobs.go.snap create mode 100644 service/sagemaker/snapshot/api_op_StopOptimizationJob.go.snap diff --git a/.changelog/213a44746978483cb972593b937ed195.json b/.changelog/213a44746978483cb972593b937ed195.json new file mode 100644 index 00000000000..6d3c2be5141 --- /dev/null +++ b/.changelog/213a44746978483cb972593b937ed195.json @@ -0,0 +1,8 @@ +{ + "id": "213a4474-6978-483c-b972-593b937ed195", + "type": "feature", + "description": "This release 1/ enables optimization jobs that allows customers to perform Ahead-of-time compilation and quantization. 2/ allows customers to control access to Amazon Q integration in SageMaker Studio. 3/ enables AdditionalModelDataSources for CreateModel action.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/d11ee9b573164b888cb4b07e5271ca7f.json b/.changelog/d11ee9b573164b888cb4b07e5271ca7f.json new file mode 100644 index 00000000000..aa18fb7de7d --- /dev/null +++ b/.changelog/d11ee9b573164b888cb4b07e5271ca7f.json @@ -0,0 +1,8 @@ +{ + "id": "d11ee9b5-7316-4b88-8cb4-b07e5271ca7f", + "type": "feature", + "description": "This release deprecates dataProductItem field from SearchInventoryResultItem, along with some unused DataProduct shapes", + "modules": [ + "service/datazone" + ] +} \ No newline at end of file diff --git a/.changelog/d5f414f544f54dc6856447ec0c367346.json b/.changelog/d5f414f544f54dc6856447ec0c367346.json new file mode 100644 index 00000000000..4c6d2051e79 --- /dev/null +++ b/.changelog/d5f414f544f54dc6856447ec0c367346.json @@ -0,0 +1,8 @@ +{ + "id": "d5f414f5-44f5-4dc6-8564-47ec0c367346", + "type": "feature", + "description": "Adds support for FSx for NetApp ONTAP 2nd Generation file systems, and FSx for OpenZFS Single AZ HA file systems.", + "modules": [ + "service/fsx" + ] +} \ No newline at end of file diff --git a/.changelog/fccb8e6db25c4996a27a3843d692153d.json b/.changelog/fccb8e6db25c4996a27a3843d692153d.json new file mode 100644 index 00000000000..77afa4f683b --- /dev/null +++ b/.changelog/fccb8e6db25c4996a27a3843d692153d.json @@ -0,0 +1,8 @@ +{ + "id": "fccb8e6d-b25c-4996-a27a-3843d692153d", + "type": "feature", + "description": "This release adds support for enabling or disabling Natural Language Query Processing feature for Amazon OpenSearch Service domains, and provides visibility into the current state of the setup or tear-down.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 8fcb313612b..b70823954d4 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.43" +const goModuleVersion = "1.14.7" diff --git a/service/datazone/types/types.go b/service/datazone/types/types.go index 12038dca9b9..31183d9d7ef 100644 --- a/service/datazone/types/types.go +++ b/service/datazone/types/types.go @@ -466,6 +466,8 @@ type DataProductSummary struct { CreatedBy *string // + // + // Deprecated: This structure is deprecated. DataProductItems []DataProductItem // @@ -2253,6 +2255,8 @@ type SearchInventoryResultItemMemberAssetItem struct { func (*SearchInventoryResultItemMemberAssetItem) isSearchInventoryResultItem() {} // The data product item included in the search results. +// +// Deprecated: This field is deprecated. type SearchInventoryResultItemMemberDataProductItem struct { Value DataProductSummary diff --git a/service/fsx/serializers.go b/service/fsx/serializers.go index 83b887bda05..3798fda6e1c 100644 --- a/service/fsx/serializers.go +++ b/service/fsx/serializers.go @@ -4283,6 +4283,11 @@ func awsAwsjson11_serializeDocumentUpdateFileSystemOntapConfiguration(v *types.U ok.String(*v.FsxAdminPassword) } + if v.HAPairs != nil { + ok := object.Key("HAPairs") + ok.Integer(*v.HAPairs) + } + if v.RemoveRouteTableIds != nil { ok := object.Key("RemoveRouteTableIds") if err := awsAwsjson11_serializeDocumentRouteTableIds(v.RemoveRouteTableIds, ok); err != nil { diff --git a/service/fsx/types/enums.go b/service/fsx/types/enums.go index a284146c3e1..d955f275b46 100644 --- a/service/fsx/types/enums.go +++ b/service/fsx/types/enums.go @@ -43,6 +43,7 @@ const ( AdministrativeActionTypeMisconfiguredStateRecovery AdministrativeActionType = "MISCONFIGURED_STATE_RECOVERY" AdministrativeActionTypeVolumeUpdateWithSnapshot AdministrativeActionType = "VOLUME_UPDATE_WITH_SNAPSHOT" AdministrativeActionTypeVolumeInitializeWithSnapshot AdministrativeActionType = "VOLUME_INITIALIZE_WITH_SNAPSHOT" + AdministrativeActionTypeDownloadDataFromBackup AdministrativeActionType = "DOWNLOAD_DATA_FROM_BACKUP" ) // Values returns all known values for AdministrativeActionType. Note that this @@ -65,6 +66,7 @@ func (AdministrativeActionType) Values() []AdministrativeActionType { "MISCONFIGURED_STATE_RECOVERY", "VOLUME_UPDATE_WITH_SNAPSHOT", "VOLUME_INITIALIZE_WITH_SNAPSHOT", + "DOWNLOAD_DATA_FROM_BACKUP", } } @@ -697,6 +699,7 @@ const ( OntapDeploymentTypeMultiAz1 OntapDeploymentType = "MULTI_AZ_1" OntapDeploymentTypeSingleAz1 OntapDeploymentType = "SINGLE_AZ_1" OntapDeploymentTypeSingleAz2 OntapDeploymentType = "SINGLE_AZ_2" + OntapDeploymentTypeMultiAz2 OntapDeploymentType = "MULTI_AZ_2" ) // Values returns all known values for OntapDeploymentType. Note that this can be @@ -708,6 +711,7 @@ func (OntapDeploymentType) Values() []OntapDeploymentType { "MULTI_AZ_1", "SINGLE_AZ_1", "SINGLE_AZ_2", + "MULTI_AZ_2", } } @@ -778,9 +782,11 @@ type OpenZFSDeploymentType string // Enum values for OpenZFSDeploymentType const ( - OpenZFSDeploymentTypeSingleAz1 OpenZFSDeploymentType = "SINGLE_AZ_1" - OpenZFSDeploymentTypeSingleAz2 OpenZFSDeploymentType = "SINGLE_AZ_2" - OpenZFSDeploymentTypeMultiAz1 OpenZFSDeploymentType = "MULTI_AZ_1" + OpenZFSDeploymentTypeSingleAz1 OpenZFSDeploymentType = "SINGLE_AZ_1" + OpenZFSDeploymentTypeSingleAz2 OpenZFSDeploymentType = "SINGLE_AZ_2" + OpenZFSDeploymentTypeSingleAzHa1 OpenZFSDeploymentType = "SINGLE_AZ_HA_1" + OpenZFSDeploymentTypeSingleAzHa2 OpenZFSDeploymentType = "SINGLE_AZ_HA_2" + OpenZFSDeploymentTypeMultiAz1 OpenZFSDeploymentType = "MULTI_AZ_1" ) // Values returns all known values for OpenZFSDeploymentType. Note that this can @@ -791,6 +797,8 @@ func (OpenZFSDeploymentType) Values() []OpenZFSDeploymentType { return []OpenZFSDeploymentType{ "SINGLE_AZ_1", "SINGLE_AZ_2", + "SINGLE_AZ_HA_1", + "SINGLE_AZ_HA_2", "MULTI_AZ_1", } } @@ -1064,6 +1072,7 @@ const ( StatusPending Status = "PENDING" StatusCompleted Status = "COMPLETED" StatusUpdatedOptimizing Status = "UPDATED_OPTIMIZING" + StatusOptimizing Status = "OPTIMIZING" ) // Values returns all known values for Status. Note that this can be expanded in @@ -1077,6 +1086,7 @@ func (Status) Values() []Status { "PENDING", "COMPLETED", "UPDATED_OPTIMIZING", + "OPTIMIZING", } } diff --git a/service/fsx/types/types.go b/service/fsx/types/types.go index fb9d1447360..f7250a809c6 100644 --- a/service/fsx/types/types.go +++ b/service/fsx/types/types.go @@ -49,8 +49,8 @@ type AdministrativeAction struct { // information, see [Managing throughput capacity]in the Amazon FSx for Windows File Server User Guide. // // - STORAGE_OPTIMIZATION - After the FILE_SYSTEM_UPDATE task to increase a file - // system's storage capacity has been completed successfully, a - // STORAGE_OPTIMIZATION task starts. + // system's storage capacity has completed successfully, a STORAGE_OPTIMIZATION + // task starts. // // - For Windows and ONTAP, storage optimization is the process of migrating the // file system data to newer larger disks. @@ -104,6 +104,11 @@ type AdministrativeAction struct { // - RELEASE_NFS_V3_LOCKS - Tracks the release of Network File System (NFS) V3 // locks on an Amazon FSx for OpenZFS file system. // + // - DOWNLOAD_DATA_FROM_BACKUP - An FSx for ONTAP backup is being restored to a + // new volume on a second-generation file system. Once the all the file metadata is + // loaded onto the volume, you can mount the volume with read-only access. during + // this process. + // // - VOLUME_INITIALIZE_WITH_SNAPSHOT - A volume is being created from a snapshot // on a different FSx for OpenZFS file system. You can initiate this from the // Amazon FSx console, API ( CreateVolume ), or CLI ( create-volume ) when using @@ -125,8 +130,9 @@ type AdministrativeAction struct { // Provides information about a failed administrative action. FailureDetails *AdministrativeActionFailureDetails - // The percentage-complete status of a STORAGE_OPTIMIZATION administrative action. - // Does not apply to any other administrative action type. + // The percentage-complete status of a STORAGE_OPTIMIZATION or + // DOWNLOAD_DATA_FROM_BACKUP administrative action. Does not apply to any other + // administrative action type. ProgressPercent *int32 // The remaining bytes to transfer for the FSx for OpenZFS snapshot that you're @@ -146,9 +152,23 @@ type AdministrativeAction struct { // // - COMPLETED - Amazon FSx has finished processing the administrative task. // + // For a backup restore to a second-generation FSx for ONTAP file system, + // indicates that all data has been downloaded to the volume, and clients now have + // read-write access to volume. + // // - UPDATED_OPTIMIZING - For a storage-capacity increase update, Amazon FSx has // updated the file system with the new storage capacity, and is now performing the // storage-optimization process. + // + // - PENDING - For a backup restore to a second-generation FSx for ONTAP file + // system, indicates that the file metadata is being downloaded onto the volume. + // The volume's Lifecycle state is CREATING. + // + // - IN_PROGRESS - For a backup restore to a second-generation FSx for ONTAP file + // system, indicates that all metadata has been downloaded to the new volume and + // client can access data with read-only access while Amazon FSx downloads the file + // data to the volume. Track the progress of this process with the + // ProgressPercent element. Status Status // The target value for the administration action, provided in the UpdateFileSystem @@ -191,7 +211,7 @@ type AggregateConfiguration struct { // following conditions: // // - The strings in the value of Aggregates are not are not formatted as aggrX , - // where X is a number between 1 and 6. + // where X is a number between 1 and 12. // // - The value of Aggregates contains aggregates that are not present. // @@ -777,13 +797,20 @@ type CreateFileSystemOntapConfiguration struct { // Specifies the FSx for ONTAP file system deployment type to use in creating the // file system. // - // - MULTI_AZ_1 - (Default) A high availability file system configured for - // Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) unavailability. + // - MULTI_AZ_1 - A high availability file system configured for Multi-AZ + // redundancy to tolerate temporary Availability Zone (AZ) unavailability. This is + // a first-generation FSx for ONTAP file system. + // + // - MULTI_AZ_2 - A high availability file system configured for Multi-AZ + // redundancy to tolerate temporary AZ unavailability. This is a second-generation + // FSx for ONTAP file system. // - // - SINGLE_AZ_1 - A file system configured for Single-AZ redundancy. + // - SINGLE_AZ_1 - A file system configured for Single-AZ redundancy. This is a + // first-generation FSx for ONTAP file system. // // - SINGLE_AZ_2 - A file system configured with multiple high-availability (HA) - // pairs for Single-AZ redundancy. + // pairs for Single-AZ redundancy. This is a second-generation FSx for ONTAP file + // system. // // For information about the use cases for Multi-AZ and Single-AZ deployments, // refer to [Choosing a file system deployment type]. @@ -820,10 +847,13 @@ type CreateFileSystemOntapConfiguration struct { FsxAdminPassword *string // Specifies how many high-availability (HA) pairs of file servers will power your - // file system. Scale-up file systems are powered by 1 HA pair. The default value - // is 1. FSx for ONTAP scale-out file systems are powered by up to 12 HA pairs. The - // value of this property affects the values of StorageCapacity , Iops , and - // ThroughputCapacity . For more information, see [High-availability (HA) pairs] in the FSx for ONTAP user guide. + // file system. First-generation file systems are powered by 1 HA pair. + // Second-generation multi-AZ file systems are powered by 1 HA pair. Second + // generation single-AZ file systems are powered by up to 12 HA pairs. The default + // value is 1. The value of this property affects the values of StorageCapacity , + // Iops , and ThroughputCapacity . For more information, see [High-availability (HA) pairs] in the FSx for ONTAP + // user guide. Block storage protocol support (iSCSI and NVMe over TCP) is disabled + // on file systems with more than 6 HA pairs. For more information, see [Using block storage protocols]. // // Amazon FSx responds with an HTTP status code 400 (Bad Request) for the // following conditions: @@ -831,13 +861,14 @@ type CreateFileSystemOntapConfiguration struct { // - The value of HAPairs is less than 1 or greater than 12. // // - The value of HAPairs is greater than 1 and the value of DeploymentType is - // SINGLE_AZ_1 or MULTI_AZ_1 . + // SINGLE_AZ_1 , MULTI_AZ_1 , or MULTI_AZ_2 . // + // [Using block storage protocols]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/supported-fsx-clients.html#using-block-storage // [High-availability (HA) pairs]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/administering-file-systems.html#HA-pairs HAPairs *int32 - // Required when DeploymentType is set to MULTI_AZ_1 . This specifies the subnet in - // which you want the preferred file server to be located. + // Required when DeploymentType is set to MULTI_AZ_1 or MULTI_AZ_2 . This specifies + // the subnet in which you want the preferred file server to be located. PreferredSubnetId *string // (Multi-AZ only) Specifies the route tables in which Amazon FSx creates the @@ -875,13 +906,15 @@ type CreateFileSystemOntapConfiguration struct { // You can define either the ThroughputCapacityPerHAPair or the ThroughputCapacity // when creating a file system, but not both. // - // This field and ThroughputCapacity are the same for scale-up file systems - // powered by one HA pair. + // This field and ThroughputCapacity are the same for file systems powered by one + // HA pair. // // - For SINGLE_AZ_1 and MULTI_AZ_1 file systems, valid values are 128, 256, 512, // 1024, 2048, or 4096 MBps. // - // - For SINGLE_AZ_2 file systems, valid values are 3072 or 6144 MBps. + // - For SINGLE_AZ_2 , valid values are 1536, 3072, or 6144 MBps. + // + // - For MULTI_AZ_2 , valid values are 384, 768, 1536, 3072, or 6144 MBps. // // Amazon FSx responds with an HTTP status code 400 (Bad Request) for the // following conditions: @@ -890,7 +923,7 @@ type CreateFileSystemOntapConfiguration struct { // same value for file systems with one HA pair. // // - The value of deployment type is SINGLE_AZ_2 and ThroughputCapacity / - // ThroughputCapacityPerHAPair is a valid HA pair (a value between 2 and 12). + // ThroughputCapacityPerHAPair is not a valid HA pair (a value between 1 and 12). // // - The value of ThroughputCapacityPerHAPair is not a valid value. ThroughputCapacityPerHAPair *int32 @@ -915,26 +948,30 @@ type CreateFileSystemOntapConfiguration struct { // you are creating. type CreateFileSystemOpenZFSConfiguration struct { - // Specifies the file system deployment type. Single AZ deployment types are - // configured for redundancy within a single Availability Zone in an Amazon Web - // Services Region . Valid values are the following: + // Specifies the file system deployment type. Valid values are the following: // - // - MULTI_AZ_1 - Creates file systems with high availability that are configured - // for Multi-AZ redundancy to tolerate temporary unavailability in Availability - // Zones (AZs). Multi_AZ_1 is available only in the US East (N. Virginia), US - // East (Ohio), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Tokyo), - // and Europe (Ireland) Amazon Web Services Regions. + // - MULTI_AZ_1 - Creates file systems with high availability and durability by + // replicating your data and supporting failover across multiple Availability Zones + // in the same Amazon Web Services Region. // - // - SINGLE_AZ_1 - Creates file systems with throughput capacities of 64 - 4,096 - // MB/s. Single_AZ_1 is available in all Amazon Web Services Regions where Amazon - // FSx for OpenZFS is available. + // - SINGLE_AZ_HA_2 - Creates file systems with high availability and throughput + // capacities of 160 - 10,240 MB/s using an NVMe L2ARC cache by deploying a primary + // and standby file system within the same Availability Zone. + // + // - SINGLE_AZ_HA_1 - Creates file systems with high availability and throughput + // capacities of 64 - 4,096 MB/s by deploying a primary and standby file system + // within the same Availability Zone. // // - SINGLE_AZ_2 - Creates file systems with throughput capacities of 160 - - // 10,240 MB/s using an NVMe L2ARC cache. Single_AZ_2 is available only in the US - // East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Singapore), - // Asia Pacific (Tokyo), and Europe (Ireland) Amazon Web Services Regions. + // 10,240 MB/s using an NVMe L2ARC cache that automatically recover within a single + // Availability Zone. + // + // - SINGLE_AZ_1 - Creates file systems with throughput capacities of 64 - 4,096 + // MBs that automatically recover within a single Availability Zone. // - // For more information, see [Deployment type availability] and [File system performance] in the Amazon FSx for OpenZFS User Guide. + // For a list of which Amazon Web Services Regions each deployment type is + // available in, see [Deployment type availability]. For more information on the differences in performance + // between deployment types, see [File system performance]in the Amazon FSx for OpenZFS User Guide. // // [Deployment type availability]: https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/availability-durability.html#available-aws-regions // [File system performance]: https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/performance.html#zfs-fs-performance @@ -2235,7 +2272,7 @@ type FileCacheCreating struct { // cache. DataRepositoryAssociationIds []string - // A structure providing details of any failures that occurred. + // A structure providing details of any failures that occurred in creating a cache. FailureDetails *FileCacheFailureDetails // The system-generated, unique ID of the cache. @@ -2948,13 +2985,20 @@ type OntapFileSystemConfiguration struct { // Specifies the FSx for ONTAP file system deployment type in use in the file // system. // - // - MULTI_AZ_1 - (Default) A high availability file system configured for - // Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) unavailability. + // - MULTI_AZ_1 - A high availability file system configured for Multi-AZ + // redundancy to tolerate temporary Availability Zone (AZ) unavailability. This is + // a first-generation FSx for ONTAP file system. // - // - SINGLE_AZ_1 - A file system configured for Single-AZ redundancy. + // - MULTI_AZ_2 - A high availability file system configured for Multi-AZ + // redundancy to tolerate temporary AZ unavailability. This is a second-generation + // FSx for ONTAP file system. + // + // - SINGLE_AZ_1 - A file system configured for Single-AZ redundancy. This is a + // first-generation FSx for ONTAP file system. // // - SINGLE_AZ_2 - A file system configured with multiple high-availability (HA) - // pairs for Single-AZ redundancy. + // pairs for Single-AZ redundancy. This is a second-generation FSx for ONTAP file + // system. // // For information about the use cases for Multi-AZ and Single-AZ deployments, // refer to [Choosing Multi-AZ or Single-AZ file system deployment]. @@ -2995,7 +3039,7 @@ type OntapFileSystemConfiguration struct { // - The value of HAPairs is less than 1 or greater than 12. // // - The value of HAPairs is greater than 1 and the value of DeploymentType is - // SINGLE_AZ_1 or MULTI_AZ_1 . + // SINGLE_AZ_1 , MULTI_AZ_1 , or MULTI_AZ_2 . // // [High-availability (HA) pairs]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/HA-pairs.html HAPairs *int32 @@ -3024,10 +3068,12 @@ type OntapFileSystemConfiguration struct { // This field and ThroughputCapacity are the same for file systems with one HA // pair. // - // - For SINGLE_AZ_1 and MULTI_AZ_1 , valid values are 128, 256, 512, 1024, 2048, - // or 4096 MBps. + // - For SINGLE_AZ_1 and MULTI_AZ_1 file systems, valid values are 128, 256, 512, + // 1024, 2048, or 4096 MBps. + // + // - For SINGLE_AZ_2 , valid values are 1536, 3072, or 6144 MBps. // - // - For SINGLE_AZ_2 , valid values are 3072 or 6144 MBps. + // - For MULTI_AZ_2 , valid values are 384, 768, 1536, 3072, or 6144 MBps. // // Amazon FSx responds with an HTTP status code 400 (Bad Request) for the // following conditions: @@ -3036,7 +3082,7 @@ type OntapFileSystemConfiguration struct { // same value. // // - The value of deployment type is SINGLE_AZ_2 and ThroughputCapacity / - // ThroughputCapacityPerHAPair is a valid HA pair (a value between 2 and 12). + // ThroughputCapacityPerHAPair is not a valid HA pair (a value between 1 and 12). // // - The value of ThroughputCapacityPerHAPair is not a valid value. ThroughputCapacityPerHAPair *int32 @@ -3283,7 +3329,7 @@ type OpenZFSFileSystemConfiguration struct { DailyAutomaticBackupStartTime *string // Specifies the file-system deployment type. Amazon FSx for OpenZFS supports - // MULTI_AZ_1 , SINGLE_AZ_1 , and SINGLE_AZ_2 . + // MULTI_AZ_1 , SINGLE_AZ_HA_2 , SINGLE_AZ_HA_1 , SINGLE_AZ_2 , and SINGLE_AZ_1 . DeploymentType OpenZFSDeploymentType // The SSD IOPS (input/output operations per second) configuration for an Amazon @@ -4265,6 +4311,18 @@ type UpdateFileSystemOntapConfiguration struct { // [Managing resources using NetApp Applicaton]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-resources-ontap-apps.html FsxAdminPassword *string + // Use to update the number of high-availability (HA) pairs for a + // second-generation single-AZ file system. If you increase the number of HA pairs + // for your file system, you must specify proportional increases for + // StorageCapacity , Iops , and ThroughputCapacity . For more information, see [High-availability (HA) pairs] in + // the FSx for ONTAP user guide. Block storage protocol support (iSCSI and NVMe + // over TCP) is disabled on file systems with more than 6 HA pairs. For more + // information, see [Using block storage protocols]. + // + // [Using block storage protocols]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/supported-fsx-clients.html#using-block-storage + // [High-availability (HA) pairs]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/administering-file-systems.html#HA-pairs + HAPairs *int32 + // (Multi-AZ only) A list of IDs of existing virtual private cloud (VPC) route // tables to disassociate (remove) from your Amazon FSx for NetApp ONTAP file // system. You can use the API operation to retrieve the list of VPC route table @@ -4296,10 +4354,12 @@ type UpdateFileSystemOntapConfiguration struct { // This field and ThroughputCapacity are the same for file systems with one HA // pair. // - // - For SINGLE_AZ_1 and MULTI_AZ_1 , valid values are 128, 256, 512, 1024, 2048, - // or 4096 MBps. + // - For SINGLE_AZ_1 and MULTI_AZ_1 file systems, valid values are 128, 256, 512, + // 1024, 2048, or 4096 MBps. + // + // - For SINGLE_AZ_2 , valid values are 1536, 3072, or 6144 MBps. // - // - For SINGLE_AZ_2 , valid values are 3072 or 6144 MBps. + // - For MULTI_AZ_2 , valid values are 384, 768, 1536, 3072, or 6144 MBps. // // Amazon FSx responds with an HTTP status code 400 (Bad Request) for the // following conditions: @@ -4308,7 +4368,7 @@ type UpdateFileSystemOntapConfiguration struct { // same value for file systems with one HA pair. // // - The value of deployment type is SINGLE_AZ_2 and ThroughputCapacity / - // ThroughputCapacityPerHAPair is a valid HA pair (a value between 2 and 12). + // ThroughputCapacityPerHAPair is not a valid HA pair (a value between 1 and 12). // // - The value of ThroughputCapacityPerHAPair is not a valid value. ThroughputCapacityPerHAPair *int32 diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go index 2018e876430..a45e86f9a7c 100644 --- a/service/opensearch/api_op_CreateDomain.go +++ b/service/opensearch/api_op_CreateDomain.go @@ -37,6 +37,9 @@ type CreateDomainInput struct { // This member is required. DomainName *string + // Options for all machine learning features for the specified domain. + AIMLOptions *types.AIMLOptionsInput + // Identity and Access Management (IAM) policy document specifying the access // policies for the new domain. AccessPolicies *string diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index 913f2706ebb..7581ab762dd 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -36,6 +36,9 @@ type UpdateDomainConfigInput struct { // This member is required. DomainName *string + // Options for all machine learning features for the specified domain. + AIMLOptions *types.AIMLOptionsInput + // Identity and Access Management (IAM) access policy as a JSON-formatted string. AccessPolicies *string diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index 9704a4ee8a1..bdb7f8017b5 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -11174,6 +11174,83 @@ func awsRestjson1_deserializeDocumentAdvancedSecurityOptionsStatus(v **types.Adv return nil } +func awsRestjson1_deserializeDocumentAIMLOptionsOutput(v **types.AIMLOptionsOutput, 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.AIMLOptionsOutput + if *v == nil { + sv = &types.AIMLOptionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NaturalLanguageQueryGenerationOptions": + if err := awsRestjson1_deserializeDocumentNaturalLanguageQueryGenerationOptionsOutput(&sv.NaturalLanguageQueryGenerationOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAIMLOptionsStatus(v **types.AIMLOptionsStatus, 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.AIMLOptionsStatus + if *v == nil { + sv = &types.AIMLOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentAIMLOptionsOutput(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAuthorizedPrincipal(v **types.AuthorizedPrincipal, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13201,6 +13278,11 @@ func awsRestjson1_deserializeDocumentDomainConfig(v **types.DomainConfig, value return err } + case "AIMLOptions": + if err := awsRestjson1_deserializeDocumentAIMLOptionsStatus(&sv.AIMLOptions, value); err != nil { + return err + } + case "AutoTuneOptions": if err := awsRestjson1_deserializeDocumentAutoTuneOptionsStatus(&sv.AutoTuneOptions, value); err != nil { return err @@ -14004,6 +14086,11 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value return err } + case "AIMLOptions": + if err := awsRestjson1_deserializeDocumentAIMLOptionsOutput(&sv.AIMLOptions, value); err != nil { + return err + } + case "ARN": if value != nil { jtv, ok := value.(string) @@ -15884,6 +15971,55 @@ func awsRestjson1_deserializeDocumentModifyingPropertiesList(v *[]types.Modifyin return nil } +func awsRestjson1_deserializeDocumentNaturalLanguageQueryGenerationOptionsOutput(v **types.NaturalLanguageQueryGenerationOptionsOutput, 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.NaturalLanguageQueryGenerationOptionsOutput + if *v == nil { + sv = &types.NaturalLanguageQueryGenerationOptionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CurrentState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NaturalLanguageQueryGenerationCurrentState to be of type string, got %T instead", value) + } + sv.CurrentState = types.NaturalLanguageQueryGenerationCurrentState(jtv) + } + + case "DesiredState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NaturalLanguageQueryGenerationDesiredState to be of type string, got %T instead", value) + } + sv.DesiredState = types.NaturalLanguageQueryGenerationDesiredState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptions(v **types.NodeToNodeEncryptionOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index 0f7c08ab5d1..21833bdfe7e 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -673,6 +673,13 @@ func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val } } + if v.AIMLOptions != nil { + ok := object.Key("AIMLOptions") + if err := awsRestjson1_serializeDocumentAIMLOptionsInput(v.AIMLOptions, ok); err != nil { + return err + } + } + if v.AutoTuneOptions != nil { ok := object.Key("AutoTuneOptions") if err := awsRestjson1_serializeDocumentAutoTuneOptionsInput(v.AutoTuneOptions, ok); err != nil { @@ -4611,6 +4618,13 @@ func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConf } } + if v.AIMLOptions != nil { + ok := object.Key("AIMLOptions") + if err := awsRestjson1_serializeDocumentAIMLOptionsInput(v.AIMLOptions, ok); err != nil { + return err + } + } + if v.AutoTuneOptions != nil { ok := object.Key("AutoTuneOptions") if err := awsRestjson1_serializeDocumentAutoTuneOptions(v.AutoTuneOptions, ok); err != nil { @@ -5136,6 +5150,20 @@ func awsRestjson1_serializeDocumentAdvancedSecurityOptionsInput(v *types.Advance return nil } +func awsRestjson1_serializeDocumentAIMLOptionsInput(v *types.AIMLOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NaturalLanguageQueryGenerationOptions != nil { + ok := object.Key("NaturalLanguageQueryGenerationOptions") + if err := awsRestjson1_serializeDocumentNaturalLanguageQueryGenerationOptionsInput(v.NaturalLanguageQueryGenerationOptions, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAutoTuneMaintenanceSchedule(v *types.AutoTuneMaintenanceSchedule, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5685,6 +5713,18 @@ func awsRestjson1_serializeDocumentMasterUserOptions(v *types.MasterUserOptions, return nil } +func awsRestjson1_serializeDocumentNaturalLanguageQueryGenerationOptionsInput(v *types.NaturalLanguageQueryGenerationOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredState) > 0 { + ok := object.Key("DesiredState") + ok.String(string(v.DesiredState)) + } + + return nil +} + func awsRestjson1_serializeDocumentNodeToNodeEncryptionOptions(v *types.NodeToNodeEncryptionOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 7e93821cbfa..f659df614ac 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -552,6 +552,56 @@ func (MasterNodeStatus) Values() []MasterNodeStatus { } } +type NaturalLanguageQueryGenerationCurrentState string + +// Enum values for NaturalLanguageQueryGenerationCurrentState +const ( + NaturalLanguageQueryGenerationCurrentStateNotEnabled NaturalLanguageQueryGenerationCurrentState = "NOT_ENABLED" + NaturalLanguageQueryGenerationCurrentStateEnableComplete NaturalLanguageQueryGenerationCurrentState = "ENABLE_COMPLETE" + NaturalLanguageQueryGenerationCurrentStateEnableInProgress NaturalLanguageQueryGenerationCurrentState = "ENABLE_IN_PROGRESS" + NaturalLanguageQueryGenerationCurrentStateEnableFailed NaturalLanguageQueryGenerationCurrentState = "ENABLE_FAILED" + NaturalLanguageQueryGenerationCurrentStateDisableComplete NaturalLanguageQueryGenerationCurrentState = "DISABLE_COMPLETE" + NaturalLanguageQueryGenerationCurrentStateDisableInProgress NaturalLanguageQueryGenerationCurrentState = "DISABLE_IN_PROGRESS" + NaturalLanguageQueryGenerationCurrentStateDisableFailed NaturalLanguageQueryGenerationCurrentState = "DISABLE_FAILED" +) + +// Values returns all known values for NaturalLanguageQueryGenerationCurrentState. +// 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 (NaturalLanguageQueryGenerationCurrentState) Values() []NaturalLanguageQueryGenerationCurrentState { + return []NaturalLanguageQueryGenerationCurrentState{ + "NOT_ENABLED", + "ENABLE_COMPLETE", + "ENABLE_IN_PROGRESS", + "ENABLE_FAILED", + "DISABLE_COMPLETE", + "DISABLE_IN_PROGRESS", + "DISABLE_FAILED", + } +} + +type NaturalLanguageQueryGenerationDesiredState string + +// Enum values for NaturalLanguageQueryGenerationDesiredState +const ( + NaturalLanguageQueryGenerationDesiredStateEnabled NaturalLanguageQueryGenerationDesiredState = "ENABLED" + NaturalLanguageQueryGenerationDesiredStateDisabled NaturalLanguageQueryGenerationDesiredState = "DISABLED" +) + +// Values returns all known values for NaturalLanguageQueryGenerationDesiredState. +// 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 (NaturalLanguageQueryGenerationDesiredState) Values() []NaturalLanguageQueryGenerationDesiredState { + return []NaturalLanguageQueryGenerationDesiredState{ + "ENABLED", + "DISABLED", + } +} + type NodeStatus string // Enum values for NodeStatus diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 4fabdd1de3d..94477c0deb4 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -165,6 +165,39 @@ type AdvancedSecurityOptionsStatus struct { noSmithyDocumentSerde } +// Container for parameters required to enable all machine learning features. +type AIMLOptionsInput struct { + + // Container for parameters required for natural language query generation on the + // specified domain. + NaturalLanguageQueryGenerationOptions *NaturalLanguageQueryGenerationOptionsInput + + noSmithyDocumentSerde +} + +// Container for parameters representing the state of machine learning features on +// the specified domain. +type AIMLOptionsOutput struct { + + // Container for parameters required for natural language query generation on the + // specified domain. + NaturalLanguageQueryGenerationOptions *NaturalLanguageQueryGenerationOptionsOutput + + noSmithyDocumentSerde +} + +// The status of machine learning options on the specified domain. +type AIMLOptionsStatus struct { + + // Machine learning options on the specified domain. + Options *AIMLOptionsOutput + + // Provides the current status of an entity. + Status *OptionStatus + + noSmithyDocumentSerde +} + // Information about an Amazon Web Services account or service that has access to // an Amazon OpenSearch Service domain through the use of an interface VPC // endpoint. @@ -707,6 +740,9 @@ type DescribePackagesFilter struct { // Container for the configuration of an OpenSearch Service domain. type DomainConfig struct { + // Container for parameters required to enable all machine learning features. + AIMLOptions *AIMLOptionsStatus + // Specifies the access policies for the domain. AccessPolicies *AccessPoliciesStatus @@ -972,6 +1008,9 @@ type DomainStatus struct { // This member is required. DomainName *string + // Container for parameters required to enable all machine learning features. + AIMLOptions *AIMLOptionsOutput + // Identity and Access Management (IAM) policy document specifying the access // policies for the domain. AccessPolicies *string @@ -1508,6 +1547,32 @@ type ModifyingProperties struct { noSmithyDocumentSerde } +// Container for parameters required to enable the natural language query +// generation feature. +type NaturalLanguageQueryGenerationOptionsInput struct { + + // The desired state of the natural language query generation feature. Valid + // values are ENABLED and DISABLED. + DesiredState NaturalLanguageQueryGenerationDesiredState + + noSmithyDocumentSerde +} + +// Container for parameters representing the state of the natural language query +// generation feature on the specified domain. +type NaturalLanguageQueryGenerationOptionsOutput struct { + + // The current state of the natural language query generation feature, indicating + // completion, in progress, or failure. + CurrentState NaturalLanguageQueryGenerationCurrentState + + // The desired state of the natural language query generation feature. Valid + // values are ENABLED and DISABLED. + DesiredState NaturalLanguageQueryGenerationDesiredState + + noSmithyDocumentSerde +} + // Enables or disables node-to-node encryption. For more information, see [Node-to-node encryption for Amazon OpenSearch Service]. // // [Node-to-node encryption for Amazon OpenSearch Service]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ntn.html diff --git a/service/redshift/internal/endpoints/endpoints.go b/service/redshift/internal/endpoints/endpoints.go index a7f6a622130..dd5c1bb8979 100644 --- a/service/redshift/internal/endpoints/endpoints.go +++ b/service/redshift/internal/endpoints/endpoints.go @@ -383,40 +383,20 @@ var defaultPartitions = endpoints.Partitions{ IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ - Region: "fips-us-iso-east-1", + Region: "us-iso-east-1", }: endpoints.Endpoint{ - Hostname: "redshift-fips.us-iso-east-1.c2s.ic.gov", + Hostname: "redshift.us-iso-east-1.c2s.ic.gov", CredentialScope: endpoints.CredentialScope{ Region: "us-iso-east-1", }, - Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ - Region: "fips-us-iso-west-1", + Region: "us-iso-west-1", }: endpoints.Endpoint{ - Hostname: "redshift-fips.us-iso-west-1.c2s.ic.gov", + Hostname: "redshift.us-iso-west-1.c2s.ic.gov", CredentialScope: endpoints.CredentialScope{ Region: "us-iso-west-1", }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-iso-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "redshift-fips.us-iso-east-1.c2s.ic.gov", - }, - endpoints.EndpointKey{ - Region: "us-iso-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "redshift-fips.us-iso-west-1.c2s.ic.gov", }, }, }, @@ -442,22 +422,12 @@ var defaultPartitions = endpoints.Partitions{ IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ - Region: "fips-us-isob-east-1", + Region: "us-isob-east-1", }: endpoints.Endpoint{ - Hostname: "redshift-fips.us-isob-east-1.sc2s.sgov.gov", + Hostname: "redshift.us-isob-east-1.sc2s.sgov.gov", CredentialScope: endpoints.CredentialScope{ Region: "us-isob-east-1", }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-isob-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-isob-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "redshift-fips.us-isob-east-1.sc2s.sgov.gov", }, }, }, diff --git a/service/sagemaker/api_op_CreateOptimizationJob.go b/service/sagemaker/api_op_CreateOptimizationJob.go new file mode 100644 index 00000000000..5bd3c456b45 --- /dev/null +++ b/service/sagemaker/api_op_CreateOptimizationJob.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sagemaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/sagemaker/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a job that optimizes a model for inference performance. To create the +// job, you provide the location of a source model, and you provide the settings +// for the optimization techniques that you want the job to apply. When the job +// completes successfully, SageMaker uploads the new optimized model to the output +// destination that you specify. +// +// For more information about how to use this action, and about the supported +// optimization techniques, see [Optimize model inference with Amazon SageMaker]. +// +// [Optimize model inference with Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/model-optimize.html +func (c *Client) CreateOptimizationJob(ctx context.Context, params *CreateOptimizationJobInput, optFns ...func(*Options)) (*CreateOptimizationJobOutput, error) { + if params == nil { + params = &CreateOptimizationJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOptimizationJob", params, optFns, c.addOperationCreateOptimizationJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOptimizationJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOptimizationJobInput struct { + + // The type of instance that hosts the optimized model that you create with the + // optimization job. + // + // This member is required. + DeploymentInstanceType types.OptimizationJobDeploymentInstanceType + + // The location of the source model to optimize with an optimization job. + // + // This member is required. + ModelSource *types.OptimizationJobModelSource + + // Settings for each of the optimization techniques that the job applies. + // + // This member is required. + OptimizationConfigs []types.OptimizationConfig + + // A custom name for the new optimization job. + // + // This member is required. + OptimizationJobName *string + + // Details for where to store the optimized model that you create with the + // optimization job. + // + // This member is required. + OutputConfig *types.OptimizationJobOutputConfig + + // The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to + // perform tasks on your behalf. + // + // During model optimization, Amazon SageMaker needs your permission to: + // + // - Read input data from an S3 bucket + // + // - Write model artifacts to an S3 bucket + // + // - Write logs to Amazon CloudWatch Logs + // + // - Publish metrics to Amazon CloudWatch + // + // You grant permissions for all of these tasks to an IAM role. To pass this role + // to Amazon SageMaker, the caller of this API must have the iam:PassRole + // permission. For more information, see [Amazon SageMaker Roles.] + // + // [Amazon SageMaker Roles.]: https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html + // + // This member is required. + RoleArn *string + + // Specifies a limit to how long a job can run. When the job reaches the time + // limit, SageMaker ends the job. Use this API to cap costs. + // + // To stop a training job, SageMaker sends the algorithm the SIGTERM signal, which + // delays job termination for 120 seconds. Algorithms can use this 120-second + // window to save the model artifacts, so the results of training are not lost. + // + // The training algorithms provided by SageMaker automatically save the + // intermediate results of a model training job when possible. This attempt to save + // artifacts is only a best effort case as model might not be in a state from which + // it can be saved. For example, if training has just started, the model might not + // be ready to save. When saved, this intermediate data is a valid model artifact. + // You can use it to create a model with CreateModel . + // + // The Neural Topic Model (NTM) currently does not support saving intermediate + // model artifacts. When training NTMs, make sure that the maximum runtime is + // sufficient for the training job to complete. + // + // This member is required. + StoppingCondition *types.StoppingCondition + + // The environment variables to set in the model container. + OptimizationEnvironment map[string]string + + // A list of key-value pairs associated with the optimization job. For more + // information, see [Tagging Amazon Web Services resources]in the Amazon Web Services General Reference Guide. + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags []types.Tag + + // A VPC in Amazon VPC that your optimized model has access to. + VpcConfig *types.OptimizationVpcConfig + + noSmithyDocumentSerde +} + +type CreateOptimizationJobOutput struct { + + // The Amazon Resource Name (ARN) of the optimization job. + // + // This member is required. + OptimizationJobArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOptimizationJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOptimizationJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOptimizationJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOptimizationJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpCreateOptimizationJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOptimizationJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOptimizationJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOptimizationJob", + } +} diff --git a/service/sagemaker/api_op_DeleteOptimizationJob.go b/service/sagemaker/api_op_DeleteOptimizationJob.go new file mode 100644 index 00000000000..3ac9ac80f75 --- /dev/null +++ b/service/sagemaker/api_op_DeleteOptimizationJob.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sagemaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an optimization job. +func (c *Client) DeleteOptimizationJob(ctx context.Context, params *DeleteOptimizationJobInput, optFns ...func(*Options)) (*DeleteOptimizationJobOutput, error) { + if params == nil { + params = &DeleteOptimizationJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOptimizationJob", params, optFns, c.addOperationDeleteOptimizationJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOptimizationJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteOptimizationJobInput struct { + + // The name that you assigned to the optimization job. + // + // This member is required. + OptimizationJobName *string + + noSmithyDocumentSerde +} + +type DeleteOptimizationJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOptimizationJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOptimizationJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOptimizationJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOptimizationJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteOptimizationJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOptimizationJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteOptimizationJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteOptimizationJob", + } +} diff --git a/service/sagemaker/api_op_DescribeOptimizationJob.go b/service/sagemaker/api_op_DescribeOptimizationJob.go new file mode 100644 index 00000000000..589d38a1409 --- /dev/null +++ b/service/sagemaker/api_op_DescribeOptimizationJob.go @@ -0,0 +1,231 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sagemaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/sagemaker/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Provides the properties of the specified optimization job. +func (c *Client) DescribeOptimizationJob(ctx context.Context, params *DescribeOptimizationJobInput, optFns ...func(*Options)) (*DescribeOptimizationJobOutput, error) { + if params == nil { + params = &DescribeOptimizationJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeOptimizationJob", params, optFns, c.addOperationDescribeOptimizationJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeOptimizationJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeOptimizationJobInput struct { + + // The name that you assigned to the optimization job. + // + // This member is required. + OptimizationJobName *string + + noSmithyDocumentSerde +} + +type DescribeOptimizationJobOutput struct { + + // The time when you created the optimization job. + // + // This member is required. + CreationTime *time.Time + + // The type of instance that hosts the optimized model that you create with the + // optimization job. + // + // This member is required. + DeploymentInstanceType types.OptimizationJobDeploymentInstanceType + + // The time when the optimization job was last updated. + // + // This member is required. + LastModifiedTime *time.Time + + // The location of the source model to optimize with an optimization job. + // + // This member is required. + ModelSource *types.OptimizationJobModelSource + + // Settings for each of the optimization techniques that the job applies. + // + // This member is required. + OptimizationConfigs []types.OptimizationConfig + + // The Amazon Resource Name (ARN) of the optimization job. + // + // This member is required. + OptimizationJobArn *string + + // The name that you assigned to the optimization job. + // + // This member is required. + OptimizationJobName *string + + // The current status of the optimization job. + // + // This member is required. + OptimizationJobStatus types.OptimizationJobStatus + + // Details for where to store the optimized model that you create with the + // optimization job. + // + // This member is required. + OutputConfig *types.OptimizationJobOutputConfig + + // The ARN of the IAM role that you assigned to the optimization job. + // + // This member is required. + RoleArn *string + + // Specifies a limit to how long a job can run. When the job reaches the time + // limit, SageMaker ends the job. Use this API to cap costs. + // + // To stop a training job, SageMaker sends the algorithm the SIGTERM signal, which + // delays job termination for 120 seconds. Algorithms can use this 120-second + // window to save the model artifacts, so the results of training are not lost. + // + // The training algorithms provided by SageMaker automatically save the + // intermediate results of a model training job when possible. This attempt to save + // artifacts is only a best effort case as model might not be in a state from which + // it can be saved. For example, if training has just started, the model might not + // be ready to save. When saved, this intermediate data is a valid model artifact. + // You can use it to create a model with CreateModel . + // + // The Neural Topic Model (NTM) currently does not support saving intermediate + // model artifacts. When training NTMs, make sure that the maximum runtime is + // sufficient for the training job to complete. + // + // This member is required. + StoppingCondition *types.StoppingCondition + + // If the optimization job status is FAILED , the reason for the failure. + FailureReason *string + + // The time when the optimization job finished processing. + OptimizationEndTime *time.Time + + // The environment variables to set in the model container. + OptimizationEnvironment map[string]string + + // Output values produced by an optimization job. + OptimizationOutput *types.OptimizationOutput + + // The time when the optimization job started. + OptimizationStartTime *time.Time + + // A VPC in Amazon VPC that your optimized model has access to. + VpcConfig *types.OptimizationVpcConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeOptimizationJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeOptimizationJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeOptimizationJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeOptimizationJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeOptimizationJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOptimizationJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeOptimizationJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeOptimizationJob", + } +} diff --git a/service/sagemaker/api_op_ListOptimizationJobs.go b/service/sagemaker/api_op_ListOptimizationJobs.go new file mode 100644 index 00000000000..20984c0d751 --- /dev/null +++ b/service/sagemaker/api_op_ListOptimizationJobs.go @@ -0,0 +1,280 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sagemaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/sagemaker/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Lists the optimization jobs in your account and their properties. +func (c *Client) ListOptimizationJobs(ctx context.Context, params *ListOptimizationJobsInput, optFns ...func(*Options)) (*ListOptimizationJobsOutput, error) { + if params == nil { + params = &ListOptimizationJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOptimizationJobs", params, optFns, c.addOperationListOptimizationJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOptimizationJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOptimizationJobsInput struct { + + // Filters the results to only those optimization jobs that were created after the + // specified time. + CreationTimeAfter *time.Time + + // Filters the results to only those optimization jobs that were created before + // the specified time. + CreationTimeBefore *time.Time + + // Filters the results to only those optimization jobs that were updated after the + // specified time. + LastModifiedTimeAfter *time.Time + + // Filters the results to only those optimization jobs that were updated before + // the specified time. + LastModifiedTimeBefore *time.Time + + // The maximum number of optimization jobs to return in the response. The default + // is 50. + MaxResults *int32 + + // Filters the results to only those optimization jobs with a name that contains + // the specified string. + NameContains *string + + // A token that you use to get the next set of results following a truncated + // response. If the response to the previous request was truncated, that response + // provides the value for this token. + NextToken *string + + // Filters the results to only those optimization jobs that apply the specified + // optimization techniques. You can specify either Quantization or Compilation . + OptimizationContains *string + + // The field by which to sort the optimization jobs in the response. The default + // is CreationTime + SortBy types.ListOptimizationJobsSortBy + + // The sort order for results. The default is Ascending + SortOrder types.SortOrder + + // Filters the results to only those optimization jobs with the specified status. + StatusEquals types.OptimizationJobStatus + + noSmithyDocumentSerde +} + +type ListOptimizationJobsOutput struct { + + // A list of optimization jobs and their properties that matches any of the + // filters you specified in the request. + // + // This member is required. + OptimizationJobSummaries []types.OptimizationJobSummary + + // The token to use in a subsequent request to get the next set of results + // following a truncated response. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOptimizationJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOptimizationJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOptimizationJobs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOptimizationJobs"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOptimizationJobs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListOptimizationJobsPaginatorOptions is the paginator options for +// ListOptimizationJobs +type ListOptimizationJobsPaginatorOptions struct { + // The maximum number of optimization jobs to return in the response. The default + // is 50. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOptimizationJobsPaginator is a paginator for ListOptimizationJobs +type ListOptimizationJobsPaginator struct { + options ListOptimizationJobsPaginatorOptions + client ListOptimizationJobsAPIClient + params *ListOptimizationJobsInput + nextToken *string + firstPage bool +} + +// NewListOptimizationJobsPaginator returns a new ListOptimizationJobsPaginator +func NewListOptimizationJobsPaginator(client ListOptimizationJobsAPIClient, params *ListOptimizationJobsInput, optFns ...func(*ListOptimizationJobsPaginatorOptions)) *ListOptimizationJobsPaginator { + if params == nil { + params = &ListOptimizationJobsInput{} + } + + options := ListOptimizationJobsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOptimizationJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOptimizationJobsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOptimizationJobs page. +func (p *ListOptimizationJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOptimizationJobsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListOptimizationJobs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListOptimizationJobsAPIClient is a client that implements the +// ListOptimizationJobs operation. +type ListOptimizationJobsAPIClient interface { + ListOptimizationJobs(context.Context, *ListOptimizationJobsInput, ...func(*Options)) (*ListOptimizationJobsOutput, error) +} + +var _ ListOptimizationJobsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListOptimizationJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOptimizationJobs", + } +} diff --git a/service/sagemaker/api_op_StopOptimizationJob.go b/service/sagemaker/api_op_StopOptimizationJob.go new file mode 100644 index 00000000000..cd877bc52cc --- /dev/null +++ b/service/sagemaker/api_op_StopOptimizationJob.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sagemaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Ends a running inference optimization job. +func (c *Client) StopOptimizationJob(ctx context.Context, params *StopOptimizationJobInput, optFns ...func(*Options)) (*StopOptimizationJobOutput, error) { + if params == nil { + params = &StopOptimizationJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopOptimizationJob", params, optFns, c.addOperationStopOptimizationJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopOptimizationJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopOptimizationJobInput struct { + + // The name that you assigned to the optimization job. + // + // This member is required. + OptimizationJobName *string + + noSmithyDocumentSerde +} + +type StopOptimizationJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopOptimizationJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopOptimizationJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopOptimizationJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopOptimizationJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpStopOptimizationJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopOptimizationJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopOptimizationJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopOptimizationJob", + } +} diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 8e318a65e7e..b14dcf5f623 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -5181,6 +5181,116 @@ func awsAwsjson11_deserializeOpErrorCreateNotebookInstanceLifecycleConfig(respon } } +type awsAwsjson11_deserializeOpCreateOptimizationJob struct { +} + +func (*awsAwsjson11_deserializeOpCreateOptimizationJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateOptimizationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateOptimizationJob(response, &metadata) + } + output := &CreateOptimizationJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateOptimizationJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateOptimizationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceInUse", errorCode): + return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody) + + case strings.EqualFold("ResourceLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreatePipeline struct { } @@ -10568,6 +10678,91 @@ func awsAwsjson11_deserializeOpErrorDeleteNotebookInstanceLifecycleConfig(respon } } +type awsAwsjson11_deserializeOpDeleteOptimizationJob struct { +} + +func (*awsAwsjson11_deserializeOpDeleteOptimizationJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteOptimizationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteOptimizationJob(response, &metadata) + } + output := &DeleteOptimizationJobOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteOptimizationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFound", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDeletePipeline struct { } @@ -16637,14 +16832,14 @@ func awsAwsjson11_deserializeOpErrorDescribeNotebookInstanceLifecycleConfig(resp } } -type awsAwsjson11_deserializeOpDescribePipeline struct { +type awsAwsjson11_deserializeOpDescribeOptimizationJob struct { } -func (*awsAwsjson11_deserializeOpDescribePipeline) ID() string { +func (*awsAwsjson11_deserializeOpDescribeOptimizationJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeOptimizationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16658,9 +16853,9 @@ func (m *awsAwsjson11_deserializeOpDescribePipeline) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribePipeline(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOptimizationJob(response, &metadata) } - output := &DescribePipelineOutput{} + output := &DescribeOptimizationJobOutput{} out.Result = output var buff [1024]byte @@ -16680,7 +16875,7 @@ func (m *awsAwsjson11_deserializeOpDescribePipeline) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribePipelineOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeOptimizationJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16694,7 +16889,7 @@ func (m *awsAwsjson11_deserializeOpDescribePipeline) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeOptimizationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16744,14 +16939,14 @@ func awsAwsjson11_deserializeOpErrorDescribePipeline(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution struct { +type awsAwsjson11_deserializeOpDescribePipeline struct { } -func (*awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) ID() string { +func (*awsAwsjson11_deserializeOpDescribePipeline) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16765,9 +16960,9 @@ func (m *awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribePipelineDefinitionForExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePipeline(response, &metadata) } - output := &DescribePipelineDefinitionForExecutionOutput{} + output := &DescribePipelineOutput{} out.Result = output var buff [1024]byte @@ -16787,7 +16982,7 @@ func (m *awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) Handl return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribePipelineDefinitionForExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePipelineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16801,7 +16996,7 @@ func (m *awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) Handl return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribePipelineDefinitionForExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16851,14 +17046,14 @@ func awsAwsjson11_deserializeOpErrorDescribePipelineDefinitionForExecution(respo } } -type awsAwsjson11_deserializeOpDescribePipelineExecution struct { +type awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution struct { } -func (*awsAwsjson11_deserializeOpDescribePipelineExecution) ID() string { +func (*awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribePipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16872,9 +17067,9 @@ func (m *awsAwsjson11_deserializeOpDescribePipelineExecution) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribePipelineExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePipelineDefinitionForExecution(response, &metadata) } - output := &DescribePipelineExecutionOutput{} + output := &DescribePipelineDefinitionForExecutionOutput{} out.Result = output var buff [1024]byte @@ -16894,7 +17089,7 @@ func (m *awsAwsjson11_deserializeOpDescribePipelineExecution) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribePipelineExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePipelineDefinitionForExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16908,7 +17103,7 @@ func (m *awsAwsjson11_deserializeOpDescribePipelineExecution) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribePipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePipelineDefinitionForExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16958,14 +17153,14 @@ func awsAwsjson11_deserializeOpErrorDescribePipelineExecution(response *smithyht } } -type awsAwsjson11_deserializeOpDescribeProcessingJob struct { +type awsAwsjson11_deserializeOpDescribePipelineExecution struct { } -func (*awsAwsjson11_deserializeOpDescribeProcessingJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribePipelineExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeProcessingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16979,9 +17174,9 @@ func (m *awsAwsjson11_deserializeOpDescribeProcessingJob) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeProcessingJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePipelineExecution(response, &metadata) } - output := &DescribeProcessingJobOutput{} + output := &DescribePipelineExecutionOutput{} out.Result = output var buff [1024]byte @@ -17001,7 +17196,7 @@ func (m *awsAwsjson11_deserializeOpDescribeProcessingJob) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeProcessingJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePipelineExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17015,7 +17210,7 @@ func (m *awsAwsjson11_deserializeOpDescribeProcessingJob) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeProcessingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17065,14 +17260,14 @@ func awsAwsjson11_deserializeOpErrorDescribeProcessingJob(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpDescribeProject struct { +type awsAwsjson11_deserializeOpDescribeProcessingJob struct { } -func (*awsAwsjson11_deserializeOpDescribeProject) ID() string { +func (*awsAwsjson11_deserializeOpDescribeProcessingJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeProcessingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17086,9 +17281,9 @@ func (m *awsAwsjson11_deserializeOpDescribeProject) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeProject(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeProcessingJob(response, &metadata) } - output := &DescribeProjectOutput{} + output := &DescribeProcessingJobOutput{} out.Result = output var buff [1024]byte @@ -17108,7 +17303,7 @@ func (m *awsAwsjson11_deserializeOpDescribeProject) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeProjectOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeProcessingJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17122,7 +17317,7 @@ func (m *awsAwsjson11_deserializeOpDescribeProject) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeProcessingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17159,6 +17354,9 @@ func awsAwsjson11_deserializeOpErrorDescribeProject(response *smithyhttp.Respons errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ResourceNotFound", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17169,14 +17367,14 @@ func awsAwsjson11_deserializeOpErrorDescribeProject(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpDescribeSpace struct { +type awsAwsjson11_deserializeOpDescribeProject struct { } -func (*awsAwsjson11_deserializeOpDescribeSpace) ID() string { +func (*awsAwsjson11_deserializeOpDescribeProject) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSpace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17190,9 +17388,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSpace) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSpace(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeProject(response, &metadata) } - output := &DescribeSpaceOutput{} + output := &DescribeProjectOutput{} out.Result = output var buff [1024]byte @@ -17212,7 +17410,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSpace) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSpaceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeProjectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17226,7 +17424,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSpace) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSpace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17263,9 +17461,6 @@ func awsAwsjson11_deserializeOpErrorDescribeSpace(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFound", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17276,14 +17471,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSpace(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig struct { +type awsAwsjson11_deserializeOpDescribeSpace struct { } -func (*awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) ID() string { +func (*awsAwsjson11_deserializeOpDescribeSpace) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeSpace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17297,9 +17492,9 @@ func (m *awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeStudioLifecycleConfig(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSpace(response, &metadata) } - output := &DescribeStudioLifecycleConfigOutput{} + output := &DescribeSpaceOutput{} out.Result = output var buff [1024]byte @@ -17319,7 +17514,7 @@ func (m *awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeStudioLifecycleConfigOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeSpaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17333,7 +17528,7 @@ func (m *awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeStudioLifecycleConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeSpace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17383,14 +17578,14 @@ func awsAwsjson11_deserializeOpErrorDescribeStudioLifecycleConfig(response *smit } } -type awsAwsjson11_deserializeOpDescribeSubscribedWorkteam struct { +type awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig struct { } -func (*awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) ID() string { +func (*awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17404,9 +17599,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSubscribedWorkteam(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeStudioLifecycleConfig(response, &metadata) } - output := &DescribeSubscribedWorkteamOutput{} + output := &DescribeStudioLifecycleConfigOutput{} out.Result = output var buff [1024]byte @@ -17426,7 +17621,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSubscribedWorkteamOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeStudioLifecycleConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17440,7 +17635,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSubscribedWorkteam(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeStudioLifecycleConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17477,6 +17672,9 @@ func awsAwsjson11_deserializeOpErrorDescribeSubscribedWorkteam(response *smithyh errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ResourceNotFound", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17487,14 +17685,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSubscribedWorkteam(response *smithyh } } -type awsAwsjson11_deserializeOpDescribeTrainingJob struct { +type awsAwsjson11_deserializeOpDescribeSubscribedWorkteam struct { } -func (*awsAwsjson11_deserializeOpDescribeTrainingJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeTrainingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17508,9 +17706,9 @@ func (m *awsAwsjson11_deserializeOpDescribeTrainingJob) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTrainingJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSubscribedWorkteam(response, &metadata) } - output := &DescribeTrainingJobOutput{} + output := &DescribeSubscribedWorkteamOutput{} out.Result = output var buff [1024]byte @@ -17530,7 +17728,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTrainingJob) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeTrainingJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeSubscribedWorkteamOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17544,7 +17742,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTrainingJob) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeTrainingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeSubscribedWorkteam(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17581,9 +17779,6 @@ func awsAwsjson11_deserializeOpErrorDescribeTrainingJob(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFound", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17594,14 +17789,14 @@ func awsAwsjson11_deserializeOpErrorDescribeTrainingJob(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpDescribeTransformJob struct { +type awsAwsjson11_deserializeOpDescribeTrainingJob struct { } -func (*awsAwsjson11_deserializeOpDescribeTransformJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribeTrainingJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeTransformJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeTrainingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17615,9 +17810,9 @@ func (m *awsAwsjson11_deserializeOpDescribeTransformJob) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTransformJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTrainingJob(response, &metadata) } - output := &DescribeTransformJobOutput{} + output := &DescribeTrainingJobOutput{} out.Result = output var buff [1024]byte @@ -17637,7 +17832,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTransformJob) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeTransformJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeTrainingJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17651,7 +17846,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTransformJob) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeTransformJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeTrainingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17701,14 +17896,14 @@ func awsAwsjson11_deserializeOpErrorDescribeTransformJob(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDescribeTrial struct { +type awsAwsjson11_deserializeOpDescribeTransformJob struct { } -func (*awsAwsjson11_deserializeOpDescribeTrial) ID() string { +func (*awsAwsjson11_deserializeOpDescribeTransformJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeTrial) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeTransformJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17722,9 +17917,9 @@ func (m *awsAwsjson11_deserializeOpDescribeTrial) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTrial(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTransformJob(response, &metadata) } - output := &DescribeTrialOutput{} + output := &DescribeTransformJobOutput{} out.Result = output var buff [1024]byte @@ -17744,7 +17939,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTrial) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeTrialOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeTransformJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17758,7 +17953,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTrial) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeTrial(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeTransformJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17808,14 +18003,14 @@ func awsAwsjson11_deserializeOpErrorDescribeTrial(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDescribeTrialComponent struct { +type awsAwsjson11_deserializeOpDescribeTrial struct { } -func (*awsAwsjson11_deserializeOpDescribeTrialComponent) ID() string { +func (*awsAwsjson11_deserializeOpDescribeTrial) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeTrialComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeTrial) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17829,9 +18024,9 @@ func (m *awsAwsjson11_deserializeOpDescribeTrialComponent) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTrialComponent(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTrial(response, &metadata) } - output := &DescribeTrialComponentOutput{} + output := &DescribeTrialOutput{} out.Result = output var buff [1024]byte @@ -17851,7 +18046,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTrialComponent) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeTrialComponentOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeTrialOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17865,7 +18060,7 @@ func (m *awsAwsjson11_deserializeOpDescribeTrialComponent) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeTrialComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeTrial(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17915,14 +18110,14 @@ func awsAwsjson11_deserializeOpErrorDescribeTrialComponent(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDescribeUserProfile struct { +type awsAwsjson11_deserializeOpDescribeTrialComponent struct { } -func (*awsAwsjson11_deserializeOpDescribeUserProfile) ID() string { +func (*awsAwsjson11_deserializeOpDescribeTrialComponent) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeUserProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeTrialComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17936,9 +18131,9 @@ func (m *awsAwsjson11_deserializeOpDescribeUserProfile) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserProfile(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTrialComponent(response, &metadata) } - output := &DescribeUserProfileOutput{} + output := &DescribeTrialComponentOutput{} out.Result = output var buff [1024]byte @@ -17958,7 +18153,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserProfile) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeUserProfileOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeTrialComponentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17972,7 +18167,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUserProfile) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeUserProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeTrialComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18009,9 +18204,6 @@ func awsAwsjson11_deserializeOpErrorDescribeUserProfile(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody) - case strings.EqualFold("ResourceNotFound", errorCode): return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) @@ -18025,14 +18217,14 @@ func awsAwsjson11_deserializeOpErrorDescribeUserProfile(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpDescribeWorkforce struct { +type awsAwsjson11_deserializeOpDescribeUserProfile struct { } -func (*awsAwsjson11_deserializeOpDescribeWorkforce) ID() string { +func (*awsAwsjson11_deserializeOpDescribeUserProfile) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeWorkforce) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeUserProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18046,9 +18238,9 @@ func (m *awsAwsjson11_deserializeOpDescribeWorkforce) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeWorkforce(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUserProfile(response, &metadata) } - output := &DescribeWorkforceOutput{} + output := &DescribeUserProfileOutput{} out.Result = output var buff [1024]byte @@ -18068,7 +18260,7 @@ func (m *awsAwsjson11_deserializeOpDescribeWorkforce) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeWorkforceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeUserProfileOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18082,7 +18274,7 @@ func (m *awsAwsjson11_deserializeOpDescribeWorkforce) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeWorkforce(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeUserProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18119,110 +18311,12 @@ func awsAwsjson11_deserializeOpErrorDescribeWorkforce(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDescribeWorkteam struct { -} - -func (*awsAwsjson11_deserializeOpDescribeWorkteam) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDescribeWorkteam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeWorkteam(response, &metadata) - } - output := &DescribeWorkteamOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDescribeWorkteamOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDescribeWorkteam(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("ResourceLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 - } + case strings.EqualFold("ResourceNotFound", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18233,14 +18327,14 @@ func awsAwsjson11_deserializeOpErrorDescribeWorkteam(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio struct { +type awsAwsjson11_deserializeOpDescribeWorkforce struct { } -func (*awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) ID() string { +func (*awsAwsjson11_deserializeOpDescribeWorkforce) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeWorkforce) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18254,9 +18348,9 @@ func (m *awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) Hand } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDisableSagemakerServicecatalogPortfolio(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeWorkforce(response, &metadata) } - output := &DisableSagemakerServicecatalogPortfolioOutput{} + output := &DescribeWorkforceOutput{} out.Result = output var buff [1024]byte @@ -18276,7 +18370,7 @@ func (m *awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) Hand return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDisableSagemakerServicecatalogPortfolioOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeWorkforceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18290,7 +18384,7 @@ func (m *awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) Hand return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDisableSagemakerServicecatalogPortfolio(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeWorkforce(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18337,14 +18431,14 @@ func awsAwsjson11_deserializeOpErrorDisableSagemakerServicecatalogPortfolio(resp } } -type awsAwsjson11_deserializeOpDisassociateTrialComponent struct { +type awsAwsjson11_deserializeOpDescribeWorkteam struct { } -func (*awsAwsjson11_deserializeOpDisassociateTrialComponent) ID() string { +func (*awsAwsjson11_deserializeOpDescribeWorkteam) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDisassociateTrialComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeWorkteam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18358,9 +18452,9 @@ func (m *awsAwsjson11_deserializeOpDisassociateTrialComponent) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateTrialComponent(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeWorkteam(response, &metadata) } - output := &DisassociateTrialComponentOutput{} + output := &DescribeWorkteamOutput{} out.Result = output var buff [1024]byte @@ -18380,7 +18474,7 @@ func (m *awsAwsjson11_deserializeOpDisassociateTrialComponent) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDisassociateTrialComponentOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeWorkteamOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18394,7 +18488,215 @@ func (m *awsAwsjson11_deserializeOpDisassociateTrialComponent) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDisassociateTrialComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeWorkteam(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio struct { +} + +func (*awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDisableSagemakerServicecatalogPortfolio(response, &metadata) + } + output := &DisableSagemakerServicecatalogPortfolioOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDisableSagemakerServicecatalogPortfolioOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDisableSagemakerServicecatalogPortfolio(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDisassociateTrialComponent struct { +} + +func (*awsAwsjson11_deserializeOpDisassociateTrialComponent) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDisassociateTrialComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateTrialComponent(response, &metadata) + } + output := &DisassociateTrialComponentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDisassociateTrialComponentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDisassociateTrialComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25160,14 +25462,14 @@ func awsAwsjson11_deserializeOpErrorListNotebookInstances(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpListPipelineExecutions struct { +type awsAwsjson11_deserializeOpListOptimizationJobs struct { } -func (*awsAwsjson11_deserializeOpListPipelineExecutions) ID() string { +func (*awsAwsjson11_deserializeOpListOptimizationJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListPipelineExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListOptimizationJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25181,9 +25483,9 @@ func (m *awsAwsjson11_deserializeOpListPipelineExecutions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineExecutions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListOptimizationJobs(response, &metadata) } - output := &ListPipelineExecutionsOutput{} + output := &ListOptimizationJobsOutput{} out.Result = output var buff [1024]byte @@ -25203,7 +25505,7 @@ func (m *awsAwsjson11_deserializeOpListPipelineExecutions) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListPipelineExecutionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListOptimizationJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25217,7 +25519,7 @@ func (m *awsAwsjson11_deserializeOpListPipelineExecutions) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListPipelineExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListOptimizationJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25254,9 +25556,6 @@ func awsAwsjson11_deserializeOpErrorListPipelineExecutions(response *smithyhttp. errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFound", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -25267,14 +25566,14 @@ func awsAwsjson11_deserializeOpErrorListPipelineExecutions(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListPipelineExecutionSteps struct { +type awsAwsjson11_deserializeOpListPipelineExecutions struct { } -func (*awsAwsjson11_deserializeOpListPipelineExecutionSteps) ID() string { +func (*awsAwsjson11_deserializeOpListPipelineExecutions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListPipelineExecutionSteps) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListPipelineExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25288,9 +25587,9 @@ func (m *awsAwsjson11_deserializeOpListPipelineExecutionSteps) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineExecutionSteps(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineExecutions(response, &metadata) } - output := &ListPipelineExecutionStepsOutput{} + output := &ListPipelineExecutionsOutput{} out.Result = output var buff [1024]byte @@ -25310,7 +25609,7 @@ func (m *awsAwsjson11_deserializeOpListPipelineExecutionSteps) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListPipelineExecutionStepsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListPipelineExecutionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25324,7 +25623,7 @@ func (m *awsAwsjson11_deserializeOpListPipelineExecutionSteps) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListPipelineExecutionSteps(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListPipelineExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25374,14 +25673,14 @@ func awsAwsjson11_deserializeOpErrorListPipelineExecutionSteps(response *smithyh } } -type awsAwsjson11_deserializeOpListPipelineParametersForExecution struct { +type awsAwsjson11_deserializeOpListPipelineExecutionSteps struct { } -func (*awsAwsjson11_deserializeOpListPipelineParametersForExecution) ID() string { +func (*awsAwsjson11_deserializeOpListPipelineExecutionSteps) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListPipelineParametersForExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListPipelineExecutionSteps) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25395,9 +25694,9 @@ func (m *awsAwsjson11_deserializeOpListPipelineParametersForExecution) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineParametersForExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineExecutionSteps(response, &metadata) } - output := &ListPipelineParametersForExecutionOutput{} + output := &ListPipelineExecutionStepsOutput{} out.Result = output var buff [1024]byte @@ -25417,7 +25716,7 @@ func (m *awsAwsjson11_deserializeOpListPipelineParametersForExecution) HandleDes return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListPipelineParametersForExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListPipelineExecutionStepsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25431,7 +25730,7 @@ func (m *awsAwsjson11_deserializeOpListPipelineParametersForExecution) HandleDes return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListPipelineParametersForExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListPipelineExecutionSteps(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25481,14 +25780,14 @@ func awsAwsjson11_deserializeOpErrorListPipelineParametersForExecution(response } } -type awsAwsjson11_deserializeOpListPipelines struct { +type awsAwsjson11_deserializeOpListPipelineParametersForExecution struct { } -func (*awsAwsjson11_deserializeOpListPipelines) ID() string { +func (*awsAwsjson11_deserializeOpListPipelineParametersForExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListPipelines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListPipelineParametersForExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25502,9 +25801,9 @@ func (m *awsAwsjson11_deserializeOpListPipelines) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListPipelines(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineParametersForExecution(response, &metadata) } - output := &ListPipelinesOutput{} + output := &ListPipelineParametersForExecutionOutput{} out.Result = output var buff [1024]byte @@ -25524,7 +25823,7 @@ func (m *awsAwsjson11_deserializeOpListPipelines) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListPipelinesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListPipelineParametersForExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25538,7 +25837,114 @@ func (m *awsAwsjson11_deserializeOpListPipelines) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListPipelines(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListPipelineParametersForExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFound", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListPipelines struct { +} + +func (*awsAwsjson11_deserializeOpListPipelines) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListPipelines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListPipelines(response, &metadata) + } + output := &ListPipelinesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListPipelinesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListPipelines(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29671,14 +30077,14 @@ func awsAwsjson11_deserializeOpErrorStopNotebookInstance(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpStopPipelineExecution struct { +type awsAwsjson11_deserializeOpStopOptimizationJob struct { } -func (*awsAwsjson11_deserializeOpStopPipelineExecution) ID() string { +func (*awsAwsjson11_deserializeOpStopOptimizationJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopOptimizationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29692,43 +30098,21 @@ func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopPipelineExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopOptimizationJob(response, &metadata) } - output := &StopPipelineExecutionOutput{} + output := &StopOptimizationJobOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopOptimizationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29765,9 +30149,6 @@ func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.R errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFound", errorCode): return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) @@ -29781,14 +30162,14 @@ func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpStopProcessingJob struct { +type awsAwsjson11_deserializeOpStopPipelineExecution struct { } -func (*awsAwsjson11_deserializeOpStopProcessingJob) ID() string { +func (*awsAwsjson11_deserializeOpStopPipelineExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopProcessingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29802,21 +30183,43 @@ func (m *awsAwsjson11_deserializeOpStopProcessingJob) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopProcessingJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopPipelineExecution(response, &metadata) } - output := &StopProcessingJobOutput{} + output := &StopPipelineExecutionOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopProcessingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29853,6 +30256,9 @@ func awsAwsjson11_deserializeOpErrorStopProcessingJob(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFound", errorCode): return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) @@ -29866,14 +30272,14 @@ func awsAwsjson11_deserializeOpErrorStopProcessingJob(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpStopTrainingJob struct { +type awsAwsjson11_deserializeOpStopProcessingJob struct { } -func (*awsAwsjson11_deserializeOpStopTrainingJob) ID() string { +func (*awsAwsjson11_deserializeOpStopProcessingJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopTrainingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopProcessingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29887,9 +30293,9 @@ func (m *awsAwsjson11_deserializeOpStopTrainingJob) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopTrainingJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopProcessingJob(response, &metadata) } - output := &StopTrainingJobOutput{} + output := &StopProcessingJobOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -29901,7 +30307,7 @@ func (m *awsAwsjson11_deserializeOpStopTrainingJob) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopTrainingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopProcessingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29951,14 +30357,14 @@ func awsAwsjson11_deserializeOpErrorStopTrainingJob(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpStopTransformJob struct { +type awsAwsjson11_deserializeOpStopTrainingJob struct { } -func (*awsAwsjson11_deserializeOpStopTransformJob) ID() string { +func (*awsAwsjson11_deserializeOpStopTrainingJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopTransformJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopTrainingJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29972,9 +30378,9 @@ func (m *awsAwsjson11_deserializeOpStopTransformJob) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopTransformJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopTrainingJob(response, &metadata) } - output := &StopTransformJobOutput{} + output := &StopTrainingJobOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -29986,7 +30392,7 @@ func (m *awsAwsjson11_deserializeOpStopTransformJob) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopTransformJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopTrainingJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -30036,14 +30442,14 @@ func awsAwsjson11_deserializeOpErrorStopTransformJob(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpUpdateAction struct { +type awsAwsjson11_deserializeOpStopTransformJob struct { } -func (*awsAwsjson11_deserializeOpUpdateAction) ID() string { +func (*awsAwsjson11_deserializeOpStopTransformJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopTransformJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -30057,43 +30463,21 @@ func (m *awsAwsjson11_deserializeOpUpdateAction) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAction(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopTransformJob(response, &metadata) } - output := &UpdateActionOutput{} + output := &StopTransformJobOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentUpdateActionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopTransformJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -30130,9 +30514,6 @@ func awsAwsjson11_deserializeOpErrorUpdateAction(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFound", errorCode): return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) @@ -30146,14 +30527,14 @@ func awsAwsjson11_deserializeOpErrorUpdateAction(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateAppImageConfig struct { +type awsAwsjson11_deserializeOpUpdateAction struct { } -func (*awsAwsjson11_deserializeOpUpdateAppImageConfig) ID() string { +func (*awsAwsjson11_deserializeOpUpdateAction) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateAppImageConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -30167,9 +30548,9 @@ func (m *awsAwsjson11_deserializeOpUpdateAppImageConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAppImageConfig(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAction(response, &metadata) } - output := &UpdateAppImageConfigOutput{} + output := &UpdateActionOutput{} out.Result = output var buff [1024]byte @@ -30189,7 +30570,7 @@ func (m *awsAwsjson11_deserializeOpUpdateAppImageConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateAppImageConfigOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateActionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30203,7 +30584,117 @@ func (m *awsAwsjson11_deserializeOpUpdateAppImageConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateAppImageConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFound", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateAppImageConfig struct { +} + +func (*awsAwsjson11_deserializeOpUpdateAppImageConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateAppImageConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAppImageConfig(response, &metadata) + } + output := &UpdateAppImageConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateAppImageConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateAppImageConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -34597,6 +35088,85 @@ func awsAwsjson11_deserializeDocumentAdditionalInferenceSpecifications(v *[]type return nil } +func awsAwsjson11_deserializeDocumentAdditionalModelDataSource(v **types.AdditionalModelDataSource, 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.AdditionalModelDataSource + if *v == nil { + sv = &types.AdditionalModelDataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AdditionalModelChannelName to be of type string, got %T instead", value) + } + sv.ChannelName = ptr.String(jtv) + } + + case "S3DataSource": + if err := awsAwsjson11_deserializeDocumentS3ModelDataSource(&sv.S3DataSource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAdditionalModelDataSources(v *[]types.AdditionalModelDataSource, 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.AdditionalModelDataSource + if *v == nil { + cv = []types.AdditionalModelDataSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AdditionalModelDataSource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAdditionalModelDataSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentAdditionalS3DataSource(v **types.AdditionalS3DataSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -35318,6 +35888,55 @@ func awsAwsjson11_deserializeDocumentAlgorithmValidationSpecification(v **types. return nil } +func awsAwsjson11_deserializeDocumentAmazonQSettings(v **types.AmazonQSettings, 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.AmazonQSettings + if *v == nil { + sv = &types.AmazonQSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "QProfileArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QProfileArn to be of type string, got %T instead", value) + } + sv.QProfileArn = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureStatus to be of type string, got %T instead", value) + } + sv.Status = types.FeatureStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentAnnotationConsolidationConfig(v **types.AnnotationConsolidationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42150,6 +42769,11 @@ func awsAwsjson11_deserializeDocumentContainerDefinition(v **types.ContainerDefi for key, value := range shape { switch key { + case "AdditionalModelDataSources": + if err := awsAwsjson11_deserializeDocumentAdditionalModelDataSources(&sv.AdditionalModelDataSources, value); err != nil { + return err + } + case "ContainerHostname": if value != nil { jtv, ok := value.(string) @@ -45515,6 +46139,11 @@ func awsAwsjson11_deserializeDocumentDomainSettings(v **types.DomainSettings, va for key, value := range shape { switch key { + case "AmazonQSettings": + if err := awsAwsjson11_deserializeDocumentAmazonQSettings(&sv.AmazonQSettings, value); err != nil { + return err + } + case "DockerSettings": if err := awsAwsjson11_deserializeDocumentDockerSettings(&sv.DockerSettings, value); err != nil { return err @@ -58588,6 +59217,51 @@ func awsAwsjson11_deserializeDocumentModelClientConfig(v **types.ModelClientConf return nil } +func awsAwsjson11_deserializeDocumentModelCompilationConfig(v **types.ModelCompilationConfig, 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.ModelCompilationConfig + if *v == nil { + sv = &types.ModelCompilationConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Image": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationContainerImage to be of type string, got %T instead", value) + } + sv.Image = ptr.String(jtv) + } + + case "OverrideEnvironment": + if err := awsAwsjson11_deserializeDocumentOptimizationJobEnvironmentVariables(&sv.OverrideEnvironment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentModelConfiguration(v **types.ModelConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -61226,6 +61900,51 @@ func awsAwsjson11_deserializeDocumentModelQualityJobInput(v **types.ModelQuality return nil } +func awsAwsjson11_deserializeDocumentModelQuantizationConfig(v **types.ModelQuantizationConfig, 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.ModelQuantizationConfig + if *v == nil { + sv = &types.ModelQuantizationConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Image": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationContainerImage to be of type string, got %T instead", value) + } + sv.Image = ptr.String(jtv) + } + + case "OverrideEnvironment": + if err := awsAwsjson11_deserializeDocumentOptimizationJobEnvironmentVariables(&sv.OverrideEnvironment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentModelRegisterSettings(v **types.ModelRegisterSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -64523,7 +65242,7 @@ func awsAwsjson11_deserializeDocumentOnlineStoreSecurityConfig(v **types.OnlineS return nil } -func awsAwsjson11_deserializeDocumentOutputConfig(v **types.OutputConfig, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationConfig(v *types.OptimizationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64536,53 +65255,135 @@ func awsAwsjson11_deserializeDocumentOutputConfig(v **types.OutputConfig, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OutputConfig + var uv types.OptimizationConfig +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "ModelCompilationConfig": + var mv types.ModelCompilationConfig + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentModelCompilationConfig(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.OptimizationConfigMemberModelCompilationConfig{Value: mv} + break loop + + case "ModelQuantizationConfig": + var mv types.ModelQuantizationConfig + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentModelQuantizationConfig(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.OptimizationConfigMemberModelQuantizationConfig{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson11_deserializeDocumentOptimizationConfigs(v *[]types.OptimizationConfig, 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.OptimizationConfig if *v == nil { - sv = &types.OutputConfig{} + cv = []types.OptimizationConfig{} } else { - sv = *v + cv = *v + } + + for _, value := range shape { + var col types.OptimizationConfig + if err := awsAwsjson11_deserializeDocumentOptimizationConfig(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOptimizationJobEnvironmentVariables(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v } for key, value := range shape { - switch key { - case "CompilerOptions": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CompilerOptions to be of type string, got %T instead", value) - } - sv.CompilerOptions = ptr.String(jtv) + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String256 to be of type string, got %T instead", value) } + parsedVal = jtv + } + mv[key] = parsedVal - case "KmsKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) - } - sv.KmsKeyId = ptr.String(jtv) - } + } + *v = mv + return nil +} - case "S3OutputLocation": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) - } - sv.S3OutputLocation = ptr.String(jtv) - } +func awsAwsjson11_deserializeDocumentOptimizationJobModelSource(v **types.OptimizationJobModelSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "TargetDevice": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TargetDevice to be of type string, got %T instead", value) - } - sv.TargetDevice = types.TargetDevice(jtv) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "TargetPlatform": - if err := awsAwsjson11_deserializeDocumentTargetPlatform(&sv.TargetPlatform, value); err != nil { + var sv *types.OptimizationJobModelSource + if *v == nil { + sv = &types.OptimizationJobModelSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3": + if err := awsAwsjson11_deserializeDocumentOptimizationJobModelSourceS3(&sv.S3, value); err != nil { return err } @@ -64595,7 +65396,7 @@ func awsAwsjson11_deserializeDocumentOutputConfig(v **types.OutputConfig, value return nil } -func awsAwsjson11_deserializeDocumentOutputDataConfig(v **types.OutputDataConfig, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationJobModelSourceS3(v **types.OptimizationJobModelSourceS3, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64608,40 +65409,27 @@ func awsAwsjson11_deserializeDocumentOutputDataConfig(v **types.OutputDataConfig return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OutputDataConfig + var sv *types.OptimizationJobModelSourceS3 if *v == nil { - sv = &types.OutputDataConfig{} + sv = &types.OptimizationJobModelSourceS3{} } else { sv = *v } for key, value := range shape { switch key { - case "CompressionType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OutputCompressionType to be of type string, got %T instead", value) - } - sv.CompressionType = types.OutputCompressionType(jtv) - } - - case "KmsKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) - } - sv.KmsKeyId = ptr.String(jtv) + case "ModelAccessConfig": + if err := awsAwsjson11_deserializeDocumentOptimizationModelAccessConfig(&sv.ModelAccessConfig, value); err != nil { + return err } - case "S3OutputPath": + case "S3Uri": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) } - sv.S3OutputPath = ptr.String(jtv) + sv.S3Uri = ptr.String(jtv) } default: @@ -64653,7 +65441,7 @@ func awsAwsjson11_deserializeDocumentOutputDataConfig(v **types.OutputDataConfig return nil } -func awsAwsjson11_deserializeDocumentOutputParameter(v **types.OutputParameter, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationJobOutputConfig(v **types.OptimizationJobOutputConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64666,31 +65454,31 @@ func awsAwsjson11_deserializeDocumentOutputParameter(v **types.OutputParameter, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OutputParameter + var sv *types.OptimizationJobOutputConfig if *v == nil { - sv = &types.OutputParameter{} + sv = &types.OptimizationJobOutputConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "Name": + case "KmsKeyId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String256 to be of type string, got %T instead", value) + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.KmsKeyId = ptr.String(jtv) } - case "Value": + case "S3OutputLocation": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String1024 to be of type string, got %T instead", value) + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.S3OutputLocation = ptr.String(jtv) } default: @@ -64702,7 +65490,7 @@ func awsAwsjson11_deserializeDocumentOutputParameter(v **types.OutputParameter, return nil } -func awsAwsjson11_deserializeDocumentOutputParameterList(v *[]types.OutputParameter, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationJobSummaries(v *[]types.OptimizationJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64715,17 +65503,17 @@ func awsAwsjson11_deserializeDocumentOutputParameterList(v *[]types.OutputParame return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.OutputParameter + var cv []types.OptimizationJobSummary if *v == nil { - cv = []types.OutputParameter{} + cv = []types.OptimizationJobSummary{} } else { cv = *v } for _, value := range shape { - var col types.OutputParameter + var col types.OptimizationJobSummary destAddr := &col - if err := awsAwsjson11_deserializeDocumentOutputParameter(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentOptimizationJobSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -64736,7 +65524,7 @@ func awsAwsjson11_deserializeDocumentOutputParameterList(v *[]types.OutputParame return nil } -func awsAwsjson11_deserializeDocumentOwnershipSettings(v **types.OwnershipSettings, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationJobSummary(v **types.OptimizationJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64749,62 +65537,118 @@ func awsAwsjson11_deserializeDocumentOwnershipSettings(v **types.OwnershipSettin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OwnershipSettings + var sv *types.OptimizationJobSummary if *v == nil { - sv = &types.OwnershipSettings{} + sv = &types.OptimizationJobSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "OwnerUserProfileName": + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value) + + } + } + + case "DeploymentInstanceType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value) + return fmt.Errorf("expected OptimizationJobDeploymentInstanceType to be of type string, got %T instead", value) } - sv.OwnerUserProfileName = ptr.String(jtv) + sv.DeploymentInstanceType = types.OptimizationJobDeploymentInstanceType(jtv) } - default: - _, _ = key, value + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - } - } - *v = sv - return nil -} + default: + return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value) -func awsAwsjson11_deserializeDocumentOwnershipSettingsSummary(v **types.OwnershipSettingsSummary, 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) - } + case "OptimizationEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OptimizationEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - var sv *types.OwnershipSettingsSummary - if *v == nil { - sv = &types.OwnershipSettingsSummary{} - } else { - sv = *v - } + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - for key, value := range shape { - switch key { - case "OwnerUserProfileName": + } + } + + case "OptimizationJobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value) + return fmt.Errorf("expected OptimizationJobArn to be of type string, got %T instead", value) } - sv.OwnerUserProfileName = ptr.String(jtv) + sv.OptimizationJobArn = ptr.String(jtv) + } + + case "OptimizationJobName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.OptimizationJobName = ptr.String(jtv) + } + + case "OptimizationJobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationJobStatus to be of type string, got %T instead", value) + } + sv.OptimizationJobStatus = types.OptimizationJobStatus(jtv) + } + + case "OptimizationStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OptimizationStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OptimizationTypes": + if err := awsAwsjson11_deserializeDocumentOptimizationTypes(&sv.OptimizationTypes, value); err != nil { + return err } default: @@ -64816,7 +65660,7 @@ func awsAwsjson11_deserializeDocumentOwnershipSettingsSummary(v **types.Ownershi return nil } -func awsAwsjson11_deserializeDocumentParallelismConfiguration(v **types.ParallelismConfiguration, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationModelAccessConfig(v **types.OptimizationModelAccessConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64829,26 +65673,22 @@ func awsAwsjson11_deserializeDocumentParallelismConfiguration(v **types.Parallel return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ParallelismConfiguration + var sv *types.OptimizationModelAccessConfig if *v == nil { - sv = &types.ParallelismConfiguration{} + sv = &types.OptimizationModelAccessConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "MaxParallelExecutionSteps": + case "AcceptEula": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected MaxParallelExecutionSteps to be json.Number, got %T instead", value) + return fmt.Errorf("expected OptimizationModelAcceptEula to be of type *bool, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaxParallelExecutionSteps = ptr.Int32(int32(i64)) + sv.AcceptEula = ptr.Bool(jtv) } default: @@ -64860,7 +65700,7 @@ func awsAwsjson11_deserializeDocumentParallelismConfiguration(v **types.Parallel return nil } -func awsAwsjson11_deserializeDocumentParameter(v **types.Parameter, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationOutput(v **types.OptimizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64873,31 +65713,22 @@ func awsAwsjson11_deserializeDocumentParameter(v **types.Parameter, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Parameter + var sv *types.OptimizationOutput if *v == nil { - sv = &types.Parameter{} + sv = &types.OptimizationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PipelineParameterName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "Value": + case "RecommendedInferenceImage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String1024 to be of type string, got %T instead", value) + return fmt.Errorf("expected OptimizationContainerImage to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.RecommendedInferenceImage = ptr.String(jtv) } default: @@ -64909,7 +65740,7 @@ func awsAwsjson11_deserializeDocumentParameter(v **types.Parameter, value interf return nil } -func awsAwsjson11_deserializeDocumentParameterList(v *[]types.Parameter, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationTypes(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64922,20 +65753,22 @@ func awsAwsjson11_deserializeDocumentParameterList(v *[]types.Parameter, value i return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Parameter + var cv []string if *v == nil { - cv = []types.Parameter{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.Parameter - destAddr := &col - if err := awsAwsjson11_deserializeDocumentParameter(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationType to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -64943,7 +65776,7 @@ func awsAwsjson11_deserializeDocumentParameterList(v *[]types.Parameter, value i return nil } -func awsAwsjson11_deserializeDocumentParameterRange(v **types.ParameterRange, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationVpcConfig(v **types.OptimizationVpcConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64956,27 +65789,22 @@ func awsAwsjson11_deserializeDocumentParameterRange(v **types.ParameterRange, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ParameterRange + var sv *types.OptimizationVpcConfig if *v == nil { - sv = &types.ParameterRange{} + sv = &types.OptimizationVpcConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "CategoricalParameterRangeSpecification": - if err := awsAwsjson11_deserializeDocumentCategoricalParameterRangeSpecification(&sv.CategoricalParameterRangeSpecification, value); err != nil { - return err - } - - case "ContinuousParameterRangeSpecification": - if err := awsAwsjson11_deserializeDocumentContinuousParameterRangeSpecification(&sv.ContinuousParameterRangeSpecification, value); err != nil { + case "SecurityGroupIds": + if err := awsAwsjson11_deserializeDocumentOptimizationVpcSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil { return err } - case "IntegerParameterRangeSpecification": - if err := awsAwsjson11_deserializeDocumentIntegerParameterRangeSpecification(&sv.IntegerParameterRangeSpecification, value); err != nil { + case "Subnets": + if err := awsAwsjson11_deserializeDocumentOptimizationVpcSubnets(&sv.Subnets, value); err != nil { return err } @@ -64989,7 +65817,7 @@ func awsAwsjson11_deserializeDocumentParameterRange(v **types.ParameterRange, va return nil } -func awsAwsjson11_deserializeDocumentParameterRanges(v **types.ParameterRanges, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationVpcSecurityGroupIds(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -64997,50 +65825,588 @@ func awsAwsjson11_deserializeDocumentParameterRanges(v **types.ParameterRanges, return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ParameterRanges + var cv []string if *v == nil { - sv = &types.ParameterRanges{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "AutoParameters": - if err := awsAwsjson11_deserializeDocumentAutoParameters(&sv.AutoParameters, value); err != nil { - return err - } - - case "CategoricalParameterRanges": - if err := awsAwsjson11_deserializeDocumentCategoricalParameterRanges(&sv.CategoricalParameterRanges, value); err != nil { - return err - } - - case "ContinuousParameterRanges": - if err := awsAwsjson11_deserializeDocumentContinuousParameterRanges(&sv.ContinuousParameterRanges, value); err != nil { - return err - } - - case "IntegerParameterRanges": - if err := awsAwsjson11_deserializeDocumentIntegerParameterRanges(&sv.IntegerParameterRanges, value); err != nil { - return err + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationVpcSecurityGroupId to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentParameterValues(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentOptimizationVpcSubnets(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 OptimizationVpcSubnetId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputConfig(v **types.OutputConfig, 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.OutputConfig + if *v == nil { + sv = &types.OutputConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompilerOptions": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompilerOptions to be of type string, got %T instead", value) + } + sv.CompilerOptions = ptr.String(jtv) + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "S3OutputLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.S3OutputLocation = ptr.String(jtv) + } + + case "TargetDevice": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetDevice to be of type string, got %T instead", value) + } + sv.TargetDevice = types.TargetDevice(jtv) + } + + case "TargetPlatform": + if err := awsAwsjson11_deserializeDocumentTargetPlatform(&sv.TargetPlatform, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputDataConfig(v **types.OutputDataConfig, 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.OutputDataConfig + if *v == nil { + sv = &types.OutputDataConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompressionType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutputCompressionType to be of type string, got %T instead", value) + } + sv.CompressionType = types.OutputCompressionType(jtv) + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "S3OutputPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.S3OutputPath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputParameter(v **types.OutputParameter, 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.OutputParameter + if *v == nil { + sv = &types.OutputParameter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String256 to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String1024 to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputParameterList(v *[]types.OutputParameter, 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.OutputParameter + if *v == nil { + cv = []types.OutputParameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OutputParameter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOutputParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOwnershipSettings(v **types.OwnershipSettings, 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.OwnershipSettings + if *v == nil { + sv = &types.OwnershipSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OwnerUserProfileName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value) + } + sv.OwnerUserProfileName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOwnershipSettingsSummary(v **types.OwnershipSettingsSummary, 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.OwnershipSettingsSummary + if *v == nil { + sv = &types.OwnershipSettingsSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OwnerUserProfileName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value) + } + sv.OwnerUserProfileName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParallelismConfiguration(v **types.ParallelismConfiguration, 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.ParallelismConfiguration + if *v == nil { + sv = &types.ParallelismConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MaxParallelExecutionSteps": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaxParallelExecutionSteps to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxParallelExecutionSteps = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameter(v **types.Parameter, 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.Parameter + if *v == nil { + sv = &types.Parameter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineParameterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String1024 to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterList(v *[]types.Parameter, 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.Parameter + if *v == nil { + cv = []types.Parameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Parameter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterRange(v **types.ParameterRange, 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.ParameterRange + if *v == nil { + sv = &types.ParameterRange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CategoricalParameterRangeSpecification": + if err := awsAwsjson11_deserializeDocumentCategoricalParameterRangeSpecification(&sv.CategoricalParameterRangeSpecification, value); err != nil { + return err + } + + case "ContinuousParameterRangeSpecification": + if err := awsAwsjson11_deserializeDocumentContinuousParameterRangeSpecification(&sv.ContinuousParameterRangeSpecification, value); err != nil { + return err + } + + case "IntegerParameterRangeSpecification": + if err := awsAwsjson11_deserializeDocumentIntegerParameterRangeSpecification(&sv.IntegerParameterRangeSpecification, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterRanges(v **types.ParameterRanges, 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.ParameterRanges + if *v == nil { + sv = &types.ParameterRanges{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutoParameters": + if err := awsAwsjson11_deserializeDocumentAutoParameters(&sv.AutoParameters, value); err != nil { + return err + } + + case "CategoricalParameterRanges": + if err := awsAwsjson11_deserializeDocumentCategoricalParameterRanges(&sv.CategoricalParameterRanges, value); err != nil { + return err + } + + case "ContinuousParameterRanges": + if err := awsAwsjson11_deserializeDocumentContinuousParameterRanges(&sv.ContinuousParameterRanges, value); err != nil { + return err + } + + case "IntegerParameterRanges": + if err := awsAwsjson11_deserializeDocumentIntegerParameterRanges(&sv.IntegerParameterRanges, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterValues(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -81747,6 +83113,46 @@ func awsAwsjson11_deserializeOpDocumentCreateNotebookInstanceOutput(v **CreateNo return nil } +func awsAwsjson11_deserializeOpDocumentCreateOptimizationJobOutput(v **CreateOptimizationJobOutput, 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 *CreateOptimizationJobOutput + if *v == nil { + sv = &CreateOptimizationJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OptimizationJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationJobArn to be of type string, got %T instead", value) + } + sv.OptimizationJobArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreatePipelineOutput(v **CreatePipelineOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -89254,105 +90660,471 @@ func awsAwsjson11_deserializeOpDocumentDescribeMonitoringScheduleOutput(v **Desc sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastMonitoringExecutionSummary": + if err := awsAwsjson11_deserializeDocumentMonitoringExecutionSummary(&sv.LastMonitoringExecutionSummary, value); err != nil { + return err + } + + case "MonitoringScheduleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value) + } + sv.MonitoringScheduleArn = ptr.String(jtv) + } + + case "MonitoringScheduleConfig": + if err := awsAwsjson11_deserializeDocumentMonitoringScheduleConfig(&sv.MonitoringScheduleConfig, value); err != nil { + return err + } + + case "MonitoringScheduleName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MonitoringScheduleName to be of type string, got %T instead", value) + } + sv.MonitoringScheduleName = ptr.String(jtv) + } + + case "MonitoringScheduleStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleStatus to be of type string, got %T instead", value) + } + sv.MonitoringScheduleStatus = types.ScheduleStatus(jtv) + } + + case "MonitoringType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MonitoringType to be of type string, got %T instead", value) + } + sv.MonitoringType = types.MonitoringType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceLifecycleConfigOutput(v **DescribeNotebookInstanceLifecycleConfigOutput, 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 *DescribeNotebookInstanceLifecycleConfigOutput + if *v == nil { + sv = &DescribeNotebookInstanceLifecycleConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value) + + } + } + + case "NotebookInstanceLifecycleConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotebookInstanceLifecycleConfigArn to be of type string, got %T instead", value) + } + sv.NotebookInstanceLifecycleConfigArn = ptr.String(jtv) + } + + case "NotebookInstanceLifecycleConfigName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value) + } + sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv) + } + + case "OnCreate": + if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigList(&sv.OnCreate, value); err != nil { + return err + } + + case "OnStart": + if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigList(&sv.OnStart, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceOutput(v **DescribeNotebookInstanceOutput, 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 *DescribeNotebookInstanceOutput + if *v == nil { + sv = &DescribeNotebookInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AcceleratorTypes": + if err := awsAwsjson11_deserializeDocumentNotebookInstanceAcceleratorTypes(&sv.AcceleratorTypes, value); err != nil { + return err + } + + case "AdditionalCodeRepositories": + if err := awsAwsjson11_deserializeDocumentAdditionalCodeRepositoryNamesOrUrls(&sv.AdditionalCodeRepositories, value); err != nil { + return err + } + + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value) + + } + } + + case "DefaultCodeRepository": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodeRepositoryNameOrUrl to be of type string, got %T instead", value) + } + sv.DefaultCodeRepository = ptr.String(jtv) + } + + case "DirectInternetAccess": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DirectInternetAccess to be of type string, got %T instead", value) + } + sv.DirectInternetAccess = types.DirectInternetAccess(jtv) + } + + case "FailureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "InstanceMetadataServiceConfiguration": + if err := awsAwsjson11_deserializeDocumentInstanceMetadataServiceConfiguration(&sv.InstanceMetadataServiceConfiguration, value); err != nil { + return err + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = types.InstanceType(jtv) + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value) + + } + } + + case "NetworkInterfaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkInterfaceId to be of type string, got %T instead", value) + } + sv.NetworkInterfaceId = ptr.String(jtv) + } + + case "NotebookInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotebookInstanceArn to be of type string, got %T instead", value) + } + sv.NotebookInstanceArn = ptr.String(jtv) + } + + case "NotebookInstanceLifecycleConfigName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value) + } + sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv) + } + + case "NotebookInstanceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotebookInstanceName to be of type string, got %T instead", value) + } + sv.NotebookInstanceName = ptr.String(jtv) + } + + case "NotebookInstanceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotebookInstanceStatus to be of type string, got %T instead", value) + } + sv.NotebookInstanceStatus = types.NotebookInstanceStatus(jtv) + } + + case "PlatformIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformIdentifier to be of type string, got %T instead", value) + } + sv.PlatformIdentifier = ptr.String(jtv) + } + + case "RoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "RootAccess": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RootAccess to be of type string, got %T instead", value) + } + sv.RootAccess = types.RootAccess(jtv) + } + + case "SecurityGroups": + if err := awsAwsjson11_deserializeDocumentSecurityGroupIds(&sv.SecurityGroups, value); err != nil { + return err + } + + case "SubnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value) + } + sv.SubnetId = ptr.String(jtv) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotebookInstanceUrl to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + case "VolumeSizeInGB": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NotebookInstanceVolumeSizeInGB to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.VolumeSizeInGB = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeOptimizationJobOutput(v **DescribeOptimizationJobOutput, 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 *DescribeOptimizationJobOutput + if *v == nil { + sv = &DescribeOptimizationJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value) + + } + } + + case "DeploymentInstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationJobDeploymentInstanceType to be of type string, got %T instead", value) + } + sv.DeploymentInstanceType = types.OptimizationJobDeploymentInstanceType(jtv) + } + + case "FailureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value) } } - case "LastMonitoringExecutionSummary": - if err := awsAwsjson11_deserializeDocumentMonitoringExecutionSummary(&sv.LastMonitoringExecutionSummary, value); err != nil { + case "ModelSource": + if err := awsAwsjson11_deserializeDocumentOptimizationJobModelSource(&sv.ModelSource, value); err != nil { return err } - case "MonitoringScheduleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value) - } - sv.MonitoringScheduleArn = ptr.String(jtv) - } - - case "MonitoringScheduleConfig": - if err := awsAwsjson11_deserializeDocumentMonitoringScheduleConfig(&sv.MonitoringScheduleConfig, value); err != nil { + case "OptimizationConfigs": + if err := awsAwsjson11_deserializeDocumentOptimizationConfigs(&sv.OptimizationConfigs, value); err != nil { return err } - case "MonitoringScheduleName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MonitoringScheduleName to be of type string, got %T instead", value) - } - sv.MonitoringScheduleName = ptr.String(jtv) - } - - case "MonitoringScheduleStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ScheduleStatus to be of type string, got %T instead", value) - } - sv.MonitoringScheduleStatus = types.ScheduleStatus(jtv) - } - - case "MonitoringType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MonitoringType to be of type string, got %T instead", value) - } - sv.MonitoringType = types.MonitoringType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceLifecycleConfigOutput(v **DescribeNotebookInstanceLifecycleConfigOutput, 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 *DescribeNotebookInstanceLifecycleConfigOutput - if *v == nil { - sv = &DescribeNotebookInstanceLifecycleConfigOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CreationTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value) - - } - } - - case "LastModifiedTime": + case "OptimizationEndTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -89360,150 +91132,52 @@ func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceLifecycleConfigOu if err != nil { return err } - sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.OptimizationEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: - return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value) - - } - } - - case "NotebookInstanceLifecycleConfigArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NotebookInstanceLifecycleConfigArn to be of type string, got %T instead", value) - } - sv.NotebookInstanceLifecycleConfigArn = ptr.String(jtv) - } + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - case "NotebookInstanceLifecycleConfigName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value) } - sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv) } - case "OnCreate": - if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigList(&sv.OnCreate, value); err != nil { + case "OptimizationEnvironment": + if err := awsAwsjson11_deserializeDocumentOptimizationJobEnvironmentVariables(&sv.OptimizationEnvironment, value); err != nil { return err } - case "OnStart": - if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigList(&sv.OnStart, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceOutput(v **DescribeNotebookInstanceOutput, 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 *DescribeNotebookInstanceOutput - if *v == nil { - sv = &DescribeNotebookInstanceOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AcceleratorTypes": - if err := awsAwsjson11_deserializeDocumentNotebookInstanceAcceleratorTypes(&sv.AcceleratorTypes, value); err != nil { - return err - } - - case "AdditionalCodeRepositories": - if err := awsAwsjson11_deserializeDocumentAdditionalCodeRepositoryNamesOrUrls(&sv.AdditionalCodeRepositories, value); err != nil { - return err - } - - case "CreationTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value) - - } - } - - case "DefaultCodeRepository": + case "OptimizationJobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CodeRepositoryNameOrUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected OptimizationJobArn to be of type string, got %T instead", value) } - sv.DefaultCodeRepository = ptr.String(jtv) + sv.OptimizationJobArn = ptr.String(jtv) } - case "DirectInternetAccess": + case "OptimizationJobName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DirectInternetAccess to be of type string, got %T instead", value) + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) } - sv.DirectInternetAccess = types.DirectInternetAccess(jtv) + sv.OptimizationJobName = ptr.String(jtv) } - case "FailureReason": + case "OptimizationJobStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + return fmt.Errorf("expected OptimizationJobStatus to be of type string, got %T instead", value) } - sv.FailureReason = ptr.String(jtv) + sv.OptimizationJobStatus = types.OptimizationJobStatus(jtv) } - case "InstanceMetadataServiceConfiguration": - if err := awsAwsjson11_deserializeDocumentInstanceMetadataServiceConfiguration(&sv.InstanceMetadataServiceConfiguration, value); err != nil { + case "OptimizationOutput": + if err := awsAwsjson11_deserializeDocumentOptimizationOutput(&sv.OptimizationOutput, value); err != nil { return err } - case "InstanceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) - } - sv.InstanceType = types.InstanceType(jtv) - } - - case "KmsKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) - } - sv.KmsKeyId = ptr.String(jtv) - } - - case "LastModifiedTime": + case "OptimizationStartTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -89511,66 +91185,17 @@ func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceOutput(v **Descri if err != nil { return err } - sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.OptimizationStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: - return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value) - - } - } - - case "NetworkInterfaceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NetworkInterfaceId to be of type string, got %T instead", value) - } - sv.NetworkInterfaceId = ptr.String(jtv) - } - - case "NotebookInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NotebookInstanceArn to be of type string, got %T instead", value) - } - sv.NotebookInstanceArn = ptr.String(jtv) - } - - case "NotebookInstanceLifecycleConfigName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value) - } - sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv) - } - - case "NotebookInstanceName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NotebookInstanceName to be of type string, got %T instead", value) - } - sv.NotebookInstanceName = ptr.String(jtv) - } + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - case "NotebookInstanceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NotebookInstanceStatus to be of type string, got %T instead", value) } - sv.NotebookInstanceStatus = types.NotebookInstanceStatus(jtv) } - case "PlatformIdentifier": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PlatformIdentifier to be of type string, got %T instead", value) - } - sv.PlatformIdentifier = ptr.String(jtv) + case "OutputConfig": + if err := awsAwsjson11_deserializeDocumentOptimizationJobOutputConfig(&sv.OutputConfig, value); err != nil { + return err } case "RoleArn": @@ -89582,49 +91207,14 @@ func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceOutput(v **Descri sv.RoleArn = ptr.String(jtv) } - case "RootAccess": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RootAccess to be of type string, got %T instead", value) - } - sv.RootAccess = types.RootAccess(jtv) - } - - case "SecurityGroups": - if err := awsAwsjson11_deserializeDocumentSecurityGroupIds(&sv.SecurityGroups, value); err != nil { + case "StoppingCondition": + if err := awsAwsjson11_deserializeDocumentStoppingCondition(&sv.StoppingCondition, value); err != nil { return err } - case "SubnetId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value) - } - sv.SubnetId = ptr.String(jtv) - } - - case "Url": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NotebookInstanceUrl to be of type string, got %T instead", value) - } - sv.Url = ptr.String(jtv) - } - - case "VolumeSizeInGB": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected NotebookInstanceVolumeSizeInGB to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.VolumeSizeInGB = ptr.Int32(int32(i64)) + case "VpcConfig": + if err := awsAwsjson11_deserializeDocumentOptimizationVpcConfig(&sv.VpcConfig, value); err != nil { + return err } default: @@ -94732,6 +96322,51 @@ func awsAwsjson11_deserializeOpDocumentListNotebookInstancesOutput(v **ListNoteb return nil } +func awsAwsjson11_deserializeOpDocumentListOptimizationJobsOutput(v **ListOptimizationJobsOutput, 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 *ListOptimizationJobsOutput + if *v == nil { + sv = &ListOptimizationJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "OptimizationJobSummaries": + if err := awsAwsjson11_deserializeDocumentOptimizationJobSummaries(&sv.OptimizationJobSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListPipelineExecutionsOutput(v **ListPipelineExecutionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sagemaker/generated.json b/service/sagemaker/generated.json index d1e195da92d..c7868520801 100644 --- a/service/sagemaker/generated.json +++ b/service/sagemaker/generated.json @@ -57,6 +57,7 @@ "api_op_CreateMonitoringSchedule.go", "api_op_CreateNotebookInstance.go", "api_op_CreateNotebookInstanceLifecycleConfig.go", + "api_op_CreateOptimizationJob.go", "api_op_CreatePipeline.go", "api_op_CreatePresignedDomainUrl.go", "api_op_CreatePresignedMlflowTrackingServerUrl.go", @@ -113,6 +114,7 @@ "api_op_DeleteMonitoringSchedule.go", "api_op_DeleteNotebookInstance.go", "api_op_DeleteNotebookInstanceLifecycleConfig.go", + "api_op_DeleteOptimizationJob.go", "api_op_DeletePipeline.go", "api_op_DeleteProject.go", "api_op_DeleteSpace.go", @@ -171,6 +173,7 @@ "api_op_DescribeMonitoringSchedule.go", "api_op_DescribeNotebookInstance.go", "api_op_DescribeNotebookInstanceLifecycleConfig.go", + "api_op_DescribeOptimizationJob.go", "api_op_DescribePipeline.go", "api_op_DescribePipelineDefinitionForExecution.go", "api_op_DescribePipelineExecution.go", @@ -252,6 +255,7 @@ "api_op_ListMonitoringSchedules.go", "api_op_ListNotebookInstanceLifecycleConfigs.go", "api_op_ListNotebookInstances.go", + "api_op_ListOptimizationJobs.go", "api_op_ListPipelineExecutionSteps.go", "api_op_ListPipelineExecutions.go", "api_op_ListPipelineParametersForExecution.go", @@ -297,6 +301,7 @@ "api_op_StopMlflowTrackingServer.go", "api_op_StopMonitoringSchedule.go", "api_op_StopNotebookInstance.go", + "api_op_StopOptimizationJob.go", "api_op_StopPipelineExecution.go", "api_op_StopProcessingJob.go", "api_op_StopTrainingJob.go", diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index c21e53478c8..5aed8d05b0b 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -2657,6 +2657,61 @@ func (m *awsAwsjson11_serializeOpCreateNotebookInstanceLifecycleConfig) HandleSe return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateOptimizationJob struct { +} + +func (*awsAwsjson11_serializeOpCreateOptimizationJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateOptimizationJob) 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.(*CreateOptimizationJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("SageMaker.CreateOptimizationJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateOptimizationJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreatePipeline struct { } @@ -5737,6 +5792,61 @@ func (m *awsAwsjson11_serializeOpDeleteNotebookInstanceLifecycleConfig) HandleSe return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteOptimizationJob struct { +} + +func (*awsAwsjson11_serializeOpDeleteOptimizationJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteOptimizationJob) 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.(*DeleteOptimizationJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("SageMaker.DeleteOptimizationJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteOptimizationJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeletePipeline struct { } @@ -8927,6 +9037,61 @@ func (m *awsAwsjson11_serializeOpDescribeNotebookInstanceLifecycleConfig) Handle return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeOptimizationJob struct { +} + +func (*awsAwsjson11_serializeOpDescribeOptimizationJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeOptimizationJob) 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.(*DescribeOptimizationJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("SageMaker.DescribeOptimizationJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeOptimizationJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribePipeline struct { } @@ -13382,6 +13547,61 @@ func (m *awsAwsjson11_serializeOpListNotebookInstances) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListOptimizationJobs struct { +} + +func (*awsAwsjson11_serializeOpListOptimizationJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListOptimizationJobs) 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.(*ListOptimizationJobsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("SageMaker.ListOptimizationJobs") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListOptimizationJobsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListPipelineExecutions struct { } @@ -15857,6 +16077,61 @@ func (m *awsAwsjson11_serializeOpStopNotebookInstance) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpStopOptimizationJob struct { +} + +func (*awsAwsjson11_serializeOpStopOptimizationJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopOptimizationJob) 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.(*StopOptimizationJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("SageMaker.StopOptimizationJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopOptimizationJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpStopPipelineExecution struct { } @@ -18264,6 +18539,38 @@ func awsAwsjson11_serializeDocumentAdditionalInferenceSpecifications(v []types.A return nil } +func awsAwsjson11_serializeDocumentAdditionalModelDataSource(v *types.AdditionalModelDataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChannelName != nil { + ok := object.Key("ChannelName") + ok.String(*v.ChannelName) + } + + if v.S3DataSource != nil { + ok := object.Key("S3DataSource") + if err := awsAwsjson11_serializeDocumentS3ModelDataSource(v.S3DataSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentAdditionalModelDataSources(v []types.AdditionalModelDataSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAdditionalModelDataSource(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentAdditionalS3DataSource(v *types.AdditionalS3DataSource, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -18435,6 +18742,23 @@ func awsAwsjson11_serializeDocumentAlgorithmValidationSpecification(v *types.Alg return nil } +func awsAwsjson11_serializeDocumentAmazonQSettings(v *types.AmazonQSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QProfileArn != nil { + ok := object.Key("QProfileArn") + ok.String(*v.QProfileArn) + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + return nil +} + func awsAwsjson11_serializeDocumentAnnotationConsolidationConfig(v *types.AnnotationConsolidationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -20191,6 +20515,13 @@ func awsAwsjson11_serializeDocumentContainerDefinition(v *types.ContainerDefinit object := value.Object() defer object.Close() + if v.AdditionalModelDataSources != nil { + ok := object.Key("AdditionalModelDataSources") + if err := awsAwsjson11_serializeDocumentAdditionalModelDataSources(v.AdditionalModelDataSources, ok); err != nil { + return err + } + } + if v.ContainerHostname != nil { ok := object.Key("ContainerHostname") ok.String(*v.ContainerHostname) @@ -21230,6 +21561,13 @@ func awsAwsjson11_serializeDocumentDomainSettings(v *types.DomainSettings, value object := value.Object() defer object.Close() + if v.AmazonQSettings != nil { + ok := object.Key("AmazonQSettings") + if err := awsAwsjson11_serializeDocumentAmazonQSettings(v.AmazonQSettings, ok); err != nil { + return err + } + } + if v.DockerSettings != nil { ok := object.Key("DockerSettings") if err := awsAwsjson11_serializeDocumentDockerSettings(v.DockerSettings, ok); err != nil { @@ -21263,6 +21601,13 @@ func awsAwsjson11_serializeDocumentDomainSettingsForUpdate(v *types.DomainSettin object := value.Object() defer object.Close() + if v.AmazonQSettings != nil { + ok := object.Key("AmazonQSettings") + if err := awsAwsjson11_serializeDocumentAmazonQSettings(v.AmazonQSettings, ok); err != nil { + return err + } + } + if v.DockerSettings != nil { ok := object.Key("DockerSettings") if err := awsAwsjson11_serializeDocumentDockerSettings(v.DockerSettings, ok); err != nil { @@ -23953,6 +24298,25 @@ func awsAwsjson11_serializeDocumentModelClientConfig(v *types.ModelClientConfig, return nil } +func awsAwsjson11_serializeDocumentModelCompilationConfig(v *types.ModelCompilationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Image != nil { + ok := object.Key("Image") + ok.String(*v.Image) + } + + if v.OverrideEnvironment != nil { + ok := object.Key("OverrideEnvironment") + if err := awsAwsjson11_serializeDocumentOptimizationJobEnvironmentVariables(v.OverrideEnvironment, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentModelDataQuality(v *types.ModelDataQuality, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -24504,6 +24868,25 @@ func awsAwsjson11_serializeDocumentModelQualityJobInput(v *types.ModelQualityJob return nil } +func awsAwsjson11_serializeDocumentModelQuantizationConfig(v *types.ModelQuantizationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Image != nil { + ok := object.Key("Image") + ok.String(*v.Image) + } + + if v.OverrideEnvironment != nil { + ok := object.Key("OverrideEnvironment") + if err := awsAwsjson11_serializeDocumentOptimizationJobEnvironmentVariables(v.OverrideEnvironment, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentModelRegisterSettings(v *types.ModelRegisterSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -25346,6 +25729,162 @@ func awsAwsjson11_serializeDocumentOnlineStoreSecurityConfig(v *types.OnlineStor return nil } +func awsAwsjson11_serializeDocumentOptimizationConfig(v types.OptimizationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.OptimizationConfigMemberModelCompilationConfig: + av := object.Key("ModelCompilationConfig") + if err := awsAwsjson11_serializeDocumentModelCompilationConfig(&uv.Value, av); err != nil { + return err + } + + case *types.OptimizationConfigMemberModelQuantizationConfig: + av := object.Key("ModelQuantizationConfig") + if err := awsAwsjson11_serializeDocumentModelQuantizationConfig(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationConfigs(v []types.OptimizationConfig, 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 := awsAwsjson11_serializeDocumentOptimizationConfig(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationJobEnvironmentVariables(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationJobModelSource(v *types.OptimizationJobModelSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3 != nil { + ok := object.Key("S3") + if err := awsAwsjson11_serializeDocumentOptimizationJobModelSourceS3(v.S3, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationJobModelSourceS3(v *types.OptimizationJobModelSourceS3, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ModelAccessConfig != nil { + ok := object.Key("ModelAccessConfig") + if err := awsAwsjson11_serializeDocumentOptimizationModelAccessConfig(v.ModelAccessConfig, ok); err != nil { + return err + } + } + + if v.S3Uri != nil { + ok := object.Key("S3Uri") + ok.String(*v.S3Uri) + } + + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationJobOutputConfig(v *types.OptimizationJobOutputConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KmsKeyId != nil { + ok := object.Key("KmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.S3OutputLocation != nil { + ok := object.Key("S3OutputLocation") + ok.String(*v.S3OutputLocation) + } + + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationModelAccessConfig(v *types.OptimizationModelAccessConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AcceptEula != nil { + ok := object.Key("AcceptEula") + ok.Boolean(*v.AcceptEula) + } + + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationVpcConfig(v *types.OptimizationVpcConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SecurityGroupIds != nil { + ok := object.Key("SecurityGroupIds") + if err := awsAwsjson11_serializeDocumentOptimizationVpcSecurityGroupIds(v.SecurityGroupIds, ok); err != nil { + return err + } + } + + if v.Subnets != nil { + ok := object.Key("Subnets") + if err := awsAwsjson11_serializeDocumentOptimizationVpcSubnets(v.Subnets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationVpcSecurityGroupIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOptimizationVpcSubnets(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentOutputConfig(v *types.OutputConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -31436,6 +31975,77 @@ func awsAwsjson11_serializeOpDocumentCreateNotebookInstanceLifecycleConfigInput( return nil } +func awsAwsjson11_serializeOpDocumentCreateOptimizationJobInput(v *CreateOptimizationJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DeploymentInstanceType) > 0 { + ok := object.Key("DeploymentInstanceType") + ok.String(string(v.DeploymentInstanceType)) + } + + if v.ModelSource != nil { + ok := object.Key("ModelSource") + if err := awsAwsjson11_serializeDocumentOptimizationJobModelSource(v.ModelSource, ok); err != nil { + return err + } + } + + if v.OptimizationConfigs != nil { + ok := object.Key("OptimizationConfigs") + if err := awsAwsjson11_serializeDocumentOptimizationConfigs(v.OptimizationConfigs, ok); err != nil { + return err + } + } + + if v.OptimizationEnvironment != nil { + ok := object.Key("OptimizationEnvironment") + if err := awsAwsjson11_serializeDocumentOptimizationJobEnvironmentVariables(v.OptimizationEnvironment, ok); err != nil { + return err + } + } + + if v.OptimizationJobName != nil { + ok := object.Key("OptimizationJobName") + ok.String(*v.OptimizationJobName) + } + + if v.OutputConfig != nil { + ok := object.Key("OutputConfig") + if err := awsAwsjson11_serializeDocumentOptimizationJobOutputConfig(v.OutputConfig, ok); err != nil { + return err + } + } + + if v.RoleArn != nil { + ok := object.Key("RoleArn") + ok.String(*v.RoleArn) + } + + if v.StoppingCondition != nil { + ok := object.Key("StoppingCondition") + if err := awsAwsjson11_serializeDocumentStoppingCondition(v.StoppingCondition, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.VpcConfig != nil { + ok := object.Key("VpcConfig") + if err := awsAwsjson11_serializeDocumentOptimizationVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreatePipelineInput(v *CreatePipelineInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -32841,6 +33451,18 @@ func awsAwsjson11_serializeOpDocumentDeleteNotebookInstanceLifecycleConfigInput( return nil } +func awsAwsjson11_serializeOpDocumentDeleteOptimizationJobInput(v *DeleteOptimizationJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OptimizationJobName != nil { + ok := object.Key("OptimizationJobName") + ok.String(*v.OptimizationJobName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeletePipelineInput(v *DeletePipelineInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -33651,6 +34273,18 @@ func awsAwsjson11_serializeOpDocumentDescribeNotebookInstanceLifecycleConfigInpu return nil } +func awsAwsjson11_serializeOpDocumentDescribeOptimizationJobInput(v *DescribeOptimizationJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OptimizationJobName != nil { + ok := object.Key("OptimizationJobName") + ok.String(*v.OptimizationJobName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribePipelineDefinitionForExecutionInput(v *DescribePipelineDefinitionForExecutionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -36783,6 +37417,68 @@ func awsAwsjson11_serializeOpDocumentListNotebookInstancesInput(v *ListNotebookI return nil } +func awsAwsjson11_serializeOpDocumentListOptimizationJobsInput(v *ListOptimizationJobsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreationTimeAfter != nil { + ok := object.Key("CreationTimeAfter") + ok.Double(smithytime.FormatEpochSeconds(*v.CreationTimeAfter)) + } + + if v.CreationTimeBefore != nil { + ok := object.Key("CreationTimeBefore") + ok.Double(smithytime.FormatEpochSeconds(*v.CreationTimeBefore)) + } + + if v.LastModifiedTimeAfter != nil { + ok := object.Key("LastModifiedTimeAfter") + ok.Double(smithytime.FormatEpochSeconds(*v.LastModifiedTimeAfter)) + } + + if v.LastModifiedTimeBefore != nil { + ok := object.Key("LastModifiedTimeBefore") + ok.Double(smithytime.FormatEpochSeconds(*v.LastModifiedTimeBefore)) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NameContains != nil { + ok := object.Key("NameContains") + ok.String(*v.NameContains) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.OptimizationContains != nil { + ok := object.Key("OptimizationContains") + ok.String(*v.OptimizationContains) + } + + if len(v.SortBy) > 0 { + ok := object.Key("SortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("SortOrder") + ok.String(string(v.SortOrder)) + } + + if len(v.StatusEquals) > 0 { + ok := object.Key("StatusEquals") + ok.String(string(v.StatusEquals)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListPipelineExecutionsInput(v *ListPipelineExecutionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -38098,6 +38794,18 @@ func awsAwsjson11_serializeOpDocumentStopNotebookInstanceInput(v *StopNotebookIn return nil } +func awsAwsjson11_serializeOpDocumentStopOptimizationJobInput(v *StopOptimizationJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OptimizationJobName != nil { + ok := object.Key("OptimizationJobName") + ok.String(*v.OptimizationJobName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentStopPipelineExecutionInput(v *StopPipelineExecutionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/sagemaker/snapshot/api_op_CreateOptimizationJob.go.snap b/service/sagemaker/snapshot/api_op_CreateOptimizationJob.go.snap new file mode 100644 index 00000000000..6b893bf848d --- /dev/null +++ b/service/sagemaker/snapshot/api_op_CreateOptimizationJob.go.snap @@ -0,0 +1,36 @@ +CreateOptimizationJob + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/sagemaker/snapshot/api_op_DeleteOptimizationJob.go.snap b/service/sagemaker/snapshot/api_op_DeleteOptimizationJob.go.snap new file mode 100644 index 00000000000..67456cc831d --- /dev/null +++ b/service/sagemaker/snapshot/api_op_DeleteOptimizationJob.go.snap @@ -0,0 +1,36 @@ +DeleteOptimizationJob + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/sagemaker/snapshot/api_op_DescribeOptimizationJob.go.snap b/service/sagemaker/snapshot/api_op_DescribeOptimizationJob.go.snap new file mode 100644 index 00000000000..7db130aaa70 --- /dev/null +++ b/service/sagemaker/snapshot/api_op_DescribeOptimizationJob.go.snap @@ -0,0 +1,36 @@ +DescribeOptimizationJob + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/sagemaker/snapshot/api_op_ListOptimizationJobs.go.snap b/service/sagemaker/snapshot/api_op_ListOptimizationJobs.go.snap new file mode 100644 index 00000000000..438769e72d4 --- /dev/null +++ b/service/sagemaker/snapshot/api_op_ListOptimizationJobs.go.snap @@ -0,0 +1,35 @@ +ListOptimizationJobs + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/sagemaker/snapshot/api_op_StopOptimizationJob.go.snap b/service/sagemaker/snapshot/api_op_StopOptimizationJob.go.snap new file mode 100644 index 00000000000..a58f269f8d8 --- /dev/null +++ b/service/sagemaker/snapshot/api_op_StopOptimizationJob.go.snap @@ -0,0 +1,36 @@ +StopOptimizationJob + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/sagemaker/snapshot_test.go b/service/sagemaker/snapshot_test.go index 8b65651ba71..53be51214e7 100644 --- a/service/sagemaker/snapshot_test.go +++ b/service/sagemaker/snapshot_test.go @@ -638,6 +638,18 @@ func TestCheckSnapshot_CreateNotebookInstanceLifecycleConfig(t *testing.T) { } } +func TestCheckSnapshot_CreateOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreatePipeline(t *testing.T) { svc := New(Options{}) _, err := svc.CreatePipeline(context.Background(), nil, func(o *Options) { @@ -1310,6 +1322,18 @@ func TestCheckSnapshot_DeleteNotebookInstanceLifecycleConfig(t *testing.T) { } } +func TestCheckSnapshot_DeleteOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeletePipeline(t *testing.T) { svc := New(Options{}) _, err := svc.DeletePipeline(context.Background(), nil, func(o *Options) { @@ -2006,6 +2030,18 @@ func TestCheckSnapshot_DescribeNotebookInstanceLifecycleConfig(t *testing.T) { } } +func TestCheckSnapshot_DescribeOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribePipeline(t *testing.T) { svc := New(Options{}) _, err := svc.DescribePipeline(context.Background(), nil, func(o *Options) { @@ -2978,6 +3014,18 @@ func TestCheckSnapshot_ListNotebookInstances(t *testing.T) { } } +func TestCheckSnapshot_ListOptimizationJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListOptimizationJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListOptimizationJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListPipelineExecutions(t *testing.T) { svc := New(Options{}) _, err := svc.ListPipelineExecutions(context.Background(), nil, func(o *Options) { @@ -3518,6 +3566,18 @@ func TestCheckSnapshot_StopNotebookInstance(t *testing.T) { } } +func TestCheckSnapshot_StopOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StopOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StopOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StopPipelineExecution(t *testing.T) { svc := New(Options{}) _, err := svc.StopPipelineExecution(context.Background(), nil, func(o *Options) { @@ -4597,6 +4657,18 @@ func TestUpdateSnapshot_CreateNotebookInstanceLifecycleConfig(t *testing.T) { } } +func TestUpdateSnapshot_CreateOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreatePipeline(t *testing.T) { svc := New(Options{}) _, err := svc.CreatePipeline(context.Background(), nil, func(o *Options) { @@ -5269,6 +5341,18 @@ func TestUpdateSnapshot_DeleteNotebookInstanceLifecycleConfig(t *testing.T) { } } +func TestUpdateSnapshot_DeleteOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeletePipeline(t *testing.T) { svc := New(Options{}) _, err := svc.DeletePipeline(context.Background(), nil, func(o *Options) { @@ -5965,6 +6049,18 @@ func TestUpdateSnapshot_DescribeNotebookInstanceLifecycleConfig(t *testing.T) { } } +func TestUpdateSnapshot_DescribeOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribePipeline(t *testing.T) { svc := New(Options{}) _, err := svc.DescribePipeline(context.Background(), nil, func(o *Options) { @@ -6937,6 +7033,18 @@ func TestUpdateSnapshot_ListNotebookInstances(t *testing.T) { } } +func TestUpdateSnapshot_ListOptimizationJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListOptimizationJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListOptimizationJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListPipelineExecutions(t *testing.T) { svc := New(Options{}) _, err := svc.ListPipelineExecutions(context.Background(), nil, func(o *Options) { @@ -7477,6 +7585,18 @@ func TestUpdateSnapshot_StopNotebookInstance(t *testing.T) { } } +func TestUpdateSnapshot_StopOptimizationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StopOptimizationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StopOptimizationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StopPipelineExecution(t *testing.T) { svc := New(Options{}) _, err := svc.StopPipelineExecution(context.Background(), nil, func(o *Options) { diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 794271a8e31..eb9ac8ccab4 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -3752,6 +3752,27 @@ func (ListLabelingJobsForWorkteamSortByOptions) Values() []ListLabelingJobsForWo } } +type ListOptimizationJobsSortBy string + +// Enum values for ListOptimizationJobsSortBy +const ( + ListOptimizationJobsSortByName ListOptimizationJobsSortBy = "Name" + ListOptimizationJobsSortByCreationTime ListOptimizationJobsSortBy = "CreationTime" + ListOptimizationJobsSortByStatus ListOptimizationJobsSortBy = "Status" +) + +// Values returns all known values for ListOptimizationJobsSortBy. 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 (ListOptimizationJobsSortBy) Values() []ListOptimizationJobsSortBy { + return []ListOptimizationJobsSortBy{ + "Name", + "CreationTime", + "Status", + } +} + type ListWorkforcesSortByOptions string // Enum values for ListWorkforcesSortByOptions @@ -4693,6 +4714,101 @@ func (Operator) Values() []Operator { } } +type OptimizationJobDeploymentInstanceType string + +// Enum values for OptimizationJobDeploymentInstanceType +const ( + OptimizationJobDeploymentInstanceTypeMlP4d24xlarge OptimizationJobDeploymentInstanceType = "ml.p4d.24xlarge" + OptimizationJobDeploymentInstanceTypeMlP4de24xlarge OptimizationJobDeploymentInstanceType = "ml.p4de.24xlarge" + OptimizationJobDeploymentInstanceTypeMlP548xlarge OptimizationJobDeploymentInstanceType = "ml.p5.48xlarge" + OptimizationJobDeploymentInstanceTypeMlG5Xlarge OptimizationJobDeploymentInstanceType = "ml.g5.xlarge" + OptimizationJobDeploymentInstanceTypeMlG52xlarge OptimizationJobDeploymentInstanceType = "ml.g5.2xlarge" + OptimizationJobDeploymentInstanceTypeMlG54xlarge OptimizationJobDeploymentInstanceType = "ml.g5.4xlarge" + OptimizationJobDeploymentInstanceTypeMlG58xlarge OptimizationJobDeploymentInstanceType = "ml.g5.8xlarge" + OptimizationJobDeploymentInstanceTypeMlG512xlarge OptimizationJobDeploymentInstanceType = "ml.g5.12xlarge" + OptimizationJobDeploymentInstanceTypeMlG516xlarge OptimizationJobDeploymentInstanceType = "ml.g5.16xlarge" + OptimizationJobDeploymentInstanceTypeMlG524xlarge OptimizationJobDeploymentInstanceType = "ml.g5.24xlarge" + OptimizationJobDeploymentInstanceTypeMlG548xlarge OptimizationJobDeploymentInstanceType = "ml.g5.48xlarge" + OptimizationJobDeploymentInstanceTypeMlG6Xlarge OptimizationJobDeploymentInstanceType = "ml.g6.xlarge" + OptimizationJobDeploymentInstanceTypeMlG62xlarge OptimizationJobDeploymentInstanceType = "ml.g6.2xlarge" + OptimizationJobDeploymentInstanceTypeMlG64xlarge OptimizationJobDeploymentInstanceType = "ml.g6.4xlarge" + OptimizationJobDeploymentInstanceTypeMlG68xlarge OptimizationJobDeploymentInstanceType = "ml.g6.8xlarge" + OptimizationJobDeploymentInstanceTypeMlG612xlarge OptimizationJobDeploymentInstanceType = "ml.g6.12xlarge" + OptimizationJobDeploymentInstanceTypeMlG616xlarge OptimizationJobDeploymentInstanceType = "ml.g6.16xlarge" + OptimizationJobDeploymentInstanceTypeMlG624xlarge OptimizationJobDeploymentInstanceType = "ml.g6.24xlarge" + OptimizationJobDeploymentInstanceTypeMlG648xlarge OptimizationJobDeploymentInstanceType = "ml.g6.48xlarge" + OptimizationJobDeploymentInstanceTypeMlInf2Xlarge OptimizationJobDeploymentInstanceType = "ml.inf2.xlarge" + OptimizationJobDeploymentInstanceTypeMlInf28xlarge OptimizationJobDeploymentInstanceType = "ml.inf2.8xlarge" + OptimizationJobDeploymentInstanceTypeMlInf224xlarge OptimizationJobDeploymentInstanceType = "ml.inf2.24xlarge" + OptimizationJobDeploymentInstanceTypeMlInf248xlarge OptimizationJobDeploymentInstanceType = "ml.inf2.48xlarge" + OptimizationJobDeploymentInstanceTypeMlTrn12xlarge OptimizationJobDeploymentInstanceType = "ml.trn1.2xlarge" + OptimizationJobDeploymentInstanceTypeMlTrn132xlarge OptimizationJobDeploymentInstanceType = "ml.trn1.32xlarge" + OptimizationJobDeploymentInstanceTypeMlTrn1n32xlarge OptimizationJobDeploymentInstanceType = "ml.trn1n.32xlarge" +) + +// Values returns all known values for OptimizationJobDeploymentInstanceType. 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 (OptimizationJobDeploymentInstanceType) Values() []OptimizationJobDeploymentInstanceType { + return []OptimizationJobDeploymentInstanceType{ + "ml.p4d.24xlarge", + "ml.p4de.24xlarge", + "ml.p5.48xlarge", + "ml.g5.xlarge", + "ml.g5.2xlarge", + "ml.g5.4xlarge", + "ml.g5.8xlarge", + "ml.g5.12xlarge", + "ml.g5.16xlarge", + "ml.g5.24xlarge", + "ml.g5.48xlarge", + "ml.g6.xlarge", + "ml.g6.2xlarge", + "ml.g6.4xlarge", + "ml.g6.8xlarge", + "ml.g6.12xlarge", + "ml.g6.16xlarge", + "ml.g6.24xlarge", + "ml.g6.48xlarge", + "ml.inf2.xlarge", + "ml.inf2.8xlarge", + "ml.inf2.24xlarge", + "ml.inf2.48xlarge", + "ml.trn1.2xlarge", + "ml.trn1.32xlarge", + "ml.trn1n.32xlarge", + } +} + +type OptimizationJobStatus string + +// Enum values for OptimizationJobStatus +const ( + OptimizationJobStatusInprogress OptimizationJobStatus = "INPROGRESS" + OptimizationJobStatusCompleted OptimizationJobStatus = "COMPLETED" + OptimizationJobStatusFailed OptimizationJobStatus = "FAILED" + OptimizationJobStatusStarting OptimizationJobStatus = "STARTING" + OptimizationJobStatusStopping OptimizationJobStatus = "STOPPING" + OptimizationJobStatusStopped OptimizationJobStatus = "STOPPED" +) + +// Values returns all known values for OptimizationJobStatus. 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 (OptimizationJobStatus) Values() []OptimizationJobStatus { + return []OptimizationJobStatus{ + "INPROGRESS", + "COMPLETED", + "FAILED", + "STARTING", + "STOPPING", + "STOPPED", + } +} + type OrderKey string // Enum values for OrderKey diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 4589bbfde01..aae94cb7fce 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -90,6 +90,23 @@ type AdditionalInferenceSpecificationDefinition struct { noSmithyDocumentSerde } +// Data sources that are available to your model in addition to the one that you +// specify for ModelDataSource when you use the CreateModel action. +type AdditionalModelDataSource struct { + + // A custom name for this AdditionalModelDataSource object. + // + // This member is required. + ChannelName *string + + // Specifies the S3 location of ML model data to deploy. + // + // This member is required. + S3DataSource *S3ModelDataSource + + noSmithyDocumentSerde +} + // A data source used for training or inference that is in addition to the input // dataset or model data. type AdditionalS3DataSource struct { @@ -371,6 +388,19 @@ type AlgorithmValidationSpecification struct { noSmithyDocumentSerde } +// A collection of settings that configure the Amazon Q experience within the +// domain. +type AmazonQSettings struct { + + // The ARN of the Amazon Q profile used within the domain. + QProfileArn *string + + // Whether Amazon Q has been enabled within the domain. + Status FeatureStatus + + noSmithyDocumentSerde +} + // Configures how labels are consolidated across human workers and processes // output data. type AnnotationConsolidationConfig struct { @@ -3651,6 +3681,10 @@ type ContainerConfig struct { // Describes the container, as part of model definition. type ContainerDefinition struct { + // Data sources that are available to your model in addition to the one that you + // specify for ModelDataSource when you use the CreateModel action. + AdditionalModelDataSources []AdditionalModelDataSource + // This parameter is ignored for models that contain only a PrimaryContainer . // // When a ContainerDefinition is part of an inference pipeline, the value of the @@ -4724,6 +4758,10 @@ type DomainDetails struct { // specified through the CreateDomain API call. type DomainSettings struct { + // A collection of settings that configure the Amazon Q experience within the + // domain. The AuthMode that you use to create the domain must be SSO . + AmazonQSettings *AmazonQSettings + // A collection of settings that configure the domain's Docker interaction. DockerSettings *DockerSettings @@ -4746,6 +4784,10 @@ type DomainSettings struct { // A collection of Domain configuration settings to update. type DomainSettingsForUpdate struct { + // A collection of settings that configure the Amazon Q experience within the + // domain. + AmazonQSettings *AmazonQSettings + // A collection of settings that configure the domain's Docker interaction. DockerSettings *DockerSettings @@ -10423,6 +10465,20 @@ type ModelClientConfig struct { noSmithyDocumentSerde } +// Settings for the model compilation technique that's applied by a model +// optimization job. +type ModelCompilationConfig struct { + + // The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the + // optimization. + Image *string + + // Environment variables that override the default ones in the model container. + OverrideEnvironment map[string]string + + noSmithyDocumentSerde +} + // Defines the model configuration. Includes the specification name and // environment parameters. type ModelConfiguration struct { @@ -11331,6 +11387,20 @@ type ModelQualityJobInput struct { noSmithyDocumentSerde } +// Settings for the model quantization technique that's applied by a model +// optimization job. +type ModelQuantizationConfig struct { + + // The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the + // optimization. + Image *string + + // Environment variables that override the default ones in the model container. + OverrideEnvironment map[string]string + + noSmithyDocumentSerde +} + // The model registry settings for the SageMaker Canvas application. type ModelRegisterSettings struct { @@ -12479,6 +12549,172 @@ type OnlineStoreSecurityConfig struct { noSmithyDocumentSerde } +// Settings for an optimization technique that you apply with a model optimization +// job. +// +// The following types satisfy this interface: +// +// OptimizationConfigMemberModelCompilationConfig +// OptimizationConfigMemberModelQuantizationConfig +type OptimizationConfig interface { + isOptimizationConfig() +} + +// Settings for the model compilation technique that's applied by a model +// optimization job. +type OptimizationConfigMemberModelCompilationConfig struct { + Value ModelCompilationConfig + + noSmithyDocumentSerde +} + +func (*OptimizationConfigMemberModelCompilationConfig) isOptimizationConfig() {} + +// Settings for the model quantization technique that's applied by a model +// optimization job. +type OptimizationConfigMemberModelQuantizationConfig struct { + Value ModelQuantizationConfig + + noSmithyDocumentSerde +} + +func (*OptimizationConfigMemberModelQuantizationConfig) isOptimizationConfig() {} + +// The location of the source model to optimize with an optimization job. +type OptimizationJobModelSource struct { + + // The Amazon S3 location of a source model to optimize with an optimization job. + S3 *OptimizationJobModelSourceS3 + + noSmithyDocumentSerde +} + +// The Amazon S3 location of a source model to optimize with an optimization job. +type OptimizationJobModelSourceS3 struct { + + // The access configuration settings for the source ML model for an optimization + // job, where you can accept the model end-user license agreement (EULA). + ModelAccessConfig *OptimizationModelAccessConfig + + // An Amazon S3 URI that locates a source model to optimize with an optimization + // job. + S3Uri *string + + noSmithyDocumentSerde +} + +// Details for where to store the optimized model that you create with the +// optimization job. +type OptimizationJobOutputConfig struct { + + // The Amazon S3 URI for where to store the optimized model that you create with + // an optimization job. + // + // This member is required. + S3OutputLocation *string + + // The Amazon Resource Name (ARN) of a key in Amazon Web Services KMS. SageMaker + // uses they key to encrypt the artifacts of the optimized model when SageMaker + // uploads the model to Amazon S3. + KmsKeyId *string + + noSmithyDocumentSerde +} + +// Summarizes an optimization job by providing some of its key properties. +type OptimizationJobSummary struct { + + // The time when you created the optimization job. + // + // This member is required. + CreationTime *time.Time + + // The type of instance that hosts the optimized model that you create with the + // optimization job. + // + // This member is required. + DeploymentInstanceType OptimizationJobDeploymentInstanceType + + // The Amazon Resource Name (ARN) of the optimization job. + // + // This member is required. + OptimizationJobArn *string + + // The name that you assigned to the optimization job. + // + // This member is required. + OptimizationJobName *string + + // The current status of the optimization job. + // + // This member is required. + OptimizationJobStatus OptimizationJobStatus + + // The optimization techniques that are applied by the optimization job. + // + // This member is required. + OptimizationTypes []string + + // The time when the optimization job was last updated. + LastModifiedTime *time.Time + + // The time when the optimization job finished processing. + OptimizationEndTime *time.Time + + // The time when the optimization job started. + OptimizationStartTime *time.Time + + noSmithyDocumentSerde +} + +// The access configuration settings for the source ML model for an optimization +// job, where you can accept the model end-user license agreement (EULA). +type OptimizationModelAccessConfig struct { + + // Specifies agreement to the model end-user license agreement (EULA). The + // AcceptEula value must be explicitly defined as True in order to accept the EULA + // that this model requires. You are responsible for reviewing and complying with + // any applicable license terms and making sure they are acceptable for your use + // case before downloading or using a model. + // + // This member is required. + AcceptEula *bool + + noSmithyDocumentSerde +} + +// Output values produced by an optimization job. +type OptimizationOutput struct { + + // The image that SageMaker recommends that you use to host the optimized model + // that you created with an optimization job. + RecommendedInferenceImage *string + + noSmithyDocumentSerde +} + +// A VPC in Amazon VPC that's accessible to an optimized that you create with an +// optimization job. You can control access to and from your resources by +// configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC]. +// +// [Give SageMaker Access to Resources in your Amazon VPC]: https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html +type OptimizationVpcConfig struct { + + // The VPC security group IDs, in the form sg-xxxxxxxx . Specify the security + // groups for the VPC that is specified in the Subnets field. + // + // This member is required. + SecurityGroupIds []string + + // The ID of the subnets in the VPC to which you want to connect your optimized + // model. + // + // This member is required. + Subnets []string + + noSmithyDocumentSerde +} + // Contains information about the output location for the compiled model and the // target device that the model runs on. TargetDevice and TargetPlatform are // mutually exclusive, so you need to choose one between the two to specify your @@ -16311,10 +16547,8 @@ type Stairs struct { noSmithyDocumentSerde } -// Specifies a limit to how long a model training job or model compilation job can -// run. It also specifies how long a managed spot training job has to complete. -// When the job reaches the time limit, SageMaker ends the training or compilation -// job. Use this API to cap model training costs. +// Specifies a limit to how long a job can run. When the job reaches the time +// limit, SageMaker ends the job. Use this API to cap costs. // // To stop a training job, SageMaker sends the algorithm the SIGTERM signal, which // delays job termination for 120 seconds. Algorithms can use this 120-second @@ -19039,5 +19273,6 @@ func (*UnknownUnionMember) isCollectionConfig() {} func (*UnknownUnionMember) isCustomFileSystem() {} func (*UnknownUnionMember) isCustomFileSystemConfig() {} func (*UnknownUnionMember) isMetricSpecification() {} +func (*UnknownUnionMember) isOptimizationConfig() {} func (*UnknownUnionMember) isScalingPolicy() {} func (*UnknownUnionMember) isTrialComponentParameterValue() {} diff --git a/service/sagemaker/types/types_exported_test.go b/service/sagemaker/types/types_exported_test.go index d1cd8e371b3..be97515e498 100644 --- a/service/sagemaker/types/types_exported_test.go +++ b/service/sagemaker/types/types_exported_test.go @@ -157,6 +157,28 @@ func ExampleMetricSpecification_outputUsage() { var _ *types.PredefinedMetricSpecification var _ *types.CustomizedMetricSpecification +func ExampleOptimizationConfig_outputUsage() { + var union types.OptimizationConfig + // type switches can be used to check the union value + switch v := union.(type) { + case *types.OptimizationConfigMemberModelCompilationConfig: + _ = v.Value // Value is types.ModelCompilationConfig + + case *types.OptimizationConfigMemberModelQuantizationConfig: + _ = v.Value // Value is types.ModelQuantizationConfig + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.ModelCompilationConfig +var _ *types.ModelQuantizationConfig + func ExampleScalingPolicy_outputUsage() { var union types.ScalingPolicy // type switches can be used to check the union value diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index e6a3667ce16..0fc3fe80ba2 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -970,6 +970,26 @@ func (m *validateOpCreateNotebookInstanceLifecycleConfig) HandleInitialize(ctx c return next.HandleInitialize(ctx, in) } +type validateOpCreateOptimizationJob struct { +} + +func (*validateOpCreateOptimizationJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOptimizationJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOptimizationJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOptimizationJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreatePipeline struct { } @@ -2090,6 +2110,26 @@ func (m *validateOpDeleteNotebookInstanceLifecycleConfig) HandleInitialize(ctx c return next.HandleInitialize(ctx, in) } +type validateOpDeleteOptimizationJob struct { +} + +func (*validateOpDeleteOptimizationJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOptimizationJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOptimizationJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOptimizationJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeletePipeline struct { } @@ -3250,6 +3290,26 @@ func (m *validateOpDescribeNotebookInstanceLifecycleConfig) HandleInitialize(ctx return next.HandleInitialize(ctx, in) } +type validateOpDescribeOptimizationJob struct { +} + +func (*validateOpDescribeOptimizationJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeOptimizationJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeOptimizationJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeOptimizationJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribePipelineDefinitionForExecution struct { } @@ -4510,6 +4570,26 @@ func (m *validateOpStopNotebookInstance) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpStopOptimizationJob struct { +} + +func (*validateOpStopOptimizationJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopOptimizationJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopOptimizationJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopOptimizationJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStopPipelineExecution struct { } @@ -5542,6 +5622,10 @@ func addOpCreateNotebookInstanceLifecycleConfigValidationMiddleware(stack *middl return stack.Initialize.Add(&validateOpCreateNotebookInstanceLifecycleConfig{}, middleware.After) } +func addOpCreateOptimizationJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOptimizationJob{}, middleware.After) +} + func addOpCreatePipelineValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreatePipeline{}, middleware.After) } @@ -5766,6 +5850,10 @@ func addOpDeleteNotebookInstanceLifecycleConfigValidationMiddleware(stack *middl return stack.Initialize.Add(&validateOpDeleteNotebookInstanceLifecycleConfig{}, middleware.After) } +func addOpDeleteOptimizationJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOptimizationJob{}, middleware.After) +} + func addOpDeletePipelineValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePipeline{}, middleware.After) } @@ -5998,6 +6086,10 @@ func addOpDescribeNotebookInstanceLifecycleConfigValidationMiddleware(stack *mid return stack.Initialize.Add(&validateOpDescribeNotebookInstanceLifecycleConfig{}, middleware.After) } +func addOpDescribeOptimizationJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeOptimizationJob{}, middleware.After) +} + func addOpDescribePipelineDefinitionForExecutionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribePipelineDefinitionForExecution{}, middleware.After) } @@ -6250,6 +6342,10 @@ func addOpStopNotebookInstanceValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpStopNotebookInstance{}, middleware.After) } +func addOpStopOptimizationJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopOptimizationJob{}, middleware.After) +} + func addOpStopPipelineExecutionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopPipelineExecution{}, middleware.After) } @@ -6472,6 +6568,45 @@ func validateAdditionalInferenceSpecifications(v []types.AdditionalInferenceSpec } } +func validateAdditionalModelDataSource(v *types.AdditionalModelDataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AdditionalModelDataSource"} + if v.ChannelName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) + } + if v.S3DataSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3DataSource")) + } else if v.S3DataSource != nil { + if err := validateS3ModelDataSource(v.S3DataSource); err != nil { + invalidParams.AddNested("S3DataSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAdditionalModelDataSources(v []types.AdditionalModelDataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AdditionalModelDataSources"} + for i := range v { + if err := validateAdditionalModelDataSource(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAdditionalS3DataSource(v *types.AdditionalS3DataSource) error { if v == nil { return nil @@ -7633,6 +7768,11 @@ func validateContainerDefinition(v *types.ContainerDefinition) error { invalidParams.AddNested("ModelDataSource", err.(smithy.InvalidParamsError)) } } + if v.AdditionalModelDataSources != nil { + if err := validateAdditionalModelDataSources(v.AdditionalModelDataSources); err != nil { + invalidParams.AddNested("AdditionalModelDataSources", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -10694,6 +10834,88 @@ func validateOidcConfig(v *types.OidcConfig) error { } } +func validateOptimizationJobModelSource(v *types.OptimizationJobModelSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OptimizationJobModelSource"} + if v.S3 != nil { + if err := validateOptimizationJobModelSourceS3(v.S3); err != nil { + invalidParams.AddNested("S3", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOptimizationJobModelSourceS3(v *types.OptimizationJobModelSourceS3) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OptimizationJobModelSourceS3"} + if v.ModelAccessConfig != nil { + if err := validateOptimizationModelAccessConfig(v.ModelAccessConfig); err != nil { + invalidParams.AddNested("ModelAccessConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOptimizationJobOutputConfig(v *types.OptimizationJobOutputConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OptimizationJobOutputConfig"} + if v.S3OutputLocation == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3OutputLocation")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOptimizationModelAccessConfig(v *types.OptimizationModelAccessConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OptimizationModelAccessConfig"} + if v.AcceptEula == nil { + invalidParams.Add(smithy.NewErrParamRequired("AcceptEula")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOptimizationVpcConfig(v *types.OptimizationVpcConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OptimizationVpcConfig"} + if v.SecurityGroupIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupIds")) + } + if v.Subnets == nil { + invalidParams.Add(smithy.NewErrParamRequired("Subnets")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOutputConfig(v *types.OutputConfig) error { if v == nil { return nil @@ -14232,6 +14454,57 @@ func validateOpCreateNotebookInstanceLifecycleConfigInput(v *CreateNotebookInsta } } +func validateOpCreateOptimizationJobInput(v *CreateOptimizationJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOptimizationJobInput"} + if v.OptimizationJobName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OptimizationJobName")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if v.ModelSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ModelSource")) + } else if v.ModelSource != nil { + if err := validateOptimizationJobModelSource(v.ModelSource); err != nil { + invalidParams.AddNested("ModelSource", err.(smithy.InvalidParamsError)) + } + } + if len(v.DeploymentInstanceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DeploymentInstanceType")) + } + if v.OptimizationConfigs == nil { + invalidParams.Add(smithy.NewErrParamRequired("OptimizationConfigs")) + } + if v.OutputConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputConfig")) + } else if v.OutputConfig != nil { + if err := validateOptimizationJobOutputConfig(v.OutputConfig); err != nil { + invalidParams.AddNested("OutputConfig", err.(smithy.InvalidParamsError)) + } + } + if v.StoppingCondition == nil { + invalidParams.Add(smithy.NewErrParamRequired("StoppingCondition")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.VpcConfig != nil { + if err := validateOptimizationVpcConfig(v.VpcConfig); err != nil { + invalidParams.AddNested("VpcConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreatePipelineInput(v *CreatePipelineInput) error { if v == nil { return nil @@ -15390,6 +15663,21 @@ func validateOpDeleteNotebookInstanceLifecycleConfigInput(v *DeleteNotebookInsta } } +func validateOpDeleteOptimizationJobInput(v *DeleteOptimizationJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOptimizationJobInput"} + if v.OptimizationJobName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OptimizationJobName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeletePipelineInput(v *DeletePipelineInput) error { if v == nil { return nil @@ -16296,6 +16584,21 @@ func validateOpDescribeNotebookInstanceLifecycleConfigInput(v *DescribeNotebookI } } +func validateOpDescribeOptimizationJobInput(v *DescribeOptimizationJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeOptimizationJobInput"} + if v.OptimizationJobName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OptimizationJobName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribePipelineDefinitionForExecutionInput(v *DescribePipelineDefinitionForExecutionInput) error { if v == nil { return nil @@ -17363,6 +17666,21 @@ func validateOpStopNotebookInstanceInput(v *StopNotebookInstanceInput) error { } } +func validateOpStopOptimizationJobInput(v *StopOptimizationJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopOptimizationJobInput"} + if v.OptimizationJobName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OptimizationJobName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStopPipelineExecutionInput(v *StopPipelineExecutionInput) error { if v == nil { return nil