diff --git a/.changelog/0141d2d7b3134f179fbdca3c1808bc54.json b/.changelog/0141d2d7b3134f179fbdca3c1808bc54.json new file mode 100644 index 00000000000..f452b1c9fe2 --- /dev/null +++ b/.changelog/0141d2d7b3134f179fbdca3c1808bc54.json @@ -0,0 +1,8 @@ +{ + "id": "0141d2d7-b313-4f17-9fbd-ca3c1808bc54", + "type": "feature", + "description": "Add support for gRPC, VPC origins, and Anycast IP Lists. Allow LoggingConfig IncludeCookies to be set regardless of whether the LoggingConfig is enabled.", + "modules": [ + "service/cloudfront" + ] +} \ No newline at end of file diff --git a/.changelog/132b268f37944ad484a719bee942e7d7.json b/.changelog/132b268f37944ad484a719bee942e7d7.json new file mode 100644 index 00000000000..d2bfaa47219 --- /dev/null +++ b/.changelog/132b268f37944ad484a719bee942e7d7.json @@ -0,0 +1,8 @@ +{ + "id": "132b268f-3794-4ad4-84a7-19bee942e7d7", + "type": "feature", + "description": "This release adds the ability to reconfigure concurrent job settings for existing queues and create queues with custom concurrent job settings.", + "modules": [ + "service/mediaconvert" + ] +} \ No newline at end of file diff --git a/.changelog/182d1e6b4e1b4889bdf06bb2ab5c4b9a.json b/.changelog/182d1e6b4e1b4889bdf06bb2ab5c4b9a.json new file mode 100644 index 00000000000..9745a10402e --- /dev/null +++ b/.changelog/182d1e6b4e1b4889bdf06bb2ab5c4b9a.json @@ -0,0 +1,8 @@ +{ + "id": "182d1e6b-4e1b-4889-bdf0-6bb2ab5c4b9a", + "type": "feature", + "description": "This release adds support for configuring Load balancer Capacity Unit reservations", + "modules": [ + "service/elasticloadbalancingv2" + ] +} \ No newline at end of file diff --git a/.changelog/4629a99148fd40c4a2f62210e3f9c344.json b/.changelog/4629a99148fd40c4a2f62210e3f9c344.json new file mode 100644 index 00000000000..b0b9d1e9412 --- /dev/null +++ b/.changelog/4629a99148fd40c4a2f62210e3f9c344.json @@ -0,0 +1,8 @@ +{ + "id": "4629a991-48fd-40c4-a2f6-2210e3f9c344", + "type": "feature", + "description": "This release adds action type \"Delete\" to the GetRecommendation, ListRecommendations and ListRecommendationSummaries APIs to support new EBS and ECS recommendations with action type \"Delete\".", + "modules": [ + "service/costoptimizationhub" + ] +} \ No newline at end of file diff --git a/.changelog/476209938a8044a4af01c2451fadc358.json b/.changelog/476209938a8044a4af01c2451fadc358.json new file mode 100644 index 00000000000..8b2001f68ea --- /dev/null +++ b/.changelog/476209938a8044a4af01c2451fadc358.json @@ -0,0 +1,8 @@ +{ + "id": "47620993-8a80-44a4-af01-c2451fadc358", + "type": "feature", + "description": "Added support for Rocky Linux 8 on Amazon WorkSpaces Personal.", + "modules": [ + "service/workspaces" + ] +} \ No newline at end of file diff --git a/.changelog/672045d4a7b2427cbbc4107a998ca257.json b/.changelog/672045d4a7b2427cbbc4107a998ca257.json new file mode 100644 index 00000000000..d3177ce24dd --- /dev/null +++ b/.changelog/672045d4a7b2427cbbc4107a998ca257.json @@ -0,0 +1,8 @@ +{ + "id": "672045d4-a7b2-427c-bbc4-107a998ca257", + "type": "feature", + "description": "Add support to import data from commercially available discovery tools without file manipulation.", + "modules": [ + "service/applicationdiscoveryservice" + ] +} \ No newline at end of file diff --git a/.changelog/6c0252cb82dc48f6ab9dd4a569eb2bf0.json b/.changelog/6c0252cb82dc48f6ab9dd4a569eb2bf0.json new file mode 100644 index 00000000000..2d109303e99 --- /dev/null +++ b/.changelog/6c0252cb82dc48f6ab9dd4a569eb2bf0.json @@ -0,0 +1,8 @@ +{ + "id": "6c0252cb-82dc-48f6-ab9d-d4a569eb2bf0", + "type": "feature", + "description": "This release supports Metadata Enforcement Rule feature for Create Subscription Request action.", + "modules": [ + "service/datazone" + ] +} \ No newline at end of file diff --git a/.changelog/6fa756a054984a63834124d156e0806d.json b/.changelog/6fa756a054984a63834124d156e0806d.json new file mode 100644 index 00000000000..b6a124af6d4 --- /dev/null +++ b/.changelog/6fa756a054984a63834124d156e0806d.json @@ -0,0 +1,8 @@ +{ + "id": "6fa756a0-5498-4a63-8341-24d156e0806d", + "type": "feature", + "description": "With this release, customers can prioritize launching instances into ODCRs using targets from ASGs or Launch Templates. Customers can express their baseline instances' CPU-performance in attribute-based Instance Requirements configuration by referencing an instance family that meets their needs.", + "modules": [ + "service/autoscaling" + ] +} \ No newline at end of file diff --git a/.changelog/75fb2c7b169a4ddda80b64102fe037bb.json b/.changelog/75fb2c7b169a4ddda80b64102fe037bb.json new file mode 100644 index 00000000000..e728d2d1824 --- /dev/null +++ b/.changelog/75fb2c7b169a4ddda80b64102fe037bb.json @@ -0,0 +1,8 @@ +{ + "id": "75fb2c7b-169a-4ddd-a80b-64102fe037bb", + "type": "feature", + "description": "Add Node 22.x (node22.x) support to AWS Lambda", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/968d4fc2474c408ab008bb2aff20e8ae.json b/.changelog/968d4fc2474c408ab008bb2aff20e8ae.json new file mode 100644 index 00000000000..a49bef4d3ed --- /dev/null +++ b/.changelog/968d4fc2474c408ab008bb2aff20e8ae.json @@ -0,0 +1,8 @@ +{ + "id": "968d4fc2-474c-408a-b008-bb2aff20e8ae", + "type": "feature", + "description": "Added data protection settings with support for inline data redaction.", + "modules": [ + "service/workspacesweb" + ] +} \ No newline at end of file diff --git a/.changelog/a780bfa98eff47489aef0dea4d7f2c60.json b/.changelog/a780bfa98eff47489aef0dea4d7f2c60.json new file mode 100644 index 00000000000..a576bd7bd28 --- /dev/null +++ b/.changelog/a780bfa98eff47489aef0dea4d7f2c60.json @@ -0,0 +1,8 @@ +{ + "id": "a780bfa9-8eff-4748-9aef-0dea4d7f2c60", + "type": "feature", + "description": "This release adds support for scale storage on the DB instance using a Blue/Green Deployment.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/a9e74039d7a347ac8605e80709df3062.json b/.changelog/a9e74039d7a347ac8605e80709df3062.json new file mode 100644 index 00000000000..e3bb8284d9a --- /dev/null +++ b/.changelog/a9e74039d7a347ac8605e80709df3062.json @@ -0,0 +1,8 @@ +{ + "id": "a9e74039-d7a3-47ac-8605-e80709df3062", + "type": "feature", + "description": "This release enables AWS Compute Optimizer to analyze and generate optimization recommendations for Amazon Aurora database instances. It also enables Compute Optimizer to identify idle Amazon EC2 instances, Amazon EBS volumes, Amazon ECS services running on Fargate, and Amazon RDS databases.", + "modules": [ + "service/computeoptimizer" + ] +} \ No newline at end of file diff --git a/.changelog/b518836ebcea4ff29db6227aec531ee0.json b/.changelog/b518836ebcea4ff29db6227aec531ee0.json new file mode 100644 index 00000000000..f59092b5775 --- /dev/null +++ b/.changelog/b518836ebcea4ff29db6227aec531ee0.json @@ -0,0 +1,8 @@ +{ + "id": "b518836e-bcea-4ff2-9db6-227aec531ee0", + "type": "feature", + "description": "This release adds support for Provisioning Timestream Compute Units (TCUs), a new feature that allows provisioning dedicated compute resources for your queries, providing predictable and cost-effective query performance.", + "modules": [ + "service/timestreamquery" + ] +} \ No newline at end of file diff --git a/.changelog/b74dddbf31f7462eb7c88fd7b293a251.json b/.changelog/b74dddbf31f7462eb7c88fd7b293a251.json new file mode 100644 index 00000000000..3fad27a11fe --- /dev/null +++ b/.changelog/b74dddbf31f7462eb7c88fd7b293a251.json @@ -0,0 +1,8 @@ +{ + "id": "b74dddbf-31f7-462e-b7c8-8fd7b293a251", + "type": "feature", + "description": "Releasing new Prompt Optimization to enhance your prompts for improved performance", + "modules": [ + "service/bedrockagentruntime" + ] +} \ No newline at end of file diff --git a/.changelog/c2b6ac0cb99a4e6d974cce450e18de93.json b/.changelog/c2b6ac0cb99a4e6d974cce450e18de93.json new file mode 100644 index 00000000000..9f340211730 --- /dev/null +++ b/.changelog/c2b6ac0cb99a4e6d974cce450e18de93.json @@ -0,0 +1,8 @@ +{ + "id": "c2b6ac0c-b99a-4e6d-974c-ce450e18de93", + "type": "feature", + "description": "With this release, customers can express their desire to launch instances only in an ODCR or ODCR group rather than OnDemand capacity. Customers can express their baseline instances' CPU-performance in attribute-based Instance Requirements configuration by referencing an instance family.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/c8caa78b95df49ddb2f343eb9c78ba9f.json b/.changelog/c8caa78b95df49ddb2f343eb9c78ba9f.json new file mode 100644 index 00000000000..0551ee7157e --- /dev/null +++ b/.changelog/c8caa78b95df49ddb2f343eb9c78ba9f.json @@ -0,0 +1,8 @@ +{ + "id": "c8caa78b-95df-49dd-b2f3-43eb9c78ba9f", + "type": "feature", + "description": "Adds support for child enabled baselines which allow you to see the enabled baseline status for individual accounts.", + "modules": [ + "service/controltower" + ] +} \ No newline at end of file diff --git a/.changelog/da582757eb044a5da58ee0da95768b31.json b/.changelog/da582757eb044a5da58ee0da95768b31.json new file mode 100644 index 00000000000..ab728d53f36 --- /dev/null +++ b/.changelog/da582757eb044a5da58ee0da95768b31.json @@ -0,0 +1,8 @@ +{ + "id": "da582757-eb04-4a5d-a58e-e0da95768b31", + "type": "feature", + "description": "MediaPackage v2 now supports the Media Quality Confidence Score (MQCS) published from MediaLive. Customers can control input switching based on the MQCS and publishing HTTP Headers for the MQCS via the API.", + "modules": [ + "service/mediapackagev2" + ] +} \ No newline at end of file diff --git a/.changelog/e9a99da9feb84135913d651f6d51ec5b.json b/.changelog/e9a99da9feb84135913d651f6d51ec5b.json new file mode 100644 index 00000000000..b2fd49bb2e9 --- /dev/null +++ b/.changelog/e9a99da9feb84135913d651f6d51ec5b.json @@ -0,0 +1,8 @@ +{ + "id": "e9a99da9-feb8-4135-913d-651f6d51ec5b", + "type": "feature", + "description": "This release adds support for exclusion tags for Recycle Bin, which allows you to identify resources that are to be excluded, or ignored, by a Region-level retention rule.", + "modules": [ + "service/rbin" + ] +} \ No newline at end of file diff --git a/.changelog/f76d67ed8b7543d989121385ddc10323.json b/.changelog/f76d67ed8b7543d989121385ddc10323.json new file mode 100644 index 00000000000..6540b4511be --- /dev/null +++ b/.changelog/f76d67ed8b7543d989121385ddc10323.json @@ -0,0 +1,8 @@ +{ + "id": "f76d67ed-8b75-43d9-8912-1385ddc10323", + "type": "feature", + "description": "This release adds support for the Availability Zone rebalancing feature on Amazon ECS.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/.changelog/fd6c5097d49846ceb8ff1fb98c642ed3.json b/.changelog/fd6c5097d49846ceb8ff1fb98c642ed3.json new file mode 100644 index 00000000000..1f8f907af3a --- /dev/null +++ b/.changelog/fd6c5097d49846ceb8ff1fb98c642ed3.json @@ -0,0 +1,8 @@ +{ + "id": "fd6c5097-d498-46ce-b8ff-1fb98c642ed3", + "type": "feature", + "description": "Enabling call caching feature that allows customers to reuse previously computed results from a set of completed tasks in a new workflow run.", + "modules": [ + "service/omics" + ] +} \ No newline at end of file diff --git a/service/applicationdiscoveryservice/api_op_CreateApplication.go b/service/applicationdiscoveryservice/api_op_CreateApplication.go index 1aae7b3090e..a39c17085ab 100644 --- a/service/applicationdiscoveryservice/api_op_CreateApplication.go +++ b/service/applicationdiscoveryservice/api_op_CreateApplication.go @@ -28,20 +28,23 @@ func (c *Client) CreateApplication(ctx context.Context, params *CreateApplicatio type CreateApplicationInput struct { - // Name of the application to be created. + // The name of the application to be created. // // This member is required. Name *string - // Description of the application to be created. + // The description of the application to be created. Description *string + // The name of the migration wave of the application to be created. + Wave *string + noSmithyDocumentSerde } type CreateApplicationOutput struct { - // Configuration ID of an application to be created. + // The configuration ID of an application to be created. ConfigurationId *string // Metadata pertaining to the operation's result. diff --git a/service/applicationdiscoveryservice/api_op_UpdateApplication.go b/service/applicationdiscoveryservice/api_op_UpdateApplication.go index da6405e3ee8..f52c0c42af6 100644 --- a/service/applicationdiscoveryservice/api_op_UpdateApplication.go +++ b/service/applicationdiscoveryservice/api_op_UpdateApplication.go @@ -39,6 +39,9 @@ type UpdateApplicationInput struct { // New name of the application to be updated. Name *string + // The new migration wave of the application that you want to update. + Wave *string + noSmithyDocumentSerde } diff --git a/service/applicationdiscoveryservice/deserializers.go b/service/applicationdiscoveryservice/deserializers.go index 2c6d7892496..4e572a3da52 100644 --- a/service/applicationdiscoveryservice/deserializers.go +++ b/service/applicationdiscoveryservice/deserializers.go @@ -2611,6 +2611,9 @@ func awsAwsjson11_deserializeOpErrorStartBatchDeleteConfigurationTask(response * case strings.EqualFold("HomeRegionNotSetException", errorCode): return awsAwsjson11_deserializeErrorHomeRegionNotSetException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -5948,6 +5951,15 @@ func awsAwsjson11_deserializeDocumentImportTask(v **types.ImportTask, value inte sv.ErrorsAndFailedEntriesZip = ptr.String(jtv) } + case "fileClassification": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileClassification to be of type string, got %T instead", value) + } + sv.FileClassification = types.FileClassification(jtv) + } + case "importCompletionTime": if value != nil { switch jtv := value.(type) { diff --git a/service/applicationdiscoveryservice/serializers.go b/service/applicationdiscoveryservice/serializers.go index 315b30e8adc..2a99582e2cc 100644 --- a/service/applicationdiscoveryservice/serializers.go +++ b/service/applicationdiscoveryservice/serializers.go @@ -2245,6 +2245,11 @@ func awsAwsjson11_serializeOpDocumentCreateApplicationInput(v *CreateApplication ok.String(*v.Name) } + if v.Wave != nil { + ok := object.Key("wave") + ok.String(*v.Wave) + } + return nil } @@ -2729,5 +2734,10 @@ func awsAwsjson11_serializeOpDocumentUpdateApplicationInput(v *UpdateApplication ok.String(*v.Name) } + if v.Wave != nil { + ok := object.Key("wave") + ok.String(*v.Wave) + } + return nil } diff --git a/service/applicationdiscoveryservice/types/enums.go b/service/applicationdiscoveryservice/types/enums.go index 5ba4bf40789..eeda5c0bb0c 100644 --- a/service/applicationdiscoveryservice/types/enums.go +++ b/service/applicationdiscoveryservice/types/enums.go @@ -223,6 +223,29 @@ func (ExportStatus) Values() []ExportStatus { } } +type FileClassification string + +// Enum values for FileClassification +const ( + FileClassificationModelizeitExport FileClassification = "MODELIZEIT_EXPORT" + FileClassificationRvtoolsExport FileClassification = "RVTOOLS_EXPORT" + FileClassificationVmwareNsxExport FileClassification = "VMWARE_NSX_EXPORT" + FileClassificationImportTemplate FileClassification = "IMPORT_TEMPLATE" +) + +// Values returns all known values for FileClassification. 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 (FileClassification) Values() []FileClassification { + return []FileClassification{ + "MODELIZEIT_EXPORT", + "RVTOOLS_EXPORT", + "VMWARE_NSX_EXPORT", + "IMPORT_TEMPLATE", + } +} + type ImportStatus string // Enum values for ImportStatus @@ -233,6 +256,7 @@ const ( ImportStatusImportFailed ImportStatus = "IMPORT_FAILED" ImportStatusImportFailedServerLimitExceeded ImportStatus = "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED" ImportStatusImportFailedRecordLimitExceeded ImportStatus = "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED" + ImportStatusImportFailedUnsupportedFileType ImportStatus = "IMPORT_FAILED_UNSUPPORTED_FILE_TYPE" ImportStatusDeleteInProgress ImportStatus = "DELETE_IN_PROGRESS" ImportStatusDeleteComplete ImportStatus = "DELETE_COMPLETE" ImportStatusDeleteFailed ImportStatus = "DELETE_FAILED" @@ -252,6 +276,7 @@ func (ImportStatus) Values() []ImportStatus { "IMPORT_FAILED", "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED", "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED", + "IMPORT_FAILED_UNSUPPORTED_FILE_TYPE", "DELETE_IN_PROGRESS", "DELETE_COMPLETE", "DELETE_FAILED", @@ -264,9 +289,10 @@ type ImportTaskFilterName string // Enum values for ImportTaskFilterName const ( - ImportTaskFilterNameImportTaskId ImportTaskFilterName = "IMPORT_TASK_ID" - ImportTaskFilterNameStatus ImportTaskFilterName = "STATUS" - ImportTaskFilterNameName ImportTaskFilterName = "NAME" + ImportTaskFilterNameImportTaskId ImportTaskFilterName = "IMPORT_TASK_ID" + ImportTaskFilterNameStatus ImportTaskFilterName = "STATUS" + ImportTaskFilterNameName ImportTaskFilterName = "NAME" + ImportTaskFilterNameFileClassification ImportTaskFilterName = "FILE_CLASSIFICATION" ) // Values returns all known values for ImportTaskFilterName. Note that this can be @@ -278,6 +304,7 @@ func (ImportTaskFilterName) Values() []ImportTaskFilterName { "IMPORT_TASK_ID", "STATUS", "NAME", + "FILE_CLASSIFICATION", } } diff --git a/service/applicationdiscoveryservice/types/types.go b/service/applicationdiscoveryservice/types/types.go index d2c1e3218eb..71fd8827349 100644 --- a/service/applicationdiscoveryservice/types/types.go +++ b/service/applicationdiscoveryservice/types/types.go @@ -710,6 +710,9 @@ type ImportTask struct { // attempt importing it again. ErrorsAndFailedEntriesZip *string + // The type of file detected by the import task. + FileClassification FileClassification + // The time that the import task request finished, presented in the Unix time // stamp format. ImportCompletionTime *time.Time diff --git a/service/autoscaling/api_op_CreateAutoScalingGroup.go b/service/autoscaling/api_op_CreateAutoScalingGroup.go index 006c49f3521..e1938ba82d0 100644 --- a/service/autoscaling/api_op_CreateAutoScalingGroup.go +++ b/service/autoscaling/api_op_CreateAutoScalingGroup.go @@ -100,6 +100,9 @@ type CreateAutoScalingGroupInput struct { // [Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html CapacityRebalance *bool + // The capacity reservation specification for the Auto Scaling group. + CapacityReservationSpecification *types.CapacityReservationSpecification + // Reserved. Context *string diff --git a/service/autoscaling/api_op_UpdateAutoScalingGroup.go b/service/autoscaling/api_op_UpdateAutoScalingGroup.go index 955e234c90e..caeb4b8bfe3 100644 --- a/service/autoscaling/api_op_UpdateAutoScalingGroup.go +++ b/service/autoscaling/api_op_UpdateAutoScalingGroup.go @@ -93,6 +93,9 @@ type UpdateAutoScalingGroupInput struct { // [Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html CapacityRebalance *bool + // The capacity reservation specification for the Auto Scaling group. + CapacityReservationSpecification *types.CapacityReservationSpecification + // Reserved. Context *string diff --git a/service/autoscaling/deserializers.go b/service/autoscaling/deserializers.go index def2d472dc8..266ddd38ac7 100644 --- a/service/autoscaling/deserializers.go +++ b/service/autoscaling/deserializers.go @@ -8514,6 +8514,12 @@ func awsAwsquery_deserializeDocumentAutoScalingGroup(v **types.AutoScalingGroup, sv.CapacityRebalance = ptr.Bool(xtv) } + case strings.EqualFold("CapacityReservationSpecification", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCapacityReservationSpecification(&sv.CapacityReservationSpecification, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("Context", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -9532,6 +9538,48 @@ func awsAwsquery_deserializeDocumentBaselineEbsBandwidthMbpsRequest(v **types.Ba return nil } +func awsAwsquery_deserializeDocumentBaselinePerformanceFactorsRequest(v **types.BaselinePerformanceFactorsRequest, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.BaselinePerformanceFactorsRequest + if *v == nil { + sv = &types.BaselinePerformanceFactorsRequest{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Cpu", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCpuPerformanceFactorRequest(&sv.Cpu, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentBlockDeviceMapping(v **types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9732,6 +9780,269 @@ func awsAwsquery_deserializeDocumentCapacityForecast(v **types.CapacityForecast, return nil } +func awsAwsquery_deserializeDocumentCapacityReservationIds(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCapacityReservationIdsUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentCapacityReservationResourceGroupArns(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCapacityReservationResourceGroupArnsUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentCapacityReservationSpecification(v **types.CapacityReservationSpecification, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CapacityReservationSpecification + if *v == nil { + sv = &types.CapacityReservationSpecification{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CapacityReservationPreference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CapacityReservationPreference = types.CapacityReservationPreference(xtv) + } + + case strings.EqualFold("CapacityReservationTarget", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCapacityReservationTarget(&sv.CapacityReservationTarget, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCapacityReservationTarget(v **types.CapacityReservationTarget, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CapacityReservationTarget + if *v == nil { + sv = &types.CapacityReservationTarget{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CapacityReservationIds", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCapacityReservationIds(&sv.CapacityReservationIds, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CapacityReservationResourceGroupArns", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCapacityReservationResourceGroupArns(&sv.CapacityReservationResourceGroupArns, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentCheckpointPercentages(v *[]int32, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9980,6 +10291,48 @@ func awsAwsquery_deserializeDocumentCpuManufacturersUnwrapped(v *[]types.CpuManu *v = sv return nil } +func awsAwsquery_deserializeDocumentCpuPerformanceFactorRequest(v **types.CpuPerformanceFactorRequest, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CpuPerformanceFactorRequest + if *v == nil { + sv = &types.CpuPerformanceFactorRequest{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Reference", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPerformanceFactorReferenceSetRequest(&sv.References, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentCustomizedMetricSpecification(v **types.CustomizedMetricSpecification, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11618,6 +11971,12 @@ func awsAwsquery_deserializeDocumentInstanceRequirements(v **types.InstanceRequi return err } + case strings.EqualFold("BaselinePerformanceFactors", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentBaselinePerformanceFactorsRequest(&sv.BaselinePerformanceFactors, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("BurstablePerformance", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -14689,6 +15048,123 @@ func awsAwsquery_deserializeDocumentOverridesUnwrapped(v *[]types.LaunchTemplate *v = sv return nil } +func awsAwsquery_deserializeDocumentPerformanceFactorReferenceRequest(v **types.PerformanceFactorReferenceRequest, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PerformanceFactorReferenceRequest + if *v == nil { + sv = &types.PerformanceFactorReferenceRequest{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("InstanceFamily", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceFamily = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPerformanceFactorReferenceSetRequest(v *[]types.PerformanceFactorReferenceRequest, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PerformanceFactorReferenceRequest + if *v == nil { + sv = make([]types.PerformanceFactorReferenceRequest, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.PerformanceFactorReferenceRequest + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPerformanceFactorReferenceRequest(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPerformanceFactorReferenceSetRequestUnwrapped(v *[]types.PerformanceFactorReferenceRequest, decoder smithyxml.NodeDecoder) error { + var sv []types.PerformanceFactorReferenceRequest + if *v == nil { + sv = make([]types.PerformanceFactorReferenceRequest, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PerformanceFactorReferenceRequest + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPerformanceFactorReferenceRequest(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsAwsquery_deserializeDocumentPredefinedMetricSpecification(v **types.PredefinedMetricSpecification, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/autoscaling/serializers.go b/service/autoscaling/serializers.go index e00c35fbf18..f4e004c9873 100644 --- a/service/autoscaling/serializers.go +++ b/service/autoscaling/serializers.go @@ -4723,6 +4723,20 @@ func awsAwsquery_serializeDocumentBaselineEbsBandwidthMbpsRequest(v *types.Basel return nil } +func awsAwsquery_serializeDocumentBaselinePerformanceFactorsRequest(v *types.BaselinePerformanceFactorsRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.Cpu != nil { + objectKey := object.Key("Cpu") + if err := awsAwsquery_serializeDocumentCpuPerformanceFactorRequest(v.Cpu, objectKey); err != nil { + return err + } + } + + return nil +} + func awsAwsquery_serializeDocumentBlockDeviceMapping(v *types.BlockDeviceMapping, value query.Value) error { object := value.Object() _ = object @@ -4764,6 +4778,66 @@ func awsAwsquery_serializeDocumentBlockDeviceMappings(v []types.BlockDeviceMappi return nil } +func awsAwsquery_serializeDocumentCapacityReservationIds(v []string, value query.Value) error { + array := value.Array("member") + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsquery_serializeDocumentCapacityReservationResourceGroupArns(v []string, value query.Value) error { + array := value.Array("member") + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsquery_serializeDocumentCapacityReservationSpecification(v *types.CapacityReservationSpecification, value query.Value) error { + object := value.Object() + _ = object + + if len(v.CapacityReservationPreference) > 0 { + objectKey := object.Key("CapacityReservationPreference") + objectKey.String(string(v.CapacityReservationPreference)) + } + + if v.CapacityReservationTarget != nil { + objectKey := object.Key("CapacityReservationTarget") + if err := awsAwsquery_serializeDocumentCapacityReservationTarget(v.CapacityReservationTarget, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeDocumentCapacityReservationTarget(v *types.CapacityReservationTarget, value query.Value) error { + object := value.Object() + _ = object + + if v.CapacityReservationIds != nil { + objectKey := object.Key("CapacityReservationIds") + if err := awsAwsquery_serializeDocumentCapacityReservationIds(v.CapacityReservationIds, objectKey); err != nil { + return err + } + } + + if v.CapacityReservationResourceGroupArns != nil { + objectKey := object.Key("CapacityReservationResourceGroupArns") + if err := awsAwsquery_serializeDocumentCapacityReservationResourceGroupArns(v.CapacityReservationResourceGroupArns, objectKey); err != nil { + return err + } + } + + return nil +} + func awsAwsquery_serializeDocumentCheckpointPercentages(v []int32, value query.Value) error { array := value.Array("member") @@ -4794,6 +4868,20 @@ func awsAwsquery_serializeDocumentCpuManufacturers(v []types.CpuManufacturer, va return nil } +func awsAwsquery_serializeDocumentCpuPerformanceFactorRequest(v *types.CpuPerformanceFactorRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.References != nil { + objectKey := object.Key("Reference") + if err := awsAwsquery_serializeDocumentPerformanceFactorReferenceSetRequest(v.References, objectKey); err != nil { + return err + } + } + + return nil +} + func awsAwsquery_serializeDocumentCustomizedMetricSpecification(v *types.CustomizedMetricSpecification, value query.Value) error { object := value.Object() _ = object @@ -5078,6 +5166,13 @@ func awsAwsquery_serializeDocumentInstanceRequirements(v *types.InstanceRequirem } } + if v.BaselinePerformanceFactors != nil { + objectKey := object.Key("BaselinePerformanceFactors") + if err := awsAwsquery_serializeDocumentBaselinePerformanceFactorsRequest(v.BaselinePerformanceFactors, objectKey); err != nil { + return err + } + } + if len(v.BurstablePerformance) > 0 { objectKey := object.Key("BurstablePerformance") objectKey.String(string(v.BurstablePerformance)) @@ -5684,6 +5779,30 @@ func awsAwsquery_serializeDocumentOverrides(v []types.LaunchTemplateOverrides, v return nil } +func awsAwsquery_serializeDocumentPerformanceFactorReferenceRequest(v *types.PerformanceFactorReferenceRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceFamily != nil { + objectKey := object.Key("InstanceFamily") + objectKey.String(*v.InstanceFamily) + } + + return nil +} + +func awsAwsquery_serializeDocumentPerformanceFactorReferenceSetRequest(v []types.PerformanceFactorReferenceRequest, value query.Value) error { + array := value.Array("item") + + for i := range v { + av := array.Value() + if err := awsAwsquery_serializeDocumentPerformanceFactorReferenceRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsquery_serializeDocumentPolicyNames(v []string, value query.Value) error { array := value.Array("member") @@ -6617,6 +6736,13 @@ func awsAwsquery_serializeOpDocumentCreateAutoScalingGroupInput(v *CreateAutoSca objectKey.Boolean(*v.CapacityRebalance) } + if v.CapacityReservationSpecification != nil { + objectKey := object.Key("CapacityReservationSpecification") + if err := awsAwsquery_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil { + return err + } + } + if v.Context != nil { objectKey := object.Key("Context") objectKey.String(*v.Context) @@ -8124,6 +8250,13 @@ func awsAwsquery_serializeOpDocumentUpdateAutoScalingGroupInput(v *UpdateAutoSca objectKey.Boolean(*v.CapacityRebalance) } + if v.CapacityReservationSpecification != nil { + objectKey := object.Key("CapacityReservationSpecification") + if err := awsAwsquery_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil { + return err + } + } + if v.Context != nil { objectKey := object.Key("Context") objectKey.String(*v.Context) diff --git a/service/autoscaling/types/enums.go b/service/autoscaling/types/enums.go index ff2bec6e9d5..99556849a72 100644 --- a/service/autoscaling/types/enums.go +++ b/service/autoscaling/types/enums.go @@ -137,6 +137,30 @@ func (CapacityDistributionStrategy) Values() []CapacityDistributionStrategy { } } +type CapacityReservationPreference string + +// Enum values for CapacityReservationPreference +const ( + CapacityReservationPreferenceCapacityReservationsOnly CapacityReservationPreference = "capacity-reservations-only" + CapacityReservationPreferenceCapacityReservationsFirst CapacityReservationPreference = "capacity-reservations-first" + CapacityReservationPreferenceNone CapacityReservationPreference = "none" + CapacityReservationPreferenceDefault CapacityReservationPreference = "default" +) + +// Values returns all known values for CapacityReservationPreference. 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 (CapacityReservationPreference) Values() []CapacityReservationPreference { + return []CapacityReservationPreference{ + "capacity-reservations-only", + "capacity-reservations-first", + "none", + "default", + } +} + type CpuManufacturer string // Enum values for CpuManufacturer diff --git a/service/autoscaling/types/types.go b/service/autoscaling/types/types.go index 3bc1f40a9d2..0a40210701f 100644 --- a/service/autoscaling/types/types.go +++ b/service/autoscaling/types/types.go @@ -178,6 +178,9 @@ type AutoScalingGroup struct { // Indicates whether Capacity Rebalancing is enabled. CapacityRebalance *bool + // The capacity reservation specification. + CapacityReservationSpecification *CapacityReservationSpecification + // Reserved. Context *string @@ -380,6 +383,25 @@ type BaselineEbsBandwidthMbpsRequest struct { noSmithyDocumentSerde } +// The baseline performance to consider, using an instance family as a baseline +// +// reference. The instance family establishes the lowest acceptable level of +// performance. Auto Scaling uses this baseline to guide instance type selection, +// but there is no guarantee that the selected instance types will always exceed +// the baseline for every application. +// +// Currently, this parameter only supports CPU performance as a baseline +// performance factor. For example, specifying c6i uses the CPU performance of the +// c6i family as the baseline reference. +type BaselinePerformanceFactorsRequest struct { + + // The CPU performance to consider, using an instance family as the baseline + // reference. + Cpu *CpuPerformanceFactorRequest + + noSmithyDocumentSerde +} + // Describes a block device mapping. type BlockDeviceMapping struct { @@ -431,6 +453,66 @@ type CapacityForecast struct { noSmithyDocumentSerde } +// Describes the Capacity Reservation preference and targeting options. If you +// +// specify open or none for CapacityReservationPreference , do not specify a +// CapacityReservationTarget . +type CapacityReservationSpecification struct { + + // The capacity reservation preference. The following options are available: + // + // - capacity-reservations-only - Auto Scaling will only launch instances into a + // Capacity Reservation or Capacity Reservation resource group. If capacity isn't + // available, instances will fail to launch. + // + // - capacity-reservations-first - Auto Scaling will try to launch instances into + // a Capacity Reservation or Capacity Reservation resource group first. If capacity + // isn't available, instances will run in On-Demand capacity. + // + // - none - Auto Scaling will not launch instances into a Capacity Reservation. + // Instances will run in On-Demand capacity. + // + // - default - Auto Scaling uses the Capacity Reservation preference from your + // launch template or an open Capacity Reservation. + CapacityReservationPreference CapacityReservationPreference + + // Describes a target Capacity Reservation or Capacity Reservation resource + // group. + CapacityReservationTarget *CapacityReservationTarget + + noSmithyDocumentSerde +} + +// The target for the Capacity Reservation. Specify Capacity Reservations IDs or +// +// Capacity Reservation resource group ARNs. +type CapacityReservationTarget struct { + + // The Capacity Reservation IDs to launch instances into. + CapacityReservationIds []string + + // The resource group ARNs of the Capacity Reservation to launch instances into. + CapacityReservationResourceGroupArns []string + + noSmithyDocumentSerde +} + +// The CPU performance to consider, using an instance family as the baseline +// +// reference. +type CpuPerformanceFactorRequest struct { + + // Specify an instance family to use as the baseline reference for CPU + // performance. All instance types that match your specified attributes will be + // compared against the CPU performance of the referenced instance family, + // regardless of CPU manufacturer or architecture differences. + // + // Currently only one instance family can be specified in the list. + References []PerformanceFactorReferenceRequest + + noSmithyDocumentSerde +} + // Represents a CloudWatch metric of your choosing for a target tracking scaling // policy to use with Amazon EC2 Auto Scaling. // @@ -1117,6 +1199,9 @@ type InstanceRequirements struct { // [Amazon EBS–optimized instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html BaselineEbsBandwidthMbps *BaselineEbsBandwidthMbpsRequest + // The baseline performance factors for the instance requirements. + BaselinePerformanceFactors *BaselinePerformanceFactorsRequest + // Indicates whether burstable performance instance types are included, excluded, // or required. For more information, see [Burstable performance instances]in the Amazon EC2 User Guide for Linux // Instances. @@ -2168,6 +2253,55 @@ type NotificationConfiguration struct { noSmithyDocumentSerde } +// Specify an instance family to use as the baseline reference for CPU +// +// performance. All instance types that All instance types that match your +// specified attributes will be compared against the CPU performance of the +// referenced instance family, regardless of CPU manufacturer or architecture +// differences. +// +// Currently only one instance family can be specified in the list. +type PerformanceFactorReferenceRequest struct { + + // The instance family to use as a baseline reference. + // + // Make sure that you specify the correct value for the instance family. The + // instance family is everything before the period (.) in the instance type name. + // For example, in the instance c6i.large , the instance family is c6i , not c6 . + // For more information, see [Amazon EC2 instance type naming conventions]in Amazon EC2 Instance Types. + // + // The following instance types are not supported for performance protection. + // + // - c1 + // + // - g3| g3s + // + // - hpc7g + // + // - m1| m2 + // + // - mac1 | mac2 | mac2-m1ultra | mac2-m2 | mac2-m2pro + // + // - p3dn | p4d | p5 + // + // - t1 + // + // - u-12tb1 | u-18tb1 | u-24tb1 | u-3tb1 | u-6tb1 | u-9tb1 | u7i-12tb | + // u7in-16tb | u7in-24tb | u7in-32tb + // + // If you performance protection by specifying a supported instance family, the + // returned instance types will exclude the preceding unsupported instance + // families. + // + // If you specify an unsupported instance family as a value for baseline + // performance, the API returns an empty response. + // + // [Amazon EC2 instance type naming conventions]: https://docs.aws.amazon.com/ec2/latest/instancetypes/instance-type-names.html + InstanceFamily *string + + noSmithyDocumentSerde +} + // Represents a predefined metric for a target tracking scaling policy to use with // Amazon EC2 Auto Scaling. type PredefinedMetricSpecification struct { diff --git a/service/bedrockagentruntime/api_op_InvokeFlow.go b/service/bedrockagentruntime/api_op_InvokeFlow.go index 10fe202164a..8ab09cc3b3c 100644 --- a/service/bedrockagentruntime/api_op_InvokeFlow.go +++ b/service/bedrockagentruntime/api_op_InvokeFlow.go @@ -14,12 +14,13 @@ import ( // Invokes an alias of a flow to run the inputs that you specify and return the // output of each node as a stream. If there's an error, the error is returned. For -// more information, see [Test a flow in Amazon Bedrock]in the Amazon Bedrock User Guide. +// more information, see [Test a flow in Amazon Bedrock]in the [Amazon Bedrock User Guide]. // // The CLI doesn't support streaming operations in Amazon Bedrock, including // InvokeFlow . // // [Test a flow in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-test.html +// [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html func (c *Client) InvokeFlow(ctx context.Context, params *InvokeFlowInput, optFns ...func(*Options)) (*InvokeFlowOutput, error) { if params == nil { params = &InvokeFlowInput{} diff --git a/service/bedrockagentruntime/api_op_OptimizePrompt.go b/service/bedrockagentruntime/api_op_OptimizePrompt.go new file mode 100644 index 00000000000..918e364306a --- /dev/null +++ b/service/bedrockagentruntime/api_op_OptimizePrompt.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrockagentruntime + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + "sync" +) + +// Optimizes a prompt for the task that you specify. For more information, see [Optimize a prompt] in +// the [Amazon Bedrock User Guide]. +// +// [Optimize a prompt]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-optimize.html +// [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html +func (c *Client) OptimizePrompt(ctx context.Context, params *OptimizePromptInput, optFns ...func(*Options)) (*OptimizePromptOutput, error) { + if params == nil { + params = &OptimizePromptInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "OptimizePrompt", params, optFns, c.addOperationOptimizePromptMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*OptimizePromptOutput) + out.ResultMetadata = metadata + return out, nil +} + +type OptimizePromptInput struct { + + // Contains the prompt to optimize. + // + // This member is required. + Input types.InputPrompt + + // The unique identifier of the model that you want to optimize the prompt for. + // + // This member is required. + TargetModelId *string + + noSmithyDocumentSerde +} + +type OptimizePromptOutput struct { + eventStream *OptimizePromptEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *OptimizePromptOutput) GetStream() *OptimizePromptEventStream { + return o.eventStream +} + +func (c *Client) addOperationOptimizePromptMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpOptimizePrompt{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpOptimizePrompt{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "OptimizePrompt"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addEventStreamOptimizePromptMiddleware(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 = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); 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 = addOpOptimizePromptValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOptimizePrompt(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opOptimizePrompt(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "OptimizePrompt", + } +} + +// OptimizePromptEventStream provides the event stream handling for the OptimizePrompt operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewOptimizePromptEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type OptimizePromptEventStream struct { + // OptimizedPromptStreamReader is the EventStream reader for the + // OptimizedPromptStream events. This value is automatically set by the SDK when + // the API call is made Use this member when unit testing your code with the SDK to + // mock out the EventStream Reader. + // + // Must not be nil. + Reader OptimizedPromptStreamReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewOptimizePromptEventStream initializes an OptimizePromptEventStream. +// This function should only be used for testing and mocking the OptimizePromptEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +func NewOptimizePromptEventStream(optFns ...func(*OptimizePromptEventStream)) *OptimizePromptEventStream { + es := &OptimizePromptEventStream{ + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + } + for _, fn := range optFns { + fn(es) + } + return es +} + +// Events returns a channel to read events from. +func (es *OptimizePromptEventStream) Events() <-chan types.OptimizedPromptStream { + return es.Reader.Events() +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// Will close the underlying EventStream writer and reader, and no more events can be +// sent or received. +func (es *OptimizePromptEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *OptimizePromptEventStream) safeClose() { + close(es.done) + + es.Reader.Close() +} + +// Err returns any error that occurred while reading or writing EventStream Events +// from the service API's response. Returns nil if there were no errors. +func (es *OptimizePromptEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *OptimizePromptEventStream) waitStreamClose() { + type errorSet interface { + ErrorSet() <-chan struct{} + } + + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(errorSet); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + + } +} diff --git a/service/bedrockagentruntime/deserializers.go b/service/bedrockagentruntime/deserializers.go index 416c15ca754..448f4b1fc67 100644 --- a/service/bedrockagentruntime/deserializers.go +++ b/service/bedrockagentruntime/deserializers.go @@ -584,6 +584,109 @@ func awsRestjson1_deserializeOpErrorInvokeFlow(response *smithyhttp.Response, me } } +type awsRestjson1_deserializeOpOptimizePrompt struct { +} + +func (*awsRestjson1_deserializeOpOptimizePrompt) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpOptimizePrompt) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorOptimizePrompt(response, &metadata) + } + output := &OptimizePromptOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorOptimizePrompt(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("DependencyFailedException", errorCode): + return awsRestjson1_deserializeErrorDependencyFailedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpRetrieve struct { } @@ -6046,6 +6149,332 @@ func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationExc return nil } +func awsRestjson1_deserializeEventStreamOptimizedPromptStream(v *types.OptimizedPromptStream, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } + + switch { + case strings.EqualFold("analyzePromptEvent", eventType.String()): + vv := &types.OptimizedPromptStreamMemberAnalyzePromptEvent{} + if err := awsRestjson1_deserializeEventMessageAnalyzePromptEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("optimizedPromptEvent", eventType.String()): + vv := &types.OptimizedPromptStreamMemberOptimizedPromptEvent{} + if err := awsRestjson1_deserializeEventMessageOptimizedPromptEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + default: + buffer := bytes.NewBuffer(nil) + eventstream.NewEncoder().Encode(buffer, *msg) + *v = &types.UnknownUnionMember{ + Tag: eventType.String(), + Value: buffer.Bytes(), + } + return nil + + } +} + +func awsRestjson1_deserializeEventStreamExceptionOptimizedPromptStream(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) + } + + switch { + case strings.EqualFold("accessDeniedException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionAccessDeniedException(msg) + + case strings.EqualFold("badGatewayException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionBadGatewayException(msg) + + case strings.EqualFold("dependencyFailedException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionDependencyFailedException(msg) + + case strings.EqualFold("internalServerException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionInternalServerException(msg) + + case strings.EqualFold("throttlingException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionThrottlingException(msg) + + case strings.EqualFold("validationException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionValidationException(msg) + + default: + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + return err + } + errorCode := "UnknownError" + errorMessage := errorCode + if ev := exceptionType.String(); len(ev) > 0 { + errorCode = ev + } else if ev := code; len(ev) > 0 { + errorCode = ev + } + if ev := message; len(ev) > 0 { + errorMessage = ev + } + return &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + } +} + +func awsRestjson1_deserializeEventMessageOptimizedPromptEvent(v *types.OptimizedPromptEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + if err := awsRestjson1_deserializeDocumentOptimizedPromptEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return nil +} + +func awsRestjson1_deserializeEventMessageAnalyzePromptEvent(v *types.AnalyzePromptEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + if err := awsRestjson1_deserializeDocumentAnalyzePromptEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return nil +} + +func awsRestjson1_deserializeDocumentAnalyzePromptEvent(v **types.AnalyzePromptEvent, 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.AnalyzePromptEvent + if *v == nil { + sv = &types.AnalyzePromptEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOptimizedPrompt(v *types.OptimizedPrompt, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.OptimizedPrompt +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "textPrompt": + var mv types.TextPrompt + destAddr := &mv + if err := awsRestjson1_deserializeDocumentTextPrompt(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.OptimizedPromptMemberTextPrompt{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentOptimizedPromptEvent(v **types.OptimizedPromptEvent, 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.OptimizedPromptEvent + if *v == nil { + sv = &types.OptimizedPromptEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "optimizedPrompt": + if err := awsRestjson1_deserializeDocumentOptimizedPrompt(&sv.OptimizedPrompt, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTextPrompt(v **types.TextPrompt, 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.TextPrompt + if *v == nil { + sv = &types.TextPrompt{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "text": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Text = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeEventStreamFlowResponseStream(v *types.FlowResponseStream, msg *eventstream.Message) error { if v == nil { return fmt.Errorf("unexpected serialization of nil %T", v) diff --git a/service/bedrockagentruntime/eventstream.go b/service/bedrockagentruntime/eventstream.go index 8da2718f9af..0d58526ef82 100644 --- a/service/bedrockagentruntime/eventstream.go +++ b/service/bedrockagentruntime/eventstream.go @@ -28,6 +28,16 @@ type FlowResponseStreamReader interface { Err() error } +// OptimizedPromptStreamReader provides the interface for reading events from a +// stream. +// +// The writer's Close method must allow multiple concurrent calls. +type OptimizedPromptStreamReader interface { + Events() <-chan types.OptimizedPromptStream + Close() error + Err() error +} + // ResponseStreamReader provides the interface for reading events from a stream. // // The writer's Close method must allow multiple concurrent calls. @@ -165,6 +175,134 @@ func (r *responseStreamReader) Closed() <-chan struct{} { return r.done } +type optimizedPromptStreamReader struct { + stream chan types.OptimizedPromptStream + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once +} + +func newOptimizedPromptStreamReader(readCloser io.ReadCloser, decoder *eventstream.Decoder) *optimizedPromptStreamReader { + w := &optimizedPromptStreamReader{ + stream: make(chan types.OptimizedPromptStream), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + } + + go w.readEventStream() + + return w +} + +func (r *optimizedPromptStreamReader) Events() <-chan types.OptimizedPromptStream { + return r.stream +} + +func (r *optimizedPromptStreamReader) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + r.payloadBuf = r.payloadBuf[0:0] + decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf) + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + return + default: + r.err.SetError(err) + return + } + } + + event, err := r.deserializeEventMessage(&decodedMessage) + if err != nil { + r.err.SetError(err) + return + } + + select { + case r.stream <- event: + case <-r.done: + return + } + + } +} + +func (r *optimizedPromptStreamReader) deserializeEventMessage(msg *eventstream.Message) (types.OptimizedPromptStream, error) { + messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader) + if messageType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader) + } + + switch messageType.String() { + case eventstreamapi.EventMessageType: + var v types.OptimizedPromptStream + if err := awsRestjson1_deserializeEventStreamOptimizedPromptStream(&v, msg); err != nil { + return nil, err + } + return v, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsRestjson1_deserializeEventStreamExceptionOptimizedPromptStream(msg) + + case eventstreamapi.ErrorMessageType: + errorCode := "UnknownError" + errorMessage := errorCode + if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil { + errorCode = header.String() + } + if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil { + errorMessage = header.String() + } + return nil, &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + default: + mc := msg.Clone() + return nil, &UnknownEventMessageError{ + Type: messageType.String(), + Message: &mc, + } + + } +} + +func (r *optimizedPromptStreamReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *optimizedPromptStreamReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *optimizedPromptStreamReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *optimizedPromptStreamReader) Err() error { + return r.err.Err() +} + +func (r *optimizedPromptStreamReader) Closed() <-chan struct{} { + return r.done +} + type flowResponseStreamReader struct { stream chan types.FlowResponseStream decoder *eventstream.Decoder @@ -469,6 +607,94 @@ func addEventStreamInvokeFlowMiddleware(stack *middleware.Stack, options Options } +type awsRestjson1_deserializeOpEventStreamOptimizePrompt struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsRestjson1_deserializeOpEventStreamOptimizePrompt) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsRestjson1_deserializeOpEventStreamOptimizePrompt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + defer func() { + if err == nil { + return + } + m.closeResponseBody(out) + }() + + logger := middleware.GetLogger(ctx) + + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request) + } + _ = request + + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) + } + _ = deserializeOutput + + output, ok := out.Result.(*OptimizePromptOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &OptimizePromptOutput{} + out.Result = output + } + + eventReader := newOptimizedPromptStreamReader( + deserializeOutput.Body, + eventstream.NewDecoder(func(options *eventstream.DecoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamReads + + }), + ) + defer func() { + if err == nil { + return + } + _ = eventReader.Close() + }() + + output.eventStream = NewOptimizePromptEventStream(func(stream *OptimizePromptEventStream) { + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsRestjson1_deserializeOpEventStreamOptimizePrompt) closeResponseBody(out middleware.DeserializeOutput) { + if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil { + _, _ = io.Copy(ioutil.Discard, resp.Body) + _ = resp.Body.Close() + } +} + +func addEventStreamOptimizePromptMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsRestjson1_deserializeOpEventStreamOptimizePrompt{ + LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(), + LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(), + }, "OperationDeserializer", middleware.Before); err != nil { + return err + } + return nil + +} + // UnknownEventMessageError provides an error when a message is received from the stream, // but the reader is unable to determine what kind of message it is. type UnknownEventMessageError struct { @@ -491,6 +717,10 @@ func setSafeEventStreamClientLogMode(o *Options, operation string) { toggleEventStreamClientLogMode(o, false, true) return + case "OptimizePrompt": + toggleEventStreamClientLogMode(o, false, true) + return + default: return diff --git a/service/bedrockagentruntime/generated.json b/service/bedrockagentruntime/generated.json index 25281b57a5b..d171a946f92 100644 --- a/service/bedrockagentruntime/generated.json +++ b/service/bedrockagentruntime/generated.json @@ -13,6 +13,7 @@ "api_op_GetAgentMemory.go", "api_op_InvokeAgent.go", "api_op_InvokeFlow.go", + "api_op_OptimizePrompt.go", "api_op_Retrieve.go", "api_op_RetrieveAndGenerate.go", "auth.go", diff --git a/service/bedrockagentruntime/serializers.go b/service/bedrockagentruntime/serializers.go index 8908f1e3b16..64ae87184ab 100644 --- a/service/bedrockagentruntime/serializers.go +++ b/service/bedrockagentruntime/serializers.go @@ -442,6 +442,94 @@ func awsRestjson1_serializeOpDocumentInvokeFlowInput(v *InvokeFlowInput, value s return nil } +type awsRestjson1_serializeOpOptimizePrompt struct { +} + +func (*awsRestjson1_serializeOpOptimizePrompt) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpOptimizePrompt) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*OptimizePromptInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/optimize-prompt") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentOptimizePromptInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsOptimizePromptInput(v *OptimizePromptInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentOptimizePromptInput(v *OptimizePromptInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Input != nil { + ok := object.Key("input") + if err := awsRestjson1_serializeDocumentInputPrompt(v.Input, ok); err != nil { + return err + } + } + + if v.TargetModelId != nil { + ok := object.Key("targetModelId") + ok.String(*v.TargetModelId) + } + + return nil +} + type awsRestjson1_serializeOpRetrieve struct { } @@ -1130,6 +1218,24 @@ func awsRestjson1_serializeDocumentInputFiles(v []types.InputFile, value smithyj return nil } +func awsRestjson1_serializeDocumentInputPrompt(v types.InputPrompt, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.InputPromptMemberTextPrompt: + av := object.Key("textPrompt") + if err := awsRestjson1_serializeDocumentTextPrompt(&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 awsRestjson1_serializeDocumentInvocationResultMember(v types.InvocationResultMember, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1678,6 +1784,18 @@ func awsRestjson1_serializeDocumentTextInferenceConfig(v *types.TextInferenceCon return nil } +func awsRestjson1_serializeDocumentTextPrompt(v *types.TextPrompt, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Text != nil { + ok := object.Key("text") + ok.String(*v.Text) + } + + return nil +} + func awsRestjson1_serializeDocumentDocument(v document.Interface, value smithyjson.Value) error { if v == nil { return nil diff --git a/service/bedrockagentruntime/snapshot/api_op_OptimizePrompt.go.snap b/service/bedrockagentruntime/snapshot/api_op_OptimizePrompt.go.snap new file mode 100644 index 00000000000..77a988ad17f --- /dev/null +++ b/service/bedrockagentruntime/snapshot/api_op_OptimizePrompt.go.snap @@ -0,0 +1,40 @@ +OptimizePrompt + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + OperationEventStreamDeserializer + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrockagentruntime/snapshot_test.go b/service/bedrockagentruntime/snapshot_test.go index 5b6e9bbdd9d..cab96f87ed5 100644 --- a/service/bedrockagentruntime/snapshot_test.go +++ b/service/bedrockagentruntime/snapshot_test.go @@ -110,6 +110,18 @@ func TestCheckSnapshot_InvokeFlow(t *testing.T) { } } +func TestCheckSnapshot_OptimizePrompt(t *testing.T) { + svc := New(Options{}) + _, err := svc.OptimizePrompt(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "OptimizePrompt") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_Retrieve(t *testing.T) { svc := New(Options{}) _, err := svc.Retrieve(context.Background(), nil, func(o *Options) { @@ -181,6 +193,18 @@ func TestUpdateSnapshot_InvokeFlow(t *testing.T) { } } +func TestUpdateSnapshot_OptimizePrompt(t *testing.T) { + svc := New(Options{}) + _, err := svc.OptimizePrompt(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "OptimizePrompt") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_Retrieve(t *testing.T) { svc := New(Options{}) _, err := svc.Retrieve(context.Background(), nil, func(o *Options) { diff --git a/service/bedrockagentruntime/types/types.go b/service/bedrockagentruntime/types/types.go index 2f4aeb58335..ad423dc3959 100644 --- a/service/bedrockagentruntime/types/types.go +++ b/service/bedrockagentruntime/types/types.go @@ -9,10 +9,10 @@ import ( ) // Contains information about the action group being invoked. For more information -// about the possible structures, see the InvocationInput tab in [OrchestrationTrace]in the Amazon -// Bedrock User Guide. +// about the possible structures, see the InvocationInput tab in [OrchestrationTrace]in the [Amazon Bedrock User Guide]. // // [OrchestrationTrace]: https://docs.aws.amazon.com/bedrock/latest/userguide/trace-orchestration.html +// [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html type ActionGroupInvocationInput struct { // The name of the action group. @@ -55,6 +55,15 @@ type ActionGroupInvocationOutput struct { noSmithyDocumentSerde } +// An event in which the prompt was analyzed in preparation for optimization. +type AnalyzePromptEvent struct { + + // A message describing the analysis of the prompt. + Message *string + + noSmithyDocumentSerde +} + // Contains information about the API operation that the agent predicts should be // called. // @@ -1165,6 +1174,24 @@ type InputFile struct { noSmithyDocumentSerde } +// Contains information about the prompt to optimize. +// +// The following types satisfy this interface: +// +// InputPromptMemberTextPrompt +type InputPrompt interface { + isInputPrompt() +} + +// Contains information about the text prompt to optimize. +type InputPromptMemberTextPrompt struct { + Value TextPrompt + + noSmithyDocumentSerde +} + +func (*InputPromptMemberTextPrompt) isInputPrompt() {} + // Contains information pertaining to the action group or knowledge base that is // being invoked. type InvocationInput struct { @@ -1592,6 +1619,61 @@ type Observation struct { noSmithyDocumentSerde } +// Contains information about the optimized prompt. +// +// The following types satisfy this interface: +// +// OptimizedPromptMemberTextPrompt +type OptimizedPrompt interface { + isOptimizedPrompt() +} + +// Contains information about the text in the prompt that was optimized. +type OptimizedPromptMemberTextPrompt struct { + Value TextPrompt + + noSmithyDocumentSerde +} + +func (*OptimizedPromptMemberTextPrompt) isOptimizedPrompt() {} + +// An event in which the prompt was optimized. +type OptimizedPromptEvent struct { + + // Contains information about the optimized prompt. + OptimizedPrompt OptimizedPrompt + + noSmithyDocumentSerde +} + +// The stream containing events in the prompt optimization process. +// +// The following types satisfy this interface: +// +// OptimizedPromptStreamMemberAnalyzePromptEvent +// OptimizedPromptStreamMemberOptimizedPromptEvent +type OptimizedPromptStream interface { + isOptimizedPromptStream() +} + +// An event in which the prompt was analyzed in preparation for optimization. +type OptimizedPromptStreamMemberAnalyzePromptEvent struct { + Value AnalyzePromptEvent + + noSmithyDocumentSerde +} + +func (*OptimizedPromptStreamMemberAnalyzePromptEvent) isOptimizedPromptStream() {} + +// An event in which the prompt was optimized. +type OptimizedPromptStreamMemberOptimizedPromptEvent struct { + Value OptimizedPromptEvent + + noSmithyDocumentSerde +} + +func (*OptimizedPromptStreamMemberOptimizedPromptEvent) isOptimizedPromptStream() {} + // Settings for how the model processes the prompt prior to retrieval and // generation. type OrchestrationConfiguration struct { @@ -2676,6 +2758,17 @@ type TextInferenceConfig struct { noSmithyDocumentSerde } +// Contains information about the text prompt to optimize. +type TextPrompt struct { + + // The text in the text prompt to optimize. + // + // This member is required. + Text *string + + noSmithyDocumentSerde +} + // Contains the part of the generated text that contains a citation, alongside // where it begins and ends. // @@ -2827,9 +2920,12 @@ func (*UnknownUnionMember) isFlowResponseStream() {} func (*UnknownUnionMember) isFlowTrace() {} func (*UnknownUnionMember) isFlowTraceNodeInputContent() {} func (*UnknownUnionMember) isFlowTraceNodeOutputContent() {} +func (*UnknownUnionMember) isInputPrompt() {} func (*UnknownUnionMember) isInvocationInputMember() {} func (*UnknownUnionMember) isInvocationResultMember() {} func (*UnknownUnionMember) isMemory() {} +func (*UnknownUnionMember) isOptimizedPrompt() {} +func (*UnknownUnionMember) isOptimizedPromptStream() {} func (*UnknownUnionMember) isOrchestrationTrace() {} func (*UnknownUnionMember) isPostProcessingTrace() {} func (*UnknownUnionMember) isPreProcessingTrace() {} diff --git a/service/bedrockagentruntime/types/types_exported_test.go b/service/bedrockagentruntime/types/types_exported_test.go index 4d48a65ce1b..5405569e4d4 100644 --- a/service/bedrockagentruntime/types/types_exported_test.go +++ b/service/bedrockagentruntime/types/types_exported_test.go @@ -132,6 +132,24 @@ func ExampleFlowTraceNodeOutputContent_outputUsage() { var _ document.Interface +func ExampleInputPrompt_outputUsage() { + var union types.InputPrompt + // type switches can be used to check the union value + switch v := union.(type) { + case *types.InputPromptMemberTextPrompt: + _ = v.Value // Value is types.TextPrompt + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.TextPrompt + func ExampleInvocationInputMember_outputUsage() { var union types.InvocationInputMember // type switches can be used to check the union value @@ -194,6 +212,46 @@ func ExampleMemory_outputUsage() { var _ *types.MemorySessionSummary +func ExampleOptimizedPrompt_outputUsage() { + var union types.OptimizedPrompt + // type switches can be used to check the union value + switch v := union.(type) { + case *types.OptimizedPromptMemberTextPrompt: + _ = v.Value // Value is types.TextPrompt + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.TextPrompt + +func ExampleOptimizedPromptStream_outputUsage() { + var union types.OptimizedPromptStream + // type switches can be used to check the union value + switch v := union.(type) { + case *types.OptimizedPromptStreamMemberAnalyzePromptEvent: + _ = v.Value // Value is types.AnalyzePromptEvent + + case *types.OptimizedPromptStreamMemberOptimizedPromptEvent: + _ = v.Value // Value is types.OptimizedPromptEvent + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.OptimizedPromptEvent +var _ *types.AnalyzePromptEvent + func ExampleOrchestrationTrace_outputUsage() { var union types.OrchestrationTrace // type switches can be used to check the union value diff --git a/service/bedrockagentruntime/validators.go b/service/bedrockagentruntime/validators.go index f22a09135b3..c2d249022a5 100644 --- a/service/bedrockagentruntime/validators.go +++ b/service/bedrockagentruntime/validators.go @@ -90,6 +90,26 @@ func (m *validateOpInvokeFlow) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpOptimizePrompt struct { +} + +func (*validateOpOptimizePrompt) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpOptimizePrompt) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*OptimizePromptInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpOptimizePromptInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRetrieveAndGenerate struct { } @@ -146,6 +166,10 @@ func addOpInvokeFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpInvokeFlow{}, middleware.After) } +func addOpOptimizePromptValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpOptimizePrompt{}, middleware.After) +} + func addOpRetrieveAndGenerateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRetrieveAndGenerate{}, middleware.After) } @@ -467,6 +491,25 @@ func validateInputFiles(v []types.InputFile) error { } } +func validateInputPrompt(v types.InputPrompt) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InputPrompt"} + switch uv := v.(type) { + case *types.InputPromptMemberTextPrompt: + if err := validateTextPrompt(&uv.Value); err != nil { + invalidParams.AddNested("[textPrompt]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInvocationResultMember(v types.InvocationResultMember) error { if v == nil { return nil @@ -871,6 +914,21 @@ func validateSessionState(v *types.SessionState) error { } } +func validateTextPrompt(v *types.TextPrompt) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TextPrompt"} + if v.Text == nil { + invalidParams.Add(smithy.NewErrParamRequired("Text")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteAgentMemoryInput(v *DeleteAgentMemoryInput) error { if v == nil { return nil @@ -964,6 +1022,28 @@ func validateOpInvokeFlowInput(v *InvokeFlowInput) error { } } +func validateOpOptimizePromptInput(v *OptimizePromptInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OptimizePromptInput"} + if v.Input == nil { + invalidParams.Add(smithy.NewErrParamRequired("Input")) + } else if v.Input != nil { + if err := validateInputPrompt(v.Input); err != nil { + invalidParams.AddNested("Input", err.(smithy.InvalidParamsError)) + } + } + if v.TargetModelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetModelId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRetrieveAndGenerateInput(v *RetrieveAndGenerateInput) error { if v == nil { return nil diff --git a/service/cloudfront/api_op_CreateAnycastIpList.go b/service/cloudfront/api_op_CreateAnycastIpList.go new file mode 100644 index 00000000000..6ed7760f34b --- /dev/null +++ b/service/cloudfront/api_op_CreateAnycastIpList.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Anycast static IP list. +func (c *Client) CreateAnycastIpList(ctx context.Context, params *CreateAnycastIpListInput, optFns ...func(*Options)) (*CreateAnycastIpListOutput, error) { + if params == nil { + params = &CreateAnycastIpListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAnycastIpList", params, optFns, c.addOperationCreateAnycastIpListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAnycastIpListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAnycastIpListInput struct { + + // The number of static IP addresses that are allocated to the Anycast static IP + // list. + // + // This member is required. + IpCount *int32 + + // Name of the Anycast static IP list. + // + // This member is required. + Name *string + + // A complex type that contains zero or more Tag elements. + Tags *types.Tags + + noSmithyDocumentSerde +} + +type CreateAnycastIpListOutput struct { + + // A response structure that includes the version identifier (ETag) and the + // created AnycastIpListstructure. + AnycastIpList *types.AnycastIpList + + // The version identifier for the current version of the Anycast static IP list. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAnycastIpListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateAnycastIpList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateAnycastIpList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAnycastIpList"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCreateAnycastIpListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAnycastIpList(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateAnycastIpList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAnycastIpList", + } +} diff --git a/service/cloudfront/api_op_CreateVpcOrigin.go b/service/cloudfront/api_op_CreateVpcOrigin.go new file mode 100644 index 00000000000..73743c5ccc5 --- /dev/null +++ b/service/cloudfront/api_op_CreateVpcOrigin.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create an Amazon CloudFront VPC origin. +func (c *Client) CreateVpcOrigin(ctx context.Context, params *CreateVpcOriginInput, optFns ...func(*Options)) (*CreateVpcOriginOutput, error) { + if params == nil { + params = &CreateVpcOriginInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateVpcOrigin", params, optFns, c.addOperationCreateVpcOriginMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateVpcOriginOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateVpcOriginInput struct { + + // The VPC origin endpoint configuration. + // + // This member is required. + VpcOriginEndpointConfig *types.VpcOriginEndpointConfig + + // A complex type that contains zero or more Tag elements. + Tags *types.Tags + + noSmithyDocumentSerde +} + +type CreateVpcOriginOutput struct { + + // The VPC origin ETag. + ETag *string + + // The VPC origin location. + Location *string + + // The VPC origin. + VpcOrigin *types.VpcOrigin + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateVpcOriginMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateVpcOrigin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateVpcOrigin{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpcOrigin"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCreateVpcOriginValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcOrigin(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateVpcOrigin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateVpcOrigin", + } +} diff --git a/service/cloudfront/api_op_DeleteAnycastIpList.go b/service/cloudfront/api_op_DeleteAnycastIpList.go new file mode 100644 index 00000000000..d4ab735236c --- /dev/null +++ b/service/cloudfront/api_op_DeleteAnycastIpList.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 Anycast static IP list. +func (c *Client) DeleteAnycastIpList(ctx context.Context, params *DeleteAnycastIpListInput, optFns ...func(*Options)) (*DeleteAnycastIpListOutput, error) { + if params == nil { + params = &DeleteAnycastIpListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAnycastIpList", params, optFns, c.addOperationDeleteAnycastIpListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAnycastIpListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAnycastIpListInput struct { + + // The ID of the Anycast static IP list. + // + // This member is required. + Id *string + + // The current version ( ETag value) of the Anycast static IP list that you are + // deleting. + // + // This member is required. + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteAnycastIpListOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAnycastIpListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteAnycastIpList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteAnycastIpList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAnycastIpList"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteAnycastIpListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAnycastIpList(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAnycastIpList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAnycastIpList", + } +} diff --git a/service/cloudfront/api_op_DeleteVpcOrigin.go b/service/cloudfront/api_op_DeleteVpcOrigin.go new file mode 100644 index 00000000000..917f2b48fc7 --- /dev/null +++ b/service/cloudfront/api_op_DeleteVpcOrigin.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete an Amazon CloudFront VPC origin. +func (c *Client) DeleteVpcOrigin(ctx context.Context, params *DeleteVpcOriginInput, optFns ...func(*Options)) (*DeleteVpcOriginOutput, error) { + if params == nil { + params = &DeleteVpcOriginInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteVpcOrigin", params, optFns, c.addOperationDeleteVpcOriginMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteVpcOriginOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteVpcOriginInput struct { + + // The VPC origin ID. + // + // This member is required. + Id *string + + // The VPC origin to delete, if a match occurs. + // + // This member is required. + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteVpcOriginOutput struct { + + // The VPC origin ETag. + ETag *string + + // The VPC origin. + VpcOrigin *types.VpcOrigin + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteVpcOriginMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteVpcOrigin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteVpcOrigin{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpcOrigin"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteVpcOriginValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcOrigin(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteVpcOrigin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteVpcOrigin", + } +} diff --git a/service/cloudfront/api_op_GetAnycastIpList.go b/service/cloudfront/api_op_GetAnycastIpList.go new file mode 100644 index 00000000000..0ce6faaf0f6 --- /dev/null +++ b/service/cloudfront/api_op_GetAnycastIpList.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets an Anycast static IP list. +func (c *Client) GetAnycastIpList(ctx context.Context, params *GetAnycastIpListInput, optFns ...func(*Options)) (*GetAnycastIpListOutput, error) { + if params == nil { + params = &GetAnycastIpListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAnycastIpList", params, optFns, c.addOperationGetAnycastIpListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAnycastIpListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAnycastIpListInput struct { + + // The ID of the Anycast static IP list. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetAnycastIpListOutput struct { + + // The Anycast static IP list details. + AnycastIpList *types.AnycastIpList + + // The version identifier for the current version of the Anycast static IP list. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAnycastIpListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetAnycastIpList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetAnycastIpList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAnycastIpList"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetAnycastIpListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAnycastIpList(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAnycastIpList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAnycastIpList", + } +} diff --git a/service/cloudfront/api_op_GetVpcOrigin.go b/service/cloudfront/api_op_GetVpcOrigin.go new file mode 100644 index 00000000000..50011545bd8 --- /dev/null +++ b/service/cloudfront/api_op_GetVpcOrigin.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the details of an Amazon CloudFront VPC origin. +func (c *Client) GetVpcOrigin(ctx context.Context, params *GetVpcOriginInput, optFns ...func(*Options)) (*GetVpcOriginOutput, error) { + if params == nil { + params = &GetVpcOriginInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetVpcOrigin", params, optFns, c.addOperationGetVpcOriginMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetVpcOriginOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetVpcOriginInput struct { + + // The VPC origin ID. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetVpcOriginOutput struct { + + // The VPC origin ETag. + ETag *string + + // The VPC origin. + VpcOrigin *types.VpcOrigin + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetVpcOriginMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetVpcOrigin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetVpcOrigin{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetVpcOrigin"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetVpcOriginValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpcOrigin(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetVpcOrigin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetVpcOrigin", + } +} diff --git a/service/cloudfront/api_op_ListAnycastIpLists.go b/service/cloudfront/api_op_ListAnycastIpLists.go new file mode 100644 index 00000000000..464c6e511ce --- /dev/null +++ b/service/cloudfront/api_op_ListAnycastIpLists.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists your Anycast static IP lists. +func (c *Client) ListAnycastIpLists(ctx context.Context, params *ListAnycastIpListsInput, optFns ...func(*Options)) (*ListAnycastIpListsOutput, error) { + if params == nil { + params = &ListAnycastIpListsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAnycastIpLists", params, optFns, c.addOperationListAnycastIpListsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAnycastIpListsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAnycastIpListsInput struct { + + // Use this field when paginating results to indicate where to begin in your list. + // The response includes items in the list that occur after the marker. To get the + // next page of the list, set this field's value to the value of NextMarker from + // the current page's response. + Marker *string + + // The maximum number of Anycast static IP lists that you want returned in the + // response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListAnycastIpListsOutput struct { + + // Root level tag for the AnycastIpLists parameters. + AnycastIpLists *types.AnycastIpListCollection + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAnycastIpListsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListAnycastIpLists{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListAnycastIpLists{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAnycastIpLists"); 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 = addSpanRetryLoop(stack, options); 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_opListAnycastIpLists(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListAnycastIpLists(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAnycastIpLists", + } +} diff --git a/service/cloudfront/api_op_ListDistributionsByAnycastIpListId.go b/service/cloudfront/api_op_ListDistributionsByAnycastIpListId.go new file mode 100644 index 00000000000..23230348a82 --- /dev/null +++ b/service/cloudfront/api_op_ListDistributionsByAnycastIpListId.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the distributions in your account that are associated with the specified +// AnycastIpListId . +func (c *Client) ListDistributionsByAnycastIpListId(ctx context.Context, params *ListDistributionsByAnycastIpListIdInput, optFns ...func(*Options)) (*ListDistributionsByAnycastIpListIdOutput, error) { + if params == nil { + params = &ListDistributionsByAnycastIpListIdInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByAnycastIpListId", params, optFns, c.addOperationListDistributionsByAnycastIpListIdMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByAnycastIpListIdOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDistributionsByAnycastIpListIdInput struct { + + // The ID of the Anycast static IP list. + // + // This member is required. + AnycastIpListId *string + + // Use this field when paginating results to indicate where to begin in your list. + // The response includes items in the list that occur after the marker. To get the + // next page of the list, set this field's value to the value of NextMarker from + // the current page's response. + Marker *string + + // The maximum number of distributions that you want returned in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListDistributionsByAnycastIpListIdOutput struct { + + // A distribution list. + DistributionList *types.DistributionList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByAnycastIpListIdMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByAnycastIpListId{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByAnycastIpListId{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByAnycastIpListId"); 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 = addSpanRetryLoop(stack, options); 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 = addOpListDistributionsByAnycastIpListIdValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByAnycastIpListId(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByAnycastIpListId(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByAnycastIpListId", + } +} diff --git a/service/cloudfront/api_op_ListDistributionsByVpcOriginId.go b/service/cloudfront/api_op_ListDistributionsByVpcOriginId.go new file mode 100644 index 00000000000..61c7a48c36f --- /dev/null +++ b/service/cloudfront/api_op_ListDistributionsByVpcOriginId.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List CloudFront distributions by their VPC origin ID. +func (c *Client) ListDistributionsByVpcOriginId(ctx context.Context, params *ListDistributionsByVpcOriginIdInput, optFns ...func(*Options)) (*ListDistributionsByVpcOriginIdOutput, error) { + if params == nil { + params = &ListDistributionsByVpcOriginIdInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByVpcOriginId", params, optFns, c.addOperationListDistributionsByVpcOriginIdMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByVpcOriginIdOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDistributionsByVpcOriginIdInput struct { + + // The VPC origin ID. + // + // This member is required. + VpcOriginId *string + + // The marker associated with the VPC origin distributions list. + Marker *string + + // The maximum number of items included in the list. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListDistributionsByVpcOriginIdOutput struct { + + // A list of distribution IDs. + DistributionIdList *types.DistributionIdList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByVpcOriginIdMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByVpcOriginId{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByVpcOriginId{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByVpcOriginId"); 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 = addSpanRetryLoop(stack, options); 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 = addOpListDistributionsByVpcOriginIdValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByVpcOriginId(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByVpcOriginId(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByVpcOriginId", + } +} diff --git a/service/cloudfront/api_op_ListVpcOrigins.go b/service/cloudfront/api_op_ListVpcOrigins.go new file mode 100644 index 00000000000..323e9fd45ba --- /dev/null +++ b/service/cloudfront/api_op_ListVpcOrigins.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List the CloudFront VPC origins in your account. +func (c *Client) ListVpcOrigins(ctx context.Context, params *ListVpcOriginsInput, optFns ...func(*Options)) (*ListVpcOriginsOutput, error) { + if params == nil { + params = &ListVpcOriginsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListVpcOrigins", params, optFns, c.addOperationListVpcOriginsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListVpcOriginsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListVpcOriginsInput struct { + + // The marker associated with the VPC origins list. + Marker *string + + // The maximum number of items included in the list. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListVpcOriginsOutput struct { + + // List of VPC origins. + VpcOriginList *types.VpcOriginList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListVpcOriginsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListVpcOrigins{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListVpcOrigins{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListVpcOrigins"); 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 = addSpanRetryLoop(stack, options); 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_opListVpcOrigins(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListVpcOrigins(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListVpcOrigins", + } +} diff --git a/service/cloudfront/api_op_UpdateVpcOrigin.go b/service/cloudfront/api_op_UpdateVpcOrigin.go new file mode 100644 index 00000000000..1f40e58a381 --- /dev/null +++ b/service/cloudfront/api_op_UpdateVpcOrigin.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update an Amazon CloudFront VPC origin in your account. +func (c *Client) UpdateVpcOrigin(ctx context.Context, params *UpdateVpcOriginInput, optFns ...func(*Options)) (*UpdateVpcOriginOutput, error) { + if params == nil { + params = &UpdateVpcOriginInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateVpcOrigin", params, optFns, c.addOperationUpdateVpcOriginMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateVpcOriginOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateVpcOriginInput struct { + + // The VPC origin ID. + // + // This member is required. + Id *string + + // The VPC origin to update, if a match occurs. + // + // This member is required. + IfMatch *string + + // The VPC origin endpoint configuration. + // + // This member is required. + VpcOriginEndpointConfig *types.VpcOriginEndpointConfig + + noSmithyDocumentSerde +} + +type UpdateVpcOriginOutput struct { + + // The VPC origin ETag. + ETag *string + + // The VPC origin. + VpcOrigin *types.VpcOrigin + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateVpcOriginMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateVpcOrigin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateVpcOrigin{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateVpcOrigin"); 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 = addSpanRetryLoop(stack, options); 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 = addOpUpdateVpcOriginValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateVpcOrigin(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateVpcOrigin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateVpcOrigin", + } +} diff --git a/service/cloudfront/deserializers.go b/service/cloudfront/deserializers.go index abdc42d7fdd..e29e0af7135 100644 --- a/service/cloudfront/deserializers.go +++ b/service/cloudfront/deserializers.go @@ -476,6 +476,180 @@ func awsRestxml_deserializeOpDocumentCopyDistributionOutput(v **CopyDistribution return nil } +type awsRestxml_deserializeOpCreateAnycastIpList struct { +} + +func (*awsRestxml_deserializeOpCreateAnycastIpList) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateAnycastIpList) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorCreateAnycastIpList(response, &metadata) + } + output := &CreateAnycastIpListOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateAnycastIpListOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentAnycastIpList(&output.AnycastIpList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateAnycastIpList(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsRestxml_deserializeErrorEntityAlreadyExists(response, errorBody) + + case strings.EqualFold("EntityLimitExceeded", errorCode): + return awsRestxml_deserializeErrorEntityLimitExceeded(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateAnycastIpListOutput(v *CreateAnycastIpListOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateAnycastIpListOutput(v **CreateAnycastIpListOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateAnycastIpListOutput + if *v == nil { + sv = &CreateAnycastIpListOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AnycastIpList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAnycastIpList(&sv.AnycastIpList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + type awsRestxml_deserializeOpCreateCachePolicy struct { } @@ -1120,6 +1294,9 @@ func awsRestxml_deserializeOpErrorCreateDistribution(response *smithyhttp.Respon case strings.EqualFold("DistributionAlreadyExists", errorCode): return awsRestxml_deserializeErrorDistributionAlreadyExists(response, errorBody) + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) @@ -1476,6 +1653,9 @@ func awsRestxml_deserializeOpErrorCreateDistributionWithTags(response *smithyhtt case strings.EqualFold("DistributionAlreadyExists", errorCode): return awsRestxml_deserializeErrorDistributionAlreadyExists(response, errorBody) + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) @@ -4221,14 +4401,14 @@ func awsRestxml_deserializeOpDocumentCreateStreamingDistributionWithTagsOutput(v return nil } -type awsRestxml_deserializeOpDeleteCachePolicy struct { +type awsRestxml_deserializeOpCreateVpcOrigin struct { } -func (*awsRestxml_deserializeOpDeleteCachePolicy) ID() string { +func (*awsRestxml_deserializeOpCreateVpcOrigin) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteCachePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpCreateVpcOrigin) 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) @@ -4246,107 +4426,41 @@ func (m *awsRestxml_deserializeOpDeleteCachePolicy) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteCachePolicy(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorCreateVpcOrigin(response, &metadata) } - output := &DeleteCachePolicyOutput{} + output := &CreateVpcOriginOutput{} 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), - } + err = awsRestxml_deserializeOpHttpBindingsCreateVpcOriginOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteCachePolicy(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)} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("AccessDenied", errorCode): - return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - - case strings.EqualFold("CachePolicyInUse", errorCode): - return awsRestxml_deserializeErrorCachePolicyInUse(response, errorBody) - - case strings.EqualFold("IllegalDelete", errorCode): - return awsRestxml_deserializeErrorIllegalDelete(response, errorBody) - - case strings.EqualFold("InvalidIfMatchVersion", errorCode): - return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - - case strings.EqualFold("NoSuchCachePolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) - - case strings.EqualFold("PreconditionFailed", errorCode): - return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } - return genericError - } -} - -type awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity struct { -} -func (*awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity) 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) + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentVpcOrigin(&output.VpcOrigin, decoder) if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - 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, awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(response, &metadata) - } - output := &DeleteCloudFrontOriginAccessIdentityOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -4354,7 +4468,7 @@ func (m *awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity) HandleDes return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorCreateVpcOrigin(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)} @@ -4382,17 +4496,23 @@ func awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(response case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("CloudFrontOriginAccessIdentityInUse", errorCode): - return awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response, errorBody) + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsRestxml_deserializeErrorEntityAlreadyExists(response, errorBody) - case strings.EqualFold("InvalidIfMatchVersion", errorCode): - return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + case strings.EqualFold("EntityLimitExceeded", errorCode): + return awsRestxml_deserializeErrorEntityLimitExceeded(response, errorBody) - case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): - return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) - case strings.EqualFold("PreconditionFailed", errorCode): - return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4404,14 +4524,73 @@ func awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(response } } -type awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy struct { +func awsRestxml_deserializeOpHttpBindingsCreateVpcOriginOutput(v *CreateVpcOriginOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil } +func awsRestxml_deserializeOpDocumentCreateVpcOriginOutput(v **CreateVpcOriginOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateVpcOriginOutput + if *v == nil { + sv = &CreateVpcOriginOutput{} + } else { + sv = *v + } -func (*awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) ID() string { + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("VpcOrigin", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVpcOrigin(&sv.VpcOrigin, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDeleteAnycastIpList struct { +} + +func (*awsRestxml_deserializeOpDeleteAnycastIpList) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteAnycastIpList) 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) @@ -4429,9 +4608,9 @@ func (m *awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteAnycastIpList(response, &metadata) } - output := &DeleteContinuousDeploymentPolicyOutput{} + output := &DeleteAnycastIpListOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4444,7 +4623,7 @@ func (m *awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) HandleDeseria return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteAnycastIpList(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)} @@ -4472,8 +4651,14 @@ func awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(response *smi case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("ContinuousDeploymentPolicyInUse", errorCode): - return awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response, errorBody) + case strings.EqualFold("CannotDeleteEntityWhileInUse", errorCode): + return awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("IllegalDelete", errorCode): + return awsRestxml_deserializeErrorIllegalDelete(response, errorBody) case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) @@ -4481,12 +4666,12 @@ func awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(response *smi case strings.EqualFold("InvalidIfMatchVersion", errorCode): return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) - case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4497,14 +4682,14 @@ func awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(response *smi } } -type awsRestxml_deserializeOpDeleteDistribution struct { +type awsRestxml_deserializeOpDeleteCachePolicy struct { } -func (*awsRestxml_deserializeOpDeleteDistribution) ID() string { +func (*awsRestxml_deserializeOpDeleteCachePolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteDistribution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteCachePolicy) 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) @@ -4522,9 +4707,9 @@ func (m *awsRestxml_deserializeOpDeleteDistribution) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteDistribution(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteCachePolicy(response, &metadata) } - output := &DeleteDistributionOutput{} + output := &DeleteCachePolicyOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4537,7 +4722,7 @@ func (m *awsRestxml_deserializeOpDeleteDistribution) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteDistribution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteCachePolicy(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)} @@ -4565,14 +4750,17 @@ func awsRestxml_deserializeOpErrorDeleteDistribution(response *smithyhttp.Respon case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("DistributionNotDisabled", errorCode): - return awsRestxml_deserializeErrorDistributionNotDisabled(response, errorBody) + case strings.EqualFold("CachePolicyInUse", errorCode): + return awsRestxml_deserializeErrorCachePolicyInUse(response, errorBody) + + case strings.EqualFold("IllegalDelete", errorCode): + return awsRestxml_deserializeErrorIllegalDelete(response, errorBody) case strings.EqualFold("InvalidIfMatchVersion", errorCode): return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - case strings.EqualFold("NoSuchDistribution", errorCode): - return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) @@ -4587,14 +4775,14 @@ func awsRestxml_deserializeOpErrorDeleteDistribution(response *smithyhttp.Respon } } -type awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig struct { +type awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity struct { } -func (*awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) ID() string { +func (*awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity) 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) @@ -4612,9 +4800,9 @@ func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(response, &metadata) } - output := &DeleteFieldLevelEncryptionConfigOutput{} + output := &DeleteCloudFrontOriginAccessIdentityOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4627,7 +4815,7 @@ func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) HandleDeseria return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(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)} @@ -4655,14 +4843,14 @@ func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(response *smi case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("FieldLevelEncryptionConfigInUse", errorCode): - return awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response, errorBody) + case strings.EqualFold("CloudFrontOriginAccessIdentityInUse", errorCode): + return awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response, errorBody) case strings.EqualFold("InvalidIfMatchVersion", errorCode): return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): - return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) @@ -4677,14 +4865,14 @@ func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(response *smi } } -type awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile struct { +type awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy struct { } -func (*awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) ID() string { +func (*awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) 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) @@ -4702,9 +4890,9 @@ func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(response, &metadata) } - output := &DeleteFieldLevelEncryptionProfileOutput{} + output := &DeleteContinuousDeploymentPolicyOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4717,7 +4905,7 @@ func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) HandleDeseri return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(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)} @@ -4745,14 +4933,17 @@ func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(response *sm case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("FieldLevelEncryptionProfileInUse", errorCode): - return awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response, errorBody) + case strings.EqualFold("ContinuousDeploymentPolicyInUse", errorCode): + return awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) case strings.EqualFold("InvalidIfMatchVersion", errorCode): return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): - return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) @@ -4767,14 +4958,14 @@ func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(response *sm } } -type awsRestxml_deserializeOpDeleteFunction struct { +type awsRestxml_deserializeOpDeleteDistribution struct { } -func (*awsRestxml_deserializeOpDeleteFunction) ID() string { +func (*awsRestxml_deserializeOpDeleteDistribution) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteDistribution) 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) @@ -4792,9 +4983,9 @@ func (m *awsRestxml_deserializeOpDeleteFunction) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteFunction(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteDistribution(response, &metadata) } - output := &DeleteFunctionOutput{} + output := &DeleteDistributionOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4807,7 +4998,7 @@ func (m *awsRestxml_deserializeOpDeleteFunction) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteDistribution(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)} @@ -4832,21 +5023,21 @@ func awsRestxml_deserializeOpErrorDeleteFunction(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("FunctionInUse", errorCode): - return awsRestxml_deserializeErrorFunctionInUse(response, errorBody) + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("DistributionNotDisabled", errorCode): + return awsRestxml_deserializeErrorDistributionNotDisabled(response, errorBody) case strings.EqualFold("InvalidIfMatchVersion", errorCode): return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - case strings.EqualFold("NoSuchFunctionExists", errorCode): - return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4857,14 +5048,14 @@ func awsRestxml_deserializeOpErrorDeleteFunction(response *smithyhttp.Response, } } -type awsRestxml_deserializeOpDeleteKeyGroup struct { +type awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig struct { } -func (*awsRestxml_deserializeOpDeleteKeyGroup) ID() string { +func (*awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteKeyGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) 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) @@ -4882,9 +5073,9 @@ func (m *awsRestxml_deserializeOpDeleteKeyGroup) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteKeyGroup(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(response, &metadata) } - output := &DeleteKeyGroupOutput{} + output := &DeleteFieldLevelEncryptionConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4897,7 +5088,7 @@ func (m *awsRestxml_deserializeOpDeleteKeyGroup) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteKeyGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(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)} @@ -4922,18 +5113,21 @@ func awsRestxml_deserializeOpErrorDeleteKeyGroup(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("FieldLevelEncryptionConfigInUse", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response, errorBody) + case strings.EqualFold("InvalidIfMatchVersion", errorCode): return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - case strings.EqualFold("NoSuchResource", errorCode): - return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) - case strings.EqualFold("ResourceInUse", errorCode): - return awsRestxml_deserializeErrorResourceInUse(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4944,14 +5138,14 @@ func awsRestxml_deserializeOpErrorDeleteKeyGroup(response *smithyhttp.Response, } } -type awsRestxml_deserializeOpDeleteKeyValueStore struct { +type awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile struct { } -func (*awsRestxml_deserializeOpDeleteKeyValueStore) ID() string { +func (*awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteKeyValueStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4969,9 +5163,9 @@ func (m *awsRestxml_deserializeOpDeleteKeyValueStore) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteKeyValueStore(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(response, &metadata) } - output := &DeleteKeyValueStoreOutput{} + output := &DeleteFieldLevelEncryptionProfileOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4984,7 +5178,7 @@ func (m *awsRestxml_deserializeOpDeleteKeyValueStore) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteKeyValueStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(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)} @@ -5012,21 +5206,18 @@ func awsRestxml_deserializeOpErrorDeleteKeyValueStore(response *smithyhttp.Respo case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("CannotDeleteEntityWhileInUse", errorCode): - return awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response, errorBody) - - case strings.EqualFold("EntityNotFound", errorCode): - return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("FieldLevelEncryptionProfileInUse", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response, errorBody) case strings.EqualFold("InvalidIfMatchVersion", errorCode): return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5037,14 +5228,14 @@ func awsRestxml_deserializeOpErrorDeleteKeyValueStore(response *smithyhttp.Respo } } -type awsRestxml_deserializeOpDeleteMonitoringSubscription struct { +type awsRestxml_deserializeOpDeleteFunction struct { } -func (*awsRestxml_deserializeOpDeleteMonitoringSubscription) ID() string { +func (*awsRestxml_deserializeOpDeleteFunction) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpDeleteMonitoringSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpDeleteFunction) 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) @@ -5062,16 +5253,286 @@ func (m *awsRestxml_deserializeOpDeleteMonitoringSubscription) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteMonitoringSubscription(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorDeleteFunction(response, &metadata) } - output := &DeleteMonitoringSubscriptionOutput{} + output := &DeleteFunctionOutput{} 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), + } + } + span.End() return out, metadata, err } -func awsRestxml_deserializeOpErrorDeleteMonitoringSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorDeleteFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("FunctionInUse", errorCode): + return awsRestxml_deserializeErrorFunctionInUse(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteKeyGroup struct { +} + +func (*awsRestxml_deserializeOpDeleteKeyGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteKeyGroup) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorDeleteKeyGroup(response, &metadata) + } + output := &DeleteKeyGroupOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteKeyGroup(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("ResourceInUse", errorCode): + return awsRestxml_deserializeErrorResourceInUse(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteKeyValueStore struct { +} + +func (*awsRestxml_deserializeOpDeleteKeyValueStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteKeyValueStore) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorDeleteKeyValueStore(response, &metadata) + } + output := &DeleteKeyValueStoreOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteKeyValueStore(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CannotDeleteEntityWhileInUse", errorCode): + return awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteMonitoringSubscription struct { +} + +func (*awsRestxml_deserializeOpDeleteMonitoringSubscription) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteMonitoringSubscription) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorDeleteMonitoringSubscription(response, &metadata) + } + output := &DeleteMonitoringSubscriptionOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteMonitoringSubscription(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)} @@ -5661,6 +6122,186 @@ func awsRestxml_deserializeOpErrorDeleteStreamingDistribution(response *smithyht } } +type awsRestxml_deserializeOpDeleteVpcOrigin struct { +} + +func (*awsRestxml_deserializeOpDeleteVpcOrigin) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteVpcOrigin) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorDeleteVpcOrigin(response, &metadata) + } + output := &DeleteVpcOriginOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsDeleteVpcOriginOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentVpcOrigin(&output.VpcOrigin, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteVpcOrigin(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CannotDeleteEntityWhileInUse", errorCode): + return awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("IllegalDelete", errorCode): + return awsRestxml_deserializeErrorIllegalDelete(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsDeleteVpcOriginOutput(v *DeleteVpcOriginOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentDeleteVpcOriginOutput(v **DeleteVpcOriginOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeleteVpcOriginOutput + if *v == nil { + sv = &DeleteVpcOriginOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("VpcOrigin", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVpcOrigin(&sv.VpcOrigin, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + type awsRestxml_deserializeOpDescribeFunction struct { } @@ -5991,14 +6632,14 @@ func awsRestxml_deserializeOpDocumentDescribeKeyValueStoreOutput(v **DescribeKey return nil } -type awsRestxml_deserializeOpGetCachePolicy struct { +type awsRestxml_deserializeOpGetAnycastIpList struct { } -func (*awsRestxml_deserializeOpGetCachePolicy) ID() string { +func (*awsRestxml_deserializeOpGetAnycastIpList) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpGetCachePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpGetAnycastIpList) 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) @@ -6016,12 +6657,12 @@ func (m *awsRestxml_deserializeOpGetCachePolicy) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetCachePolicy(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorGetAnycastIpList(response, &metadata) } - output := &GetCachePolicyOutput{} + output := &GetAnycastIpListOutput{} out.Result = output - err = awsRestxml_deserializeOpHttpBindingsGetCachePolicyOutput(output, response) + err = awsRestxml_deserializeOpHttpBindingsGetAnycastIpListOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -6044,7 +6685,7 @@ func (m *awsRestxml_deserializeOpGetCachePolicy) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentCachePolicy(&output.CachePolicy, decoder) + err = awsRestxml_deserializeDocumentAnycastIpList(&output.AnycastIpList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6058,7 +6699,7 @@ func (m *awsRestxml_deserializeOpGetCachePolicy) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestxml_deserializeOpErrorGetCachePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorGetAnycastIpList(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)} @@ -6086,8 +6727,14 @@ func awsRestxml_deserializeOpErrorGetCachePolicy(response *smithyhttp.Response, case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("NoSuchCachePolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -6099,7 +6746,7 @@ func awsRestxml_deserializeOpErrorGetCachePolicy(response *smithyhttp.Response, } } -func awsRestxml_deserializeOpHttpBindingsGetCachePolicyOutput(v *GetCachePolicyOutput, response *smithyhttp.Response) error { +func awsRestxml_deserializeOpHttpBindingsGetAnycastIpListOutput(v *GetAnycastIpListOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -6111,13 +6758,13 @@ func awsRestxml_deserializeOpHttpBindingsGetCachePolicyOutput(v *GetCachePolicyO return nil } -func awsRestxml_deserializeOpDocumentGetCachePolicyOutput(v **GetCachePolicyOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentGetAnycastIpListOutput(v **GetAnycastIpListOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *GetCachePolicyOutput + var sv *GetAnycastIpListOutput if *v == nil { - sv = &GetCachePolicyOutput{} + sv = &GetAnycastIpListOutput{} } else { sv = *v } @@ -6133,9 +6780,9 @@ func awsRestxml_deserializeOpDocumentGetCachePolicyOutput(v **GetCachePolicyOutp originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("CachePolicy", t.Name.Local): + case strings.EqualFold("AnycastIpList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentAnycastIpList(&sv.AnycastIpList, nodeDecoder); err != nil { return err } @@ -6153,14 +6800,14 @@ func awsRestxml_deserializeOpDocumentGetCachePolicyOutput(v **GetCachePolicyOutp return nil } -type awsRestxml_deserializeOpGetCachePolicyConfig struct { +type awsRestxml_deserializeOpGetCachePolicy struct { } -func (*awsRestxml_deserializeOpGetCachePolicyConfig) ID() string { +func (*awsRestxml_deserializeOpGetCachePolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpGetCachePolicyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpGetCachePolicy) 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) @@ -6178,12 +6825,12 @@ func (m *awsRestxml_deserializeOpGetCachePolicyConfig) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetCachePolicyConfig(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorGetCachePolicy(response, &metadata) } - output := &GetCachePolicyConfigOutput{} + output := &GetCachePolicyOutput{} out.Result = output - err = awsRestxml_deserializeOpHttpBindingsGetCachePolicyConfigOutput(output, response) + err = awsRestxml_deserializeOpHttpBindingsGetCachePolicyOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -6206,7 +6853,7 @@ func (m *awsRestxml_deserializeOpGetCachePolicyConfig) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentCachePolicyConfig(&output.CachePolicyConfig, decoder) + err = awsRestxml_deserializeDocumentCachePolicy(&output.CachePolicy, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6220,7 +6867,7 @@ func (m *awsRestxml_deserializeOpGetCachePolicyConfig) HandleDeserialize(ctx con return out, metadata, err } -func awsRestxml_deserializeOpErrorGetCachePolicyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorGetCachePolicy(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)} @@ -6261,7 +6908,7 @@ func awsRestxml_deserializeOpErrorGetCachePolicyConfig(response *smithyhttp.Resp } } -func awsRestxml_deserializeOpHttpBindingsGetCachePolicyConfigOutput(v *GetCachePolicyConfigOutput, response *smithyhttp.Response) error { +func awsRestxml_deserializeOpHttpBindingsGetCachePolicyOutput(v *GetCachePolicyOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -6273,13 +6920,13 @@ func awsRestxml_deserializeOpHttpBindingsGetCachePolicyConfigOutput(v *GetCacheP return nil } -func awsRestxml_deserializeOpDocumentGetCachePolicyConfigOutput(v **GetCachePolicyConfigOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentGetCachePolicyOutput(v **GetCachePolicyOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *GetCachePolicyConfigOutput + var sv *GetCachePolicyOutput if *v == nil { - sv = &GetCachePolicyConfigOutput{} + sv = &GetCachePolicyOutput{} } else { sv = *v } @@ -6295,9 +6942,9 @@ func awsRestxml_deserializeOpDocumentGetCachePolicyConfigOutput(v **GetCachePoli originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("CachePolicyConfig", t.Name.Local): + case strings.EqualFold("CachePolicy", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCachePolicyConfig(&sv.CachePolicyConfig, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { return err } @@ -6315,14 +6962,14 @@ func awsRestxml_deserializeOpDocumentGetCachePolicyConfigOutput(v **GetCachePoli return nil } -type awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity struct { +type awsRestxml_deserializeOpGetCachePolicyConfig struct { } -func (*awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) ID() string { +func (*awsRestxml_deserializeOpGetCachePolicyConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpGetCachePolicyConfig) 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) @@ -6340,12 +6987,12 @@ func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorGetCachePolicyConfig(response, &metadata) } - output := &GetCloudFrontOriginAccessIdentityOutput{} + output := &GetCachePolicyConfigOutput{} out.Result = output - err = awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityOutput(output, response) + err = awsRestxml_deserializeOpHttpBindingsGetCachePolicyConfigOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -6368,7 +7015,7 @@ func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&output.CloudFrontOriginAccessIdentity, decoder) + err = awsRestxml_deserializeDocumentCachePolicyConfig(&output.CachePolicyConfig, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6382,7 +7029,7 @@ func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) HandleDeseri return out, metadata, err } -func awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorGetCachePolicyConfig(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)} @@ -6410,8 +7057,8 @@ func awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(response *sm case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): - return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -6423,7 +7070,7 @@ func awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(response *sm } } -func awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityOutput(v *GetCloudFrontOriginAccessIdentityOutput, response *smithyhttp.Response) error { +func awsRestxml_deserializeOpHttpBindingsGetCachePolicyConfigOutput(v *GetCachePolicyConfigOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -6435,13 +7082,13 @@ func awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityOutput return nil } -func awsRestxml_deserializeOpDocumentGetCloudFrontOriginAccessIdentityOutput(v **GetCloudFrontOriginAccessIdentityOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentGetCachePolicyConfigOutput(v **GetCachePolicyConfigOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *GetCloudFrontOriginAccessIdentityOutput + var sv *GetCachePolicyConfigOutput if *v == nil { - sv = &GetCloudFrontOriginAccessIdentityOutput{} + sv = &GetCachePolicyConfigOutput{} } else { sv = *v } @@ -6457,9 +7104,9 @@ func awsRestxml_deserializeOpDocumentGetCloudFrontOriginAccessIdentityOutput(v * originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("CloudFrontOriginAccessIdentity", t.Name.Local): + case strings.EqualFold("CachePolicyConfig", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&sv.CloudFrontOriginAccessIdentity, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentCachePolicyConfig(&sv.CachePolicyConfig, nodeDecoder); err != nil { return err } @@ -6477,14 +7124,14 @@ func awsRestxml_deserializeOpDocumentGetCloudFrontOriginAccessIdentityOutput(v * return nil } -type awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig struct { +type awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity struct { } -func (*awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig) ID() string { +func (*awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) 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) @@ -6502,12 +7149,174 @@ func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentityConfig(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(response, &metadata) } - output := &GetCloudFrontOriginAccessIdentityConfigOutput{} + output := &GetCloudFrontOriginAccessIdentityOutput{} out.Result = output - err = awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigOutput(output, response) + err = awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&output.CloudFrontOriginAccessIdentity, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityOutput(v *GetCloudFrontOriginAccessIdentityOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetCloudFrontOriginAccessIdentityOutput(v **GetCloudFrontOriginAccessIdentityOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetCloudFrontOriginAccessIdentityOutput + if *v == nil { + sv = &GetCloudFrontOriginAccessIdentityOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentity", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&sv.CloudFrontOriginAccessIdentity, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig struct { +} + +func (*awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentityConfig(response, &metadata) + } + output := &GetCloudFrontOriginAccessIdentityConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10443,14 +11252,14 @@ func awsRestxml_deserializeOpDocumentGetStreamingDistributionConfigOutput(v **Ge return nil } -type awsRestxml_deserializeOpListCachePolicies struct { +type awsRestxml_deserializeOpGetVpcOrigin struct { } -func (*awsRestxml_deserializeOpListCachePolicies) ID() string { +func (*awsRestxml_deserializeOpGetVpcOrigin) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListCachePolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpGetVpcOrigin) 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) @@ -10468,11 +11277,16 @@ func (m *awsRestxml_deserializeOpListCachePolicies) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListCachePolicies(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorGetVpcOrigin(response, &metadata) } - output := &ListCachePoliciesOutput{} + output := &GetVpcOriginOutput{} out.Result = output + err = awsRestxml_deserializeOpHttpBindingsGetVpcOriginOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) @@ -10491,7 +11305,7 @@ func (m *awsRestxml_deserializeOpListCachePolicies) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentCachePolicyList(&output.CachePolicyList, decoder) + err = awsRestxml_deserializeDocumentVpcOrigin(&output.VpcOrigin, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10505,7 +11319,7 @@ func (m *awsRestxml_deserializeOpListCachePolicies) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestxml_deserializeOpErrorListCachePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorGetVpcOrigin(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)} @@ -10533,11 +11347,14 @@ func awsRestxml_deserializeOpErrorListCachePolicies(response *smithyhttp.Respons case strings.EqualFold("AccessDenied", errorCode): return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchCachePolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10549,13 +11366,25 @@ func awsRestxml_deserializeOpErrorListCachePolicies(response *smithyhttp.Respons } } -func awsRestxml_deserializeOpDocumentListCachePoliciesOutput(v **ListCachePoliciesOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpHttpBindingsGetVpcOriginOutput(v *GetVpcOriginOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetVpcOriginOutput(v **GetVpcOriginOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListCachePoliciesOutput + var sv *GetVpcOriginOutput if *v == nil { - sv = &ListCachePoliciesOutput{} + sv = &GetVpcOriginOutput{} } else { sv = *v } @@ -10571,9 +11400,9 @@ func awsRestxml_deserializeOpDocumentListCachePoliciesOutput(v **ListCachePolici originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("CachePolicyList", t.Name.Local): + case strings.EqualFold("VpcOrigin", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCachePolicyList(&sv.CachePolicyList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentVpcOrigin(&sv.VpcOrigin, nodeDecoder); err != nil { return err } @@ -10591,14 +11420,14 @@ func awsRestxml_deserializeOpDocumentListCachePoliciesOutput(v **ListCachePolici return nil } -type awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities struct { +type awsRestxml_deserializeOpListAnycastIpLists struct { } -func (*awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) ID() string { +func (*awsRestxml_deserializeOpListAnycastIpLists) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListAnycastIpLists) 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) @@ -10616,9 +11445,9 @@ func (m *awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListAnycastIpLists(response, &metadata) } - output := &ListCloudFrontOriginAccessIdentitiesOutput{} + output := &ListAnycastIpListsOutput{} out.Result = output var buff [1024]byte @@ -10639,7 +11468,7 @@ func (m *awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) HandleDes } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityList(&output.CloudFrontOriginAccessIdentityList, decoder) + err = awsRestxml_deserializeDocumentAnycastIpListCollection(&output.AnycastIpLists, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10653,7 +11482,7 @@ func (m *awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) HandleDes return out, metadata, err } -func awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListAnycastIpLists(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)} @@ -10678,9 +11507,18 @@ func awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(response } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10691,13 +11529,13 @@ func awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(response } } -func awsRestxml_deserializeOpDocumentListCloudFrontOriginAccessIdentitiesOutput(v **ListCloudFrontOriginAccessIdentitiesOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListAnycastIpListsOutput(v **ListAnycastIpListsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListCloudFrontOriginAccessIdentitiesOutput + var sv *ListAnycastIpListsOutput if *v == nil { - sv = &ListCloudFrontOriginAccessIdentitiesOutput{} + sv = &ListAnycastIpListsOutput{} } else { sv = *v } @@ -10713,9 +11551,9 @@ func awsRestxml_deserializeOpDocumentListCloudFrontOriginAccessIdentitiesOutput( originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("CloudFrontOriginAccessIdentityList", t.Name.Local): + case strings.EqualFold("AnycastIpListCollection", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityList(&sv.CloudFrontOriginAccessIdentityList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentAnycastIpListCollection(&sv.AnycastIpLists, nodeDecoder); err != nil { return err } @@ -10733,14 +11571,14 @@ func awsRestxml_deserializeOpDocumentListCloudFrontOriginAccessIdentitiesOutput( return nil } -type awsRestxml_deserializeOpListConflictingAliases struct { +type awsRestxml_deserializeOpListCachePolicies struct { } -func (*awsRestxml_deserializeOpListConflictingAliases) ID() string { +func (*awsRestxml_deserializeOpListCachePolicies) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListConflictingAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListCachePolicies) 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) @@ -10758,9 +11596,9 @@ func (m *awsRestxml_deserializeOpListConflictingAliases) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListConflictingAliases(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListCachePolicies(response, &metadata) } - output := &ListConflictingAliasesOutput{} + output := &ListCachePoliciesOutput{} out.Result = output var buff [1024]byte @@ -10781,7 +11619,7 @@ func (m *awsRestxml_deserializeOpListConflictingAliases) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentConflictingAliasesList(&output.ConflictingAliasesList, decoder) + err = awsRestxml_deserializeDocumentCachePolicyList(&output.CachePolicyList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10795,7 +11633,7 @@ func (m *awsRestxml_deserializeOpListConflictingAliases) HandleDeserialize(ctx c return out, metadata, err } -func awsRestxml_deserializeOpErrorListConflictingAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListCachePolicies(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)} @@ -10820,11 +11658,14 @@ func awsRestxml_deserializeOpErrorListConflictingAliases(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchDistribution", errorCode): - return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10836,13 +11677,13 @@ func awsRestxml_deserializeOpErrorListConflictingAliases(response *smithyhttp.Re } } -func awsRestxml_deserializeOpDocumentListConflictingAliasesOutput(v **ListConflictingAliasesOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListCachePoliciesOutput(v **ListCachePoliciesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListConflictingAliasesOutput + var sv *ListCachePoliciesOutput if *v == nil { - sv = &ListConflictingAliasesOutput{} + sv = &ListCachePoliciesOutput{} } else { sv = *v } @@ -10858,9 +11699,9 @@ func awsRestxml_deserializeOpDocumentListConflictingAliasesOutput(v **ListConfli originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ConflictingAliasesList", t.Name.Local): + case strings.EqualFold("CachePolicyList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentConflictingAliasesList(&sv.ConflictingAliasesList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentCachePolicyList(&sv.CachePolicyList, nodeDecoder); err != nil { return err } @@ -10878,14 +11719,14 @@ func awsRestxml_deserializeOpDocumentListConflictingAliasesOutput(v **ListConfli return nil } -type awsRestxml_deserializeOpListContinuousDeploymentPolicies struct { +type awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities struct { } -func (*awsRestxml_deserializeOpListContinuousDeploymentPolicies) ID() string { +func (*awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListContinuousDeploymentPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) 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) @@ -10903,9 +11744,9 @@ func (m *awsRestxml_deserializeOpListContinuousDeploymentPolicies) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(response, &metadata) } - output := &ListContinuousDeploymentPoliciesOutput{} + output := &ListCloudFrontOriginAccessIdentitiesOutput{} out.Result = output var buff [1024]byte @@ -10926,7 +11767,7 @@ func (m *awsRestxml_deserializeOpListContinuousDeploymentPolicies) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyList(&output.ContinuousDeploymentPolicyList, decoder) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityList(&output.CloudFrontOriginAccessIdentityList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10940,7 +11781,7 @@ func (m *awsRestxml_deserializeOpListContinuousDeploymentPolicies) HandleDeseria return out, metadata, err } -func awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(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)} @@ -10965,15 +11806,9 @@ func awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(response *smi } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("AccessDenied", errorCode): - return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10984,13 +11819,13 @@ func awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(response *smi } } -func awsRestxml_deserializeOpDocumentListContinuousDeploymentPoliciesOutput(v **ListContinuousDeploymentPoliciesOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListCloudFrontOriginAccessIdentitiesOutput(v **ListCloudFrontOriginAccessIdentitiesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListContinuousDeploymentPoliciesOutput + var sv *ListCloudFrontOriginAccessIdentitiesOutput if *v == nil { - sv = &ListContinuousDeploymentPoliciesOutput{} + sv = &ListCloudFrontOriginAccessIdentitiesOutput{} } else { sv = *v } @@ -11006,9 +11841,9 @@ func awsRestxml_deserializeOpDocumentListContinuousDeploymentPoliciesOutput(v ** originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ContinuousDeploymentPolicyList", t.Name.Local): + case strings.EqualFold("CloudFrontOriginAccessIdentityList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicyList(&sv.ContinuousDeploymentPolicyList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityList(&sv.CloudFrontOriginAccessIdentityList, nodeDecoder); err != nil { return err } @@ -11026,14 +11861,14 @@ func awsRestxml_deserializeOpDocumentListContinuousDeploymentPoliciesOutput(v ** return nil } -type awsRestxml_deserializeOpListDistributions struct { +type awsRestxml_deserializeOpListConflictingAliases struct { } -func (*awsRestxml_deserializeOpListDistributions) ID() string { +func (*awsRestxml_deserializeOpListConflictingAliases) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListDistributions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListConflictingAliases) 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) @@ -11051,9 +11886,9 @@ func (m *awsRestxml_deserializeOpListDistributions) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListDistributions(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListConflictingAliases(response, &metadata) } - output := &ListDistributionsOutput{} + output := &ListConflictingAliasesOutput{} out.Result = output var buff [1024]byte @@ -11074,7 +11909,7 @@ func (m *awsRestxml_deserializeOpListDistributions) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) + err = awsRestxml_deserializeDocumentConflictingAliasesList(&output.ConflictingAliasesList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11088,7 +11923,7 @@ func (m *awsRestxml_deserializeOpListDistributions) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestxml_deserializeOpErrorListDistributions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListConflictingAliases(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)} @@ -11116,6 +11951,9 @@ func awsRestxml_deserializeOpErrorListDistributions(response *smithyhttp.Respons case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11126,13 +11964,13 @@ func awsRestxml_deserializeOpErrorListDistributions(response *smithyhttp.Respons } } -func awsRestxml_deserializeOpDocumentListDistributionsOutput(v **ListDistributionsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListConflictingAliasesOutput(v **ListConflictingAliasesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListDistributionsOutput + var sv *ListConflictingAliasesOutput if *v == nil { - sv = &ListDistributionsOutput{} + sv = &ListConflictingAliasesOutput{} } else { sv = *v } @@ -11148,9 +11986,9 @@ func awsRestxml_deserializeOpDocumentListDistributionsOutput(v **ListDistributio originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("DistributionList", t.Name.Local): + case strings.EqualFold("ConflictingAliasesList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentConflictingAliasesList(&sv.ConflictingAliasesList, nodeDecoder); err != nil { return err } @@ -11168,14 +12006,14 @@ func awsRestxml_deserializeOpDocumentListDistributionsOutput(v **ListDistributio return nil } -type awsRestxml_deserializeOpListDistributionsByCachePolicyId struct { +type awsRestxml_deserializeOpListContinuousDeploymentPolicies struct { } -func (*awsRestxml_deserializeOpListDistributionsByCachePolicyId) ID() string { +func (*awsRestxml_deserializeOpListContinuousDeploymentPolicies) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListDistributionsByCachePolicyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListContinuousDeploymentPolicies) 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) @@ -11193,9 +12031,9 @@ func (m *awsRestxml_deserializeOpListDistributionsByCachePolicyId) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(response, &metadata) } - output := &ListDistributionsByCachePolicyIdOutput{} + output := &ListContinuousDeploymentPoliciesOutput{} out.Result = output var buff [1024]byte @@ -11216,7 +12054,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByCachePolicyId) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyList(&output.ContinuousDeploymentPolicyList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11230,7 +12068,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByCachePolicyId) HandleDeseria return out, metadata, err } -func awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(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)} @@ -11261,8 +12099,8 @@ func awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(response *smi case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchCachePolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11274,13 +12112,13 @@ func awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(response *smi } } -func awsRestxml_deserializeOpDocumentListDistributionsByCachePolicyIdOutput(v **ListDistributionsByCachePolicyIdOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListContinuousDeploymentPoliciesOutput(v **ListContinuousDeploymentPoliciesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListDistributionsByCachePolicyIdOutput + var sv *ListContinuousDeploymentPoliciesOutput if *v == nil { - sv = &ListDistributionsByCachePolicyIdOutput{} + sv = &ListContinuousDeploymentPoliciesOutput{} } else { sv = *v } @@ -11296,9 +12134,9 @@ func awsRestxml_deserializeOpDocumentListDistributionsByCachePolicyIdOutput(v ** originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("DistributionIdList", t.Name.Local): + case strings.EqualFold("ContinuousDeploymentPolicyList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicyList(&sv.ContinuousDeploymentPolicyList, nodeDecoder); err != nil { return err } @@ -11316,14 +12154,14 @@ func awsRestxml_deserializeOpDocumentListDistributionsByCachePolicyIdOutput(v ** return nil } -type awsRestxml_deserializeOpListDistributionsByKeyGroup struct { +type awsRestxml_deserializeOpListDistributions struct { } -func (*awsRestxml_deserializeOpListDistributionsByKeyGroup) ID() string { +func (*awsRestxml_deserializeOpListDistributions) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListDistributionsByKeyGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributions) 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) @@ -11341,9 +12179,9 @@ func (m *awsRestxml_deserializeOpListDistributionsByKeyGroup) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributions(response, &metadata) } - output := &ListDistributionsByKeyGroupOutput{} + output := &ListDistributionsOutput{} out.Result = output var buff [1024]byte @@ -11364,7 +12202,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByKeyGroup) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) + err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11378,7 +12216,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByKeyGroup) HandleDeserialize( return out, metadata, err } -func awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributions(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)} @@ -11406,8 +12244,156 @@ func awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(response *smithyht case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchResource", errorCode): - return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsOutput(v **ListDistributionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsOutput + if *v == nil { + sv = &ListDistributionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributionsByAnycastIpListId struct { +} + +func (*awsRestxml_deserializeOpListDistributionsByAnycastIpListId) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributionsByAnycastIpListId) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorListDistributionsByAnycastIpListId(response, &metadata) + } + output := &ListDistributionsByAnycastIpListIdOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributionsByAnycastIpListId(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11419,13 +12405,13 @@ func awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(response *smithyht } } -func awsRestxml_deserializeOpDocumentListDistributionsByKeyGroupOutput(v **ListDistributionsByKeyGroupOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByAnycastIpListIdOutput(v **ListDistributionsByAnycastIpListIdOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListDistributionsByKeyGroupOutput + var sv *ListDistributionsByAnycastIpListIdOutput if *v == nil { - sv = &ListDistributionsByKeyGroupOutput{} + sv = &ListDistributionsByAnycastIpListIdOutput{} } else { sv = *v } @@ -11441,9 +12427,9 @@ func awsRestxml_deserializeOpDocumentListDistributionsByKeyGroupOutput(v **ListD originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("DistributionIdList", t.Name.Local): + case strings.EqualFold("DistributionList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { return err } @@ -11461,14 +12447,14 @@ func awsRestxml_deserializeOpDocumentListDistributionsByKeyGroupOutput(v **ListD return nil } -type awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId struct { +type awsRestxml_deserializeOpListDistributionsByCachePolicyId struct { } -func (*awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) ID() string { +func (*awsRestxml_deserializeOpListDistributionsByCachePolicyId) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributionsByCachePolicyId) 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) @@ -11486,9 +12472,9 @@ func (m *awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(response, &metadata) } - output := &ListDistributionsByOriginRequestPolicyIdOutput{} + output := &ListDistributionsByCachePolicyIdOutput{} out.Result = output var buff [1024]byte @@ -11523,7 +12509,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) Handl return out, metadata, err } -func awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(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)} @@ -11554,8 +12540,8 @@ func awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(respo case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11567,13 +12553,13 @@ func awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(respo } } -func awsRestxml_deserializeOpDocumentListDistributionsByOriginRequestPolicyIdOutput(v **ListDistributionsByOriginRequestPolicyIdOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByCachePolicyIdOutput(v **ListDistributionsByCachePolicyIdOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListDistributionsByOriginRequestPolicyIdOutput + var sv *ListDistributionsByCachePolicyIdOutput if *v == nil { - sv = &ListDistributionsByOriginRequestPolicyIdOutput{} + sv = &ListDistributionsByCachePolicyIdOutput{} } else { sv = *v } @@ -11609,14 +12595,14 @@ func awsRestxml_deserializeOpDocumentListDistributionsByOriginRequestPolicyIdOut return nil } -type awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig struct { +type awsRestxml_deserializeOpListDistributionsByKeyGroup struct { } -func (*awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) ID() string { +func (*awsRestxml_deserializeOpListDistributionsByKeyGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributionsByKeyGroup) 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) @@ -11634,9 +12620,9 @@ func (m *awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(response, &metadata) } - output := &ListDistributionsByRealtimeLogConfigOutput{} + output := &ListDistributionsByKeyGroupOutput{} out.Result = output var buff [1024]byte @@ -11657,7 +12643,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) HandleDes } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) + err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11671,7 +12657,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) HandleDes return out, metadata, err } -func awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(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)} @@ -11699,6 +12685,9 @@ func awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(response case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11709,13 +12698,13 @@ func awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(response } } -func awsRestxml_deserializeOpDocumentListDistributionsByRealtimeLogConfigOutput(v **ListDistributionsByRealtimeLogConfigOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByKeyGroupOutput(v **ListDistributionsByKeyGroupOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListDistributionsByRealtimeLogConfigOutput + var sv *ListDistributionsByKeyGroupOutput if *v == nil { - sv = &ListDistributionsByRealtimeLogConfigOutput{} + sv = &ListDistributionsByKeyGroupOutput{} } else { sv = *v } @@ -11731,9 +12720,9 @@ func awsRestxml_deserializeOpDocumentListDistributionsByRealtimeLogConfigOutput( originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("DistributionList", t.Name.Local): + case strings.EqualFold("DistributionIdList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { return err } @@ -11751,14 +12740,14 @@ func awsRestxml_deserializeOpDocumentListDistributionsByRealtimeLogConfigOutput( return nil } -type awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId struct { +type awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId struct { } -func (*awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) ID() string { +func (*awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) 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) @@ -11776,9 +12765,9 @@ func (m *awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(response, &metadata) } - output := &ListDistributionsByResponseHeadersPolicyIdOutput{} + output := &ListDistributionsByOriginRequestPolicyIdOutput{} out.Result = output var buff [1024]byte @@ -11813,7 +12802,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) Han return out, metadata, err } -func awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(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)} @@ -11844,8 +12833,8 @@ func awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(res case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11857,13 +12846,13 @@ func awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(res } } -func awsRestxml_deserializeOpDocumentListDistributionsByResponseHeadersPolicyIdOutput(v **ListDistributionsByResponseHeadersPolicyIdOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByOriginRequestPolicyIdOutput(v **ListDistributionsByOriginRequestPolicyIdOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListDistributionsByResponseHeadersPolicyIdOutput + var sv *ListDistributionsByOriginRequestPolicyIdOutput if *v == nil { - sv = &ListDistributionsByResponseHeadersPolicyIdOutput{} + sv = &ListDistributionsByOriginRequestPolicyIdOutput{} } else { sv = *v } @@ -11899,14 +12888,14 @@ func awsRestxml_deserializeOpDocumentListDistributionsByResponseHeadersPolicyIdO return nil } -type awsRestxml_deserializeOpListDistributionsByWebACLId struct { +type awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig struct { } -func (*awsRestxml_deserializeOpListDistributionsByWebACLId) ID() string { +func (*awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListDistributionsByWebACLId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) 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) @@ -11924,9 +12913,9 @@ func (m *awsRestxml_deserializeOpListDistributionsByWebACLId) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByWebACLId(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(response, &metadata) } - output := &ListDistributionsByWebACLIdOutput{} + output := &ListDistributionsByRealtimeLogConfigOutput{} out.Result = output var buff [1024]byte @@ -11961,7 +12950,7 @@ func (m *awsRestxml_deserializeOpListDistributionsByWebACLId) HandleDeserialize( return out, metadata, err } -func awsRestxml_deserializeOpErrorListDistributionsByWebACLId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(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)} @@ -11989,9 +12978,6 @@ func awsRestxml_deserializeOpErrorListDistributionsByWebACLId(response *smithyht case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("InvalidWebACLId", errorCode): - return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12002,13 +12988,13 @@ func awsRestxml_deserializeOpErrorListDistributionsByWebACLId(response *smithyht } } -func awsRestxml_deserializeOpDocumentListDistributionsByWebACLIdOutput(v **ListDistributionsByWebACLIdOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByRealtimeLogConfigOutput(v **ListDistributionsByRealtimeLogConfigOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListDistributionsByWebACLIdOutput + var sv *ListDistributionsByRealtimeLogConfigOutput if *v == nil { - sv = &ListDistributionsByWebACLIdOutput{} + sv = &ListDistributionsByRealtimeLogConfigOutput{} } else { sv = *v } @@ -12044,14 +13030,14 @@ func awsRestxml_deserializeOpDocumentListDistributionsByWebACLIdOutput(v **ListD return nil } -type awsRestxml_deserializeOpListFieldLevelEncryptionConfigs struct { +type awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId struct { } -func (*awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) ID() string { +func (*awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) 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) @@ -12069,9 +13055,9 @@ func (m *awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(response, &metadata) } - output := &ListFieldLevelEncryptionConfigsOutput{} + output := &ListDistributionsByResponseHeadersPolicyIdOutput{} out.Result = output var buff [1024]byte @@ -12092,7 +13078,7 @@ func (m *awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) HandleDeserial } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentFieldLevelEncryptionList(&output.FieldLevelEncryptionList, decoder) + err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12106,7 +13092,7 @@ func (m *awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) HandleDeserial return out, metadata, err } -func awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(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)} @@ -12131,9 +13117,15 @@ func awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(response *smit } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12144,13 +13136,13 @@ func awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(response *smit } } -func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionConfigsOutput(v **ListFieldLevelEncryptionConfigsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByResponseHeadersPolicyIdOutput(v **ListDistributionsByResponseHeadersPolicyIdOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListFieldLevelEncryptionConfigsOutput + var sv *ListDistributionsByResponseHeadersPolicyIdOutput if *v == nil { - sv = &ListFieldLevelEncryptionConfigsOutput{} + sv = &ListDistributionsByResponseHeadersPolicyIdOutput{} } else { sv = *v } @@ -12166,9 +13158,9 @@ func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionConfigsOutput(v **L originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("FieldLevelEncryptionList", t.Name.Local): + case strings.EqualFold("DistributionIdList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentFieldLevelEncryptionList(&sv.FieldLevelEncryptionList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { return err } @@ -12186,14 +13178,14 @@ func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionConfigsOutput(v **L return nil } -type awsRestxml_deserializeOpListFieldLevelEncryptionProfiles struct { +type awsRestxml_deserializeOpListDistributionsByVpcOriginId struct { } -func (*awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) ID() string { +func (*awsRestxml_deserializeOpListDistributionsByVpcOriginId) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributionsByVpcOriginId) 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) @@ -12211,9 +13203,9 @@ func (m *awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByVpcOriginId(response, &metadata) } - output := &ListFieldLevelEncryptionProfilesOutput{} + output := &ListDistributionsByVpcOriginIdOutput{} out.Result = output var buff [1024]byte @@ -12234,7 +13226,7 @@ func (m *awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileList(&output.FieldLevelEncryptionProfileList, decoder) + err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12248,7 +13240,7 @@ func (m *awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) HandleDeseria return out, metadata, err } -func awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributionsByVpcOriginId(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)} @@ -12273,9 +13265,18 @@ func awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(response *smi } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12286,13 +13287,13 @@ func awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(response *smi } } -func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionProfilesOutput(v **ListFieldLevelEncryptionProfilesOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByVpcOriginIdOutput(v **ListDistributionsByVpcOriginIdOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListFieldLevelEncryptionProfilesOutput + var sv *ListDistributionsByVpcOriginIdOutput if *v == nil { - sv = &ListFieldLevelEncryptionProfilesOutput{} + sv = &ListDistributionsByVpcOriginIdOutput{} } else { sv = *v } @@ -12308,9 +13309,9 @@ func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionProfilesOutput(v ** originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("FieldLevelEncryptionProfileList", t.Name.Local): + case strings.EqualFold("DistributionIdList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileList(&sv.FieldLevelEncryptionProfileList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { return err } @@ -12328,14 +13329,14 @@ func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionProfilesOutput(v ** return nil } -type awsRestxml_deserializeOpListFunctions struct { +type awsRestxml_deserializeOpListDistributionsByWebACLId struct { } -func (*awsRestxml_deserializeOpListFunctions) ID() string { +func (*awsRestxml_deserializeOpListDistributionsByWebACLId) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListFunctions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListDistributionsByWebACLId) 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) @@ -12353,9 +13354,9 @@ func (m *awsRestxml_deserializeOpListFunctions) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListFunctions(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListDistributionsByWebACLId(response, &metadata) } - output := &ListFunctionsOutput{} + output := &ListDistributionsByWebACLIdOutput{} out.Result = output var buff [1024]byte @@ -12376,7 +13377,7 @@ func (m *awsRestxml_deserializeOpListFunctions) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentFunctionList(&output.FunctionList, decoder) + err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12390,7 +13391,7 @@ func (m *awsRestxml_deserializeOpListFunctions) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestxml_deserializeOpErrorListFunctions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListDistributionsByWebACLId(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)} @@ -12418,8 +13419,8 @@ func awsRestxml_deserializeOpErrorListFunctions(response *smithyhttp.Response, m case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + case strings.EqualFold("InvalidWebACLId", errorCode): + return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12431,13 +13432,13 @@ func awsRestxml_deserializeOpErrorListFunctions(response *smithyhttp.Response, m } } -func awsRestxml_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListDistributionsByWebACLIdOutput(v **ListDistributionsByWebACLIdOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListFunctionsOutput + var sv *ListDistributionsByWebACLIdOutput if *v == nil { - sv = &ListFunctionsOutput{} + sv = &ListDistributionsByWebACLIdOutput{} } else { sv = *v } @@ -12453,9 +13454,9 @@ func awsRestxml_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("FunctionList", t.Name.Local): + case strings.EqualFold("DistributionList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentFunctionList(&sv.FunctionList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { return err } @@ -12473,14 +13474,14 @@ func awsRestxml_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput return nil } -type awsRestxml_deserializeOpListInvalidations struct { +type awsRestxml_deserializeOpListFieldLevelEncryptionConfigs struct { } -func (*awsRestxml_deserializeOpListInvalidations) ID() string { +func (*awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListInvalidations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) 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) @@ -12498,9 +13499,9 @@ func (m *awsRestxml_deserializeOpListInvalidations) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListInvalidations(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(response, &metadata) } - output := &ListInvalidationsOutput{} + output := &ListFieldLevelEncryptionConfigsOutput{} out.Result = output var buff [1024]byte @@ -12521,7 +13522,7 @@ func (m *awsRestxml_deserializeOpListInvalidations) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentInvalidationList(&output.InvalidationList, decoder) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionList(&output.FieldLevelEncryptionList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12535,7 +13536,7 @@ func (m *awsRestxml_deserializeOpListInvalidations) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestxml_deserializeOpErrorListInvalidations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(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)} @@ -12560,15 +13561,9 @@ func awsRestxml_deserializeOpErrorListInvalidations(response *smithyhttp.Respons } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("AccessDenied", errorCode): - return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchDistribution", errorCode): - return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12579,13 +13574,13 @@ func awsRestxml_deserializeOpErrorListInvalidations(response *smithyhttp.Respons } } -func awsRestxml_deserializeOpDocumentListInvalidationsOutput(v **ListInvalidationsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionConfigsOutput(v **ListFieldLevelEncryptionConfigsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListInvalidationsOutput + var sv *ListFieldLevelEncryptionConfigsOutput if *v == nil { - sv = &ListInvalidationsOutput{} + sv = &ListFieldLevelEncryptionConfigsOutput{} } else { sv = *v } @@ -12601,9 +13596,9 @@ func awsRestxml_deserializeOpDocumentListInvalidationsOutput(v **ListInvalidatio originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("InvalidationList", t.Name.Local): + case strings.EqualFold("FieldLevelEncryptionList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentInvalidationList(&sv.InvalidationList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionList(&sv.FieldLevelEncryptionList, nodeDecoder); err != nil { return err } @@ -12621,14 +13616,14 @@ func awsRestxml_deserializeOpDocumentListInvalidationsOutput(v **ListInvalidatio return nil } -type awsRestxml_deserializeOpListKeyGroups struct { +type awsRestxml_deserializeOpListFieldLevelEncryptionProfiles struct { } -func (*awsRestxml_deserializeOpListKeyGroups) ID() string { +func (*awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListKeyGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) 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) @@ -12646,9 +13641,9 @@ func (m *awsRestxml_deserializeOpListKeyGroups) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListKeyGroups(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(response, &metadata) } - output := &ListKeyGroupsOutput{} + output := &ListFieldLevelEncryptionProfilesOutput{} out.Result = output var buff [1024]byte @@ -12669,7 +13664,7 @@ func (m *awsRestxml_deserializeOpListKeyGroups) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentKeyGroupList(&output.KeyGroupList, decoder) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileList(&output.FieldLevelEncryptionProfileList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12683,7 +13678,7 @@ func (m *awsRestxml_deserializeOpListKeyGroups) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestxml_deserializeOpErrorListKeyGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(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)} @@ -12721,13 +13716,13 @@ func awsRestxml_deserializeOpErrorListKeyGroups(response *smithyhttp.Response, m } } -func awsRestxml_deserializeOpDocumentListKeyGroupsOutput(v **ListKeyGroupsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionProfilesOutput(v **ListFieldLevelEncryptionProfilesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListKeyGroupsOutput + var sv *ListFieldLevelEncryptionProfilesOutput if *v == nil { - sv = &ListKeyGroupsOutput{} + sv = &ListFieldLevelEncryptionProfilesOutput{} } else { sv = *v } @@ -12743,9 +13738,9 @@ func awsRestxml_deserializeOpDocumentListKeyGroupsOutput(v **ListKeyGroupsOutput originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("KeyGroupList", t.Name.Local): + case strings.EqualFold("FieldLevelEncryptionProfileList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentKeyGroupList(&sv.KeyGroupList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileList(&sv.FieldLevelEncryptionProfileList, nodeDecoder); err != nil { return err } @@ -12763,14 +13758,14 @@ func awsRestxml_deserializeOpDocumentListKeyGroupsOutput(v **ListKeyGroupsOutput return nil } -type awsRestxml_deserializeOpListKeyValueStores struct { +type awsRestxml_deserializeOpListFunctions struct { } -func (*awsRestxml_deserializeOpListKeyValueStores) ID() string { +func (*awsRestxml_deserializeOpListFunctions) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListKeyValueStores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListFunctions) 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) @@ -12788,9 +13783,9 @@ func (m *awsRestxml_deserializeOpListKeyValueStores) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListKeyValueStores(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListFunctions(response, &metadata) } - output := &ListKeyValueStoresOutput{} + output := &ListFunctionsOutput{} out.Result = output var buff [1024]byte @@ -12811,7 +13806,7 @@ func (m *awsRestxml_deserializeOpListKeyValueStores) HandleDeserialize(ctx conte } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentKeyValueStoreList(&output.KeyValueStoreList, decoder) + err = awsRestxml_deserializeDocumentFunctionList(&output.FunctionList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12825,7 +13820,7 @@ func (m *awsRestxml_deserializeOpListKeyValueStores) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestxml_deserializeOpErrorListKeyValueStores(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListFunctions(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)} @@ -12850,9 +13845,6 @@ func awsRestxml_deserializeOpErrorListKeyValueStores(response *smithyhttp.Respon } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("AccessDenied", errorCode): - return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) @@ -12869,13 +13861,13 @@ func awsRestxml_deserializeOpErrorListKeyValueStores(response *smithyhttp.Respon } } -func awsRestxml_deserializeOpDocumentListKeyValueStoresOutput(v **ListKeyValueStoresOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListKeyValueStoresOutput + var sv *ListFunctionsOutput if *v == nil { - sv = &ListKeyValueStoresOutput{} + sv = &ListFunctionsOutput{} } else { sv = *v } @@ -12891,9 +13883,9 @@ func awsRestxml_deserializeOpDocumentListKeyValueStoresOutput(v **ListKeyValueSt originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("KeyValueStoreList", t.Name.Local): + case strings.EqualFold("FunctionList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentKeyValueStoreList(&sv.KeyValueStoreList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentFunctionList(&sv.FunctionList, nodeDecoder); err != nil { return err } @@ -12911,14 +13903,14 @@ func awsRestxml_deserializeOpDocumentListKeyValueStoresOutput(v **ListKeyValueSt return nil } -type awsRestxml_deserializeOpListOriginAccessControls struct { +type awsRestxml_deserializeOpListInvalidations struct { } -func (*awsRestxml_deserializeOpListOriginAccessControls) ID() string { +func (*awsRestxml_deserializeOpListInvalidations) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListOriginAccessControls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListInvalidations) 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) @@ -12936,9 +13928,9 @@ func (m *awsRestxml_deserializeOpListOriginAccessControls) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListOriginAccessControls(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListInvalidations(response, &metadata) } - output := &ListOriginAccessControlsOutput{} + output := &ListInvalidationsOutput{} out.Result = output var buff [1024]byte @@ -12959,7 +13951,7 @@ func (m *awsRestxml_deserializeOpListOriginAccessControls) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentOriginAccessControlList(&output.OriginAccessControlList, decoder) + err = awsRestxml_deserializeDocumentInvalidationList(&output.InvalidationList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12973,7 +13965,7 @@ func (m *awsRestxml_deserializeOpListOriginAccessControls) HandleDeserialize(ctx return out, metadata, err } -func awsRestxml_deserializeOpErrorListOriginAccessControls(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListInvalidations(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)} @@ -12998,9 +13990,15 @@ func awsRestxml_deserializeOpErrorListOriginAccessControls(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13011,13 +14009,13 @@ func awsRestxml_deserializeOpErrorListOriginAccessControls(response *smithyhttp. } } -func awsRestxml_deserializeOpDocumentListOriginAccessControlsOutput(v **ListOriginAccessControlsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListInvalidationsOutput(v **ListInvalidationsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListOriginAccessControlsOutput + var sv *ListInvalidationsOutput if *v == nil { - sv = &ListOriginAccessControlsOutput{} + sv = &ListInvalidationsOutput{} } else { sv = *v } @@ -13033,9 +14031,9 @@ func awsRestxml_deserializeOpDocumentListOriginAccessControlsOutput(v **ListOrig originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("OriginAccessControlList", t.Name.Local): + case strings.EqualFold("InvalidationList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentOriginAccessControlList(&sv.OriginAccessControlList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentInvalidationList(&sv.InvalidationList, nodeDecoder); err != nil { return err } @@ -13053,14 +14051,14 @@ func awsRestxml_deserializeOpDocumentListOriginAccessControlsOutput(v **ListOrig return nil } -type awsRestxml_deserializeOpListOriginRequestPolicies struct { +type awsRestxml_deserializeOpListKeyGroups struct { } -func (*awsRestxml_deserializeOpListOriginRequestPolicies) ID() string { +func (*awsRestxml_deserializeOpListKeyGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListOriginRequestPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListKeyGroups) 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) @@ -13078,9 +14076,9 @@ func (m *awsRestxml_deserializeOpListOriginRequestPolicies) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListOriginRequestPolicies(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListKeyGroups(response, &metadata) } - output := &ListOriginRequestPoliciesOutput{} + output := &ListKeyGroupsOutput{} out.Result = output var buff [1024]byte @@ -13101,7 +14099,7 @@ func (m *awsRestxml_deserializeOpListOriginRequestPolicies) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentOriginRequestPolicyList(&output.OriginRequestPolicyList, decoder) + err = awsRestxml_deserializeDocumentKeyGroupList(&output.KeyGroupList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13115,7 +14113,149 @@ func (m *awsRestxml_deserializeOpListOriginRequestPolicies) HandleDeserialize(ct return out, metadata, err } -func awsRestxml_deserializeOpErrorListOriginRequestPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListKeyGroups(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListKeyGroupsOutput(v **ListKeyGroupsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListKeyGroupsOutput + if *v == nil { + sv = &ListKeyGroupsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroupList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroupList(&sv.KeyGroupList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListKeyValueStores struct { +} + +func (*awsRestxml_deserializeOpListKeyValueStores) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListKeyValueStores) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorListKeyValueStores(response, &metadata) + } + output := &ListKeyValueStoresOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyValueStoreList(&output.KeyValueStoreList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListKeyValueStores(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)} @@ -13146,8 +14286,8 @@ func awsRestxml_deserializeOpErrorListOriginRequestPolicies(response *smithyhttp case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13159,13 +14299,13 @@ func awsRestxml_deserializeOpErrorListOriginRequestPolicies(response *smithyhttp } } -func awsRestxml_deserializeOpDocumentListOriginRequestPoliciesOutput(v **ListOriginRequestPoliciesOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListKeyValueStoresOutput(v **ListKeyValueStoresOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListOriginRequestPoliciesOutput + var sv *ListKeyValueStoresOutput if *v == nil { - sv = &ListOriginRequestPoliciesOutput{} + sv = &ListKeyValueStoresOutput{} } else { sv = *v } @@ -13181,9 +14321,9 @@ func awsRestxml_deserializeOpDocumentListOriginRequestPoliciesOutput(v **ListOri originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("OriginRequestPolicyList", t.Name.Local): + case strings.EqualFold("KeyValueStoreList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentOriginRequestPolicyList(&sv.OriginRequestPolicyList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentKeyValueStoreList(&sv.KeyValueStoreList, nodeDecoder); err != nil { return err } @@ -13201,14 +14341,14 @@ func awsRestxml_deserializeOpDocumentListOriginRequestPoliciesOutput(v **ListOri return nil } -type awsRestxml_deserializeOpListPublicKeys struct { +type awsRestxml_deserializeOpListOriginAccessControls struct { } -func (*awsRestxml_deserializeOpListPublicKeys) ID() string { +func (*awsRestxml_deserializeOpListOriginAccessControls) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListPublicKeys) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListOriginAccessControls) 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) @@ -13226,9 +14366,9 @@ func (m *awsRestxml_deserializeOpListPublicKeys) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListPublicKeys(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListOriginAccessControls(response, &metadata) } - output := &ListPublicKeysOutput{} + output := &ListOriginAccessControlsOutput{} out.Result = output var buff [1024]byte @@ -13249,7 +14389,7 @@ func (m *awsRestxml_deserializeOpListPublicKeys) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentPublicKeyList(&output.PublicKeyList, decoder) + err = awsRestxml_deserializeDocumentOriginAccessControlList(&output.OriginAccessControlList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13263,7 +14403,7 @@ func (m *awsRestxml_deserializeOpListPublicKeys) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestxml_deserializeOpErrorListPublicKeys(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListOriginAccessControls(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)} @@ -13301,13 +14441,13 @@ func awsRestxml_deserializeOpErrorListPublicKeys(response *smithyhttp.Response, } } -func awsRestxml_deserializeOpDocumentListPublicKeysOutput(v **ListPublicKeysOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListOriginAccessControlsOutput(v **ListOriginAccessControlsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListPublicKeysOutput + var sv *ListOriginAccessControlsOutput if *v == nil { - sv = &ListPublicKeysOutput{} + sv = &ListOriginAccessControlsOutput{} } else { sv = *v } @@ -13323,9 +14463,9 @@ func awsRestxml_deserializeOpDocumentListPublicKeysOutput(v **ListPublicKeysOutp originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("PublicKeyList", t.Name.Local): + case strings.EqualFold("OriginAccessControlList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentPublicKeyList(&sv.PublicKeyList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentOriginAccessControlList(&sv.OriginAccessControlList, nodeDecoder); err != nil { return err } @@ -13343,14 +14483,14 @@ func awsRestxml_deserializeOpDocumentListPublicKeysOutput(v **ListPublicKeysOutp return nil } -type awsRestxml_deserializeOpListRealtimeLogConfigs struct { +type awsRestxml_deserializeOpListOriginRequestPolicies struct { } -func (*awsRestxml_deserializeOpListRealtimeLogConfigs) ID() string { +func (*awsRestxml_deserializeOpListOriginRequestPolicies) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListRealtimeLogConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListOriginRequestPolicies) 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) @@ -13368,9 +14508,9 @@ func (m *awsRestxml_deserializeOpListRealtimeLogConfigs) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListRealtimeLogConfigs(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListOriginRequestPolicies(response, &metadata) } - output := &ListRealtimeLogConfigsOutput{} + output := &ListOriginRequestPoliciesOutput{} out.Result = output var buff [1024]byte @@ -13391,7 +14531,7 @@ func (m *awsRestxml_deserializeOpListRealtimeLogConfigs) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentRealtimeLogConfigs(&output.RealtimeLogConfigs, decoder) + err = awsRestxml_deserializeDocumentOriginRequestPolicyList(&output.OriginRequestPolicyList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13405,7 +14545,7 @@ func (m *awsRestxml_deserializeOpListRealtimeLogConfigs) HandleDeserialize(ctx c return out, metadata, err } -func awsRestxml_deserializeOpErrorListRealtimeLogConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListOriginRequestPolicies(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)} @@ -13436,8 +14576,8 @@ func awsRestxml_deserializeOpErrorListRealtimeLogConfigs(response *smithyhttp.Re case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): - return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13449,13 +14589,13 @@ func awsRestxml_deserializeOpErrorListRealtimeLogConfigs(response *smithyhttp.Re } } -func awsRestxml_deserializeOpDocumentListRealtimeLogConfigsOutput(v **ListRealtimeLogConfigsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListOriginRequestPoliciesOutput(v **ListOriginRequestPoliciesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListRealtimeLogConfigsOutput + var sv *ListOriginRequestPoliciesOutput if *v == nil { - sv = &ListRealtimeLogConfigsOutput{} + sv = &ListOriginRequestPoliciesOutput{} } else { sv = *v } @@ -13471,9 +14611,9 @@ func awsRestxml_deserializeOpDocumentListRealtimeLogConfigsOutput(v **ListRealti originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("RealtimeLogConfigs", t.Name.Local): + case strings.EqualFold("OriginRequestPolicyList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentRealtimeLogConfigs(&sv.RealtimeLogConfigs, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentOriginRequestPolicyList(&sv.OriginRequestPolicyList, nodeDecoder); err != nil { return err } @@ -13491,14 +14631,14 @@ func awsRestxml_deserializeOpDocumentListRealtimeLogConfigsOutput(v **ListRealti return nil } -type awsRestxml_deserializeOpListResponseHeadersPolicies struct { +type awsRestxml_deserializeOpListPublicKeys struct { } -func (*awsRestxml_deserializeOpListResponseHeadersPolicies) ID() string { +func (*awsRestxml_deserializeOpListPublicKeys) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListResponseHeadersPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListPublicKeys) 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) @@ -13516,9 +14656,9 @@ func (m *awsRestxml_deserializeOpListResponseHeadersPolicies) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListResponseHeadersPolicies(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListPublicKeys(response, &metadata) } - output := &ListResponseHeadersPoliciesOutput{} + output := &ListPublicKeysOutput{} out.Result = output var buff [1024]byte @@ -13539,7 +14679,7 @@ func (m *awsRestxml_deserializeOpListResponseHeadersPolicies) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentResponseHeadersPolicyList(&output.ResponseHeadersPolicyList, decoder) + err = awsRestxml_deserializeDocumentPublicKeyList(&output.PublicKeyList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13553,7 +14693,7 @@ func (m *awsRestxml_deserializeOpListResponseHeadersPolicies) HandleDeserialize( return out, metadata, err } -func awsRestxml_deserializeOpErrorListResponseHeadersPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListPublicKeys(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)} @@ -13578,15 +14718,9 @@ func awsRestxml_deserializeOpErrorListResponseHeadersPolicies(response *smithyht } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("AccessDenied", errorCode): - return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13597,13 +14731,13 @@ func awsRestxml_deserializeOpErrorListResponseHeadersPolicies(response *smithyht } } -func awsRestxml_deserializeOpDocumentListResponseHeadersPoliciesOutput(v **ListResponseHeadersPoliciesOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListPublicKeysOutput(v **ListPublicKeysOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListResponseHeadersPoliciesOutput + var sv *ListPublicKeysOutput if *v == nil { - sv = &ListResponseHeadersPoliciesOutput{} + sv = &ListPublicKeysOutput{} } else { sv = *v } @@ -13619,9 +14753,9 @@ func awsRestxml_deserializeOpDocumentListResponseHeadersPoliciesOutput(v **ListR originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ResponseHeadersPolicyList", t.Name.Local): + case strings.EqualFold("PublicKeyList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentResponseHeadersPolicyList(&sv.ResponseHeadersPolicyList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentPublicKeyList(&sv.PublicKeyList, nodeDecoder); err != nil { return err } @@ -13639,14 +14773,14 @@ func awsRestxml_deserializeOpDocumentListResponseHeadersPoliciesOutput(v **ListR return nil } -type awsRestxml_deserializeOpListStreamingDistributions struct { +type awsRestxml_deserializeOpListRealtimeLogConfigs struct { } -func (*awsRestxml_deserializeOpListStreamingDistributions) ID() string { +func (*awsRestxml_deserializeOpListRealtimeLogConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListStreamingDistributions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListRealtimeLogConfigs) 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) @@ -13664,9 +14798,9 @@ func (m *awsRestxml_deserializeOpListStreamingDistributions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListStreamingDistributions(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListRealtimeLogConfigs(response, &metadata) } - output := &ListStreamingDistributionsOutput{} + output := &ListRealtimeLogConfigsOutput{} out.Result = output var buff [1024]byte @@ -13687,7 +14821,7 @@ func (m *awsRestxml_deserializeOpListStreamingDistributions) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentStreamingDistributionList(&output.StreamingDistributionList, decoder) + err = awsRestxml_deserializeDocumentRealtimeLogConfigs(&output.RealtimeLogConfigs, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13701,7 +14835,7 @@ func (m *awsRestxml_deserializeOpListStreamingDistributions) HandleDeserialize(c return out, metadata, err } -func awsRestxml_deserializeOpErrorListStreamingDistributions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListRealtimeLogConfigs(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)} @@ -13726,9 +14860,15 @@ func awsRestxml_deserializeOpErrorListStreamingDistributions(response *smithyhtt } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13739,13 +14879,13 @@ func awsRestxml_deserializeOpErrorListStreamingDistributions(response *smithyhtt } } -func awsRestxml_deserializeOpDocumentListStreamingDistributionsOutput(v **ListStreamingDistributionsOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListRealtimeLogConfigsOutput(v **ListRealtimeLogConfigsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListStreamingDistributionsOutput + var sv *ListRealtimeLogConfigsOutput if *v == nil { - sv = &ListStreamingDistributionsOutput{} + sv = &ListRealtimeLogConfigsOutput{} } else { sv = *v } @@ -13761,9 +14901,9 @@ func awsRestxml_deserializeOpDocumentListStreamingDistributionsOutput(v **ListSt originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("StreamingDistributionList", t.Name.Local): + case strings.EqualFold("RealtimeLogConfigs", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentStreamingDistributionList(&sv.StreamingDistributionList, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentRealtimeLogConfigs(&sv.RealtimeLogConfigs, nodeDecoder); err != nil { return err } @@ -13781,14 +14921,14 @@ func awsRestxml_deserializeOpDocumentListStreamingDistributionsOutput(v **ListSt return nil } -type awsRestxml_deserializeOpListTagsForResource struct { +type awsRestxml_deserializeOpListResponseHeadersPolicies struct { } -func (*awsRestxml_deserializeOpListTagsForResource) ID() string { +func (*awsRestxml_deserializeOpListResponseHeadersPolicies) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListResponseHeadersPolicies) 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) @@ -13806,9 +14946,9 @@ func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListResponseHeadersPolicies(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListResponseHeadersPoliciesOutput{} out.Result = output var buff [1024]byte @@ -13829,7 +14969,7 @@ func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx cont } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentTags(&output.Tags, decoder) + err = awsRestxml_deserializeDocumentResponseHeadersPolicyList(&output.ResponseHeadersPolicyList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13843,7 +14983,7 @@ func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestxml_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListResponseHeadersPolicies(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)} @@ -13874,11 +15014,8 @@ func awsRestxml_deserializeOpErrorListTagsForResource(response *smithyhttp.Respo case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("InvalidTagging", errorCode): - return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) - - case strings.EqualFold("NoSuchResource", errorCode): - return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13890,13 +15027,13 @@ func awsRestxml_deserializeOpErrorListTagsForResource(response *smithyhttp.Respo } } -func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListResponseHeadersPoliciesOutput(v **ListResponseHeadersPoliciesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *ListTagsForResourceOutput + var sv *ListResponseHeadersPoliciesOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListResponseHeadersPoliciesOutput{} } else { sv = *v } @@ -13912,9 +15049,9 @@ func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForRe originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Tags", t.Name.Local): + case strings.EqualFold("ResponseHeadersPolicyList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTags(&sv.Tags, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyList(&sv.ResponseHeadersPolicyList, nodeDecoder); err != nil { return err } @@ -13932,14 +15069,14 @@ func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForRe return nil } -type awsRestxml_deserializeOpPublishFunction struct { +type awsRestxml_deserializeOpListStreamingDistributions struct { } -func (*awsRestxml_deserializeOpPublishFunction) ID() string { +func (*awsRestxml_deserializeOpListStreamingDistributions) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpPublishFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListStreamingDistributions) 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) @@ -13957,9 +15094,9 @@ func (m *awsRestxml_deserializeOpPublishFunction) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorPublishFunction(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListStreamingDistributions(response, &metadata) } - output := &PublishFunctionOutput{} + output := &ListStreamingDistributionsOutput{} out.Result = output var buff [1024]byte @@ -13980,7 +15117,7 @@ func (m *awsRestxml_deserializeOpPublishFunction) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentFunctionSummary(&output.FunctionSummary, decoder) + err = awsRestxml_deserializeDocumentStreamingDistributionList(&output.StreamingDistributionList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13994,7 +15131,7 @@ func (m *awsRestxml_deserializeOpPublishFunction) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestxml_deserializeOpErrorPublishFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListStreamingDistributions(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)} @@ -14022,18 +15159,6 @@ func awsRestxml_deserializeOpErrorPublishFunction(response *smithyhttp.Response, case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - case strings.EqualFold("InvalidIfMatchVersion", errorCode): - return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) - - case strings.EqualFold("NoSuchFunctionExists", errorCode): - return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) - - case strings.EqualFold("PreconditionFailed", errorCode): - return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) - - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -14044,13 +15169,13 @@ func awsRestxml_deserializeOpErrorPublishFunction(response *smithyhttp.Response, } } -func awsRestxml_deserializeOpDocumentPublishFunctionOutput(v **PublishFunctionOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListStreamingDistributionsOutput(v **ListStreamingDistributionsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *PublishFunctionOutput + var sv *ListStreamingDistributionsOutput if *v == nil { - sv = &PublishFunctionOutput{} + sv = &ListStreamingDistributionsOutput{} } else { sv = *v } @@ -14066,9 +15191,9 @@ func awsRestxml_deserializeOpDocumentPublishFunctionOutput(v **PublishFunctionOu originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("FunctionSummary", t.Name.Local): + case strings.EqualFold("StreamingDistributionList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentStreamingDistributionList(&sv.StreamingDistributionList, nodeDecoder); err != nil { return err } @@ -14086,14 +15211,14 @@ func awsRestxml_deserializeOpDocumentPublishFunctionOutput(v **PublishFunctionOu return nil } -type awsRestxml_deserializeOpTagResource struct { +type awsRestxml_deserializeOpListTagsForResource struct { } -func (*awsRestxml_deserializeOpTagResource) ID() string { +func (*awsRestxml_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14111,14 +15236,36 @@ func (m *awsRestxml_deserializeOpTagResource) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &TagResourceOutput{} + output := &ListTagsForResourceOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentTags(&output.Tags, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -14126,7 +15273,7 @@ func (m *awsRestxml_deserializeOpTagResource) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestxml_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14173,14 +15320,56 @@ func awsRestxml_deserializeOpErrorTagResource(response *smithyhttp.Response, met } } -type awsRestxml_deserializeOpTestFunction struct { +func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTags(&sv.Tags, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil } -func (*awsRestxml_deserializeOpTestFunction) ID() string { +type awsRestxml_deserializeOpListVpcOrigins struct { +} + +func (*awsRestxml_deserializeOpListVpcOrigins) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpTestFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpListVpcOrigins) 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) @@ -14198,9 +15387,9 @@ func (m *awsRestxml_deserializeOpTestFunction) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorTestFunction(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorListVpcOrigins(response, &metadata) } - output := &TestFunctionOutput{} + output := &ListVpcOriginsOutput{} out.Result = output var buff [1024]byte @@ -14221,7 +15410,7 @@ func (m *awsRestxml_deserializeOpTestFunction) HandleDeserialize(ctx context.Con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentTestResult(&output.TestResult, decoder) + err = awsRestxml_deserializeDocumentVpcOriginList(&output.VpcOriginList, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14235,7 +15424,7 @@ func (m *awsRestxml_deserializeOpTestFunction) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestxml_deserializeOpErrorTestFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorListVpcOrigins(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)} @@ -14260,17 +15449,14 @@ func awsRestxml_deserializeOpErrorTestFunction(response *smithyhttp.Response, me } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("InvalidArgument", errorCode): - return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - - case strings.EqualFold("InvalidIfMatchVersion", errorCode): - return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - case strings.EqualFold("NoSuchFunctionExists", errorCode): - return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) - case strings.EqualFold("TestFunctionFailed", errorCode): - return awsRestxml_deserializeErrorTestFunctionFailed(response, errorBody) + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) case strings.EqualFold("UnsupportedOperation", errorCode): return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) @@ -14285,13 +15471,13 @@ func awsRestxml_deserializeOpErrorTestFunction(response *smithyhttp.Response, me } } -func awsRestxml_deserializeOpDocumentTestFunctionOutput(v **TestFunctionOutput, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeOpDocumentListVpcOriginsOutput(v **ListVpcOriginsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *TestFunctionOutput + var sv *ListVpcOriginsOutput if *v == nil { - sv = &TestFunctionOutput{} + sv = &ListVpcOriginsOutput{} } else { sv = *v } @@ -14307,9 +15493,9 @@ func awsRestxml_deserializeOpDocumentTestFunctionOutput(v **TestFunctionOutput, originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("TestResult", t.Name.Local): + case strings.EqualFold("VpcOriginList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTestResult(&sv.TestResult, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentVpcOriginList(&sv.VpcOriginList, nodeDecoder); err != nil { return err } @@ -14327,101 +15513,14 @@ func awsRestxml_deserializeOpDocumentTestFunctionOutput(v **TestFunctionOutput, return nil } -type awsRestxml_deserializeOpUntagResource struct { -} - -func (*awsRestxml_deserializeOpUntagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - 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, awsRestxml_deserializeOpErrorUntagResource(response, &metadata) - } - output := &UntagResourceOutput{} - 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), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("AccessDenied", errorCode): - return awsRestxml_deserializeErrorAccessDenied(response, errorBody) - - case strings.EqualFold("InvalidArgument", errorCode): - return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - - case strings.EqualFold("InvalidTagging", errorCode): - return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) - - case strings.EqualFold("NoSuchResource", errorCode): - return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpUpdateCachePolicy struct { +type awsRestxml_deserializeOpPublishFunction struct { } -func (*awsRestxml_deserializeOpUpdateCachePolicy) ID() string { +func (*awsRestxml_deserializeOpPublishFunction) ID() string { return "OperationDeserializer" } -func (m *awsRestxml_deserializeOpUpdateCachePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestxml_deserializeOpPublishFunction) 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) @@ -14439,16 +15538,11 @@ func (m *awsRestxml_deserializeOpUpdateCachePolicy) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorUpdateCachePolicy(response, &metadata) + return out, metadata, awsRestxml_deserializeOpErrorPublishFunction(response, &metadata) } - output := &UpdateCachePolicyOutput{} + output := &PublishFunctionOutput{} out.Result = output - err = awsRestxml_deserializeOpHttpBindingsUpdateCachePolicyOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) @@ -14467,7 +15561,7 @@ func (m *awsRestxml_deserializeOpUpdateCachePolicy) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeDocumentCachePolicy(&output.CachePolicy, decoder) + err = awsRestxml_deserializeDocumentFunctionSummary(&output.FunctionSummary, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14481,7 +15575,494 @@ func (m *awsRestxml_deserializeOpUpdateCachePolicy) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestxml_deserializeOpErrorUpdateCachePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestxml_deserializeOpErrorPublishFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentPublishFunctionOutput(v **PublishFunctionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *PublishFunctionOutput + if *v == nil { + sv = &PublishFunctionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FunctionSummary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpTagResource struct { +} + +func (*awsRestxml_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpTestFunction struct { +} + +func (*awsRestxml_deserializeOpTestFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpTestFunction) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorTestFunction(response, &metadata) + } + output := &TestFunctionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentTestResult(&output.TestResult, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorTestFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("TestFunctionFailed", errorCode): + return awsRestxml_deserializeErrorTestFunctionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentTestFunctionOutput(v **TestFunctionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *TestFunctionOutput + if *v == nil { + sv = &TestFunctionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TestResult", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTestResult(&sv.TestResult, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUntagResource struct { +} + +func (*awsRestxml_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpUpdateCachePolicy struct { +} + +func (*awsRestxml_deserializeOpUpdateCachePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateCachePolicy) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsRestxml_deserializeOpErrorUpdateCachePolicy(response, &metadata) + } + output := &UpdateCachePolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateCachePolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCachePolicy(&output.CachePolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateCachePolicy(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)} @@ -15061,6 +16642,9 @@ func awsRestxml_deserializeOpErrorUpdateDistribution(response *smithyhttp.Respon case strings.EqualFold("ContinuousDeploymentPolicyInUse", errorCode): return awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response, errorBody) + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) @@ -15412,6 +16996,9 @@ func awsRestxml_deserializeOpErrorUpdateDistributionWithStagingConfig(response * case strings.EqualFold("CNAMEAlreadyExists", errorCode): return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) @@ -17634,96 +19221,197 @@ func awsRestxml_deserializeOpDocumentUpdateStreamingDistributionOutput(v **Updat return nil } -func awsRestxml_deserializeErrorAccessDenied(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDenied{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } +type awsRestxml_deserializeOpUpdateVpcOrigin struct { +} + +func (*awsRestxml_deserializeOpUpdateVpcOrigin) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateVpcOrigin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } + return out, metadata, err } - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentAccessDenied(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorUpdateVpcOrigin(response, &metadata) } + output := &UpdateVpcOriginOutput{} + out.Result = output - return output -} + err = awsRestxml_deserializeOpHttpBindingsUpdateVpcOriginOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } -func awsRestxml_deserializeErrorBatchTooLarge(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.BatchTooLarge{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) rootDecoder := xml.NewDecoder(body) t, err := smithyxml.FetchRootElement(rootDecoder) if err == io.EOF { - return output + return out, metadata, nil } if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ + return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") + err = awsRestxml_deserializeDocumentVpcOrigin(&output.VpcOrigin, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ + return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } } - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentBatchTooLarge(&output, decoder) + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateVpcOrigin(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CannotUpdateEntityWhileInUse", errorCode): + return awsRestxml_deserializeErrorCannotUpdateEntityWhileInUse(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsRestxml_deserializeErrorEntityAlreadyExists(response, errorBody) + + case strings.EqualFold("EntityLimitExceeded", errorCode): + return awsRestxml_deserializeErrorEntityLimitExceeded(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + } +} - return output +func awsRestxml_deserializeOpHttpBindingsUpdateVpcOriginOutput(v *UpdateVpcOriginOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil } +func awsRestxml_deserializeOpDocumentUpdateVpcOriginOutput(v **UpdateVpcOriginOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateVpcOriginOutput + if *v == nil { + sv = &UpdateVpcOriginOutput{} + } else { + sv = *v + } -func awsRestxml_deserializeErrorCachePolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CachePolicyAlreadyExists{} + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("VpcOrigin", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVpcOrigin(&sv.VpcOrigin, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeErrorAccessDenied(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDenied{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17753,7 +19441,7 @@ func awsRestxml_deserializeErrorCachePolicyAlreadyExists(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCachePolicyAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentAccessDenied(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17766,8 +19454,8 @@ func awsRestxml_deserializeErrorCachePolicyAlreadyExists(response *smithyhttp.Re return output } -func awsRestxml_deserializeErrorCachePolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CachePolicyInUse{} +func awsRestxml_deserializeErrorBatchTooLarge(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BatchTooLarge{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17797,7 +19485,7 @@ func awsRestxml_deserializeErrorCachePolicyInUse(response *smithyhttp.Response, } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCachePolicyInUse(&output, decoder) + err = awsRestxml_deserializeDocumentBatchTooLarge(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17810,8 +19498,8 @@ func awsRestxml_deserializeErrorCachePolicyInUse(response *smithyhttp.Response, return output } -func awsRestxml_deserializeErrorCannotChangeImmutablePublicKeyFields(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CannotChangeImmutablePublicKeyFields{} +func awsRestxml_deserializeErrorCachePolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CachePolicyAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17841,7 +19529,7 @@ func awsRestxml_deserializeErrorCannotChangeImmutablePublicKeyFields(response *s } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCannotChangeImmutablePublicKeyFields(&output, decoder) + err = awsRestxml_deserializeDocumentCachePolicyAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17854,8 +19542,8 @@ func awsRestxml_deserializeErrorCannotChangeImmutablePublicKeyFields(response *s return output } -func awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CannotDeleteEntityWhileInUse{} +func awsRestxml_deserializeErrorCachePolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CachePolicyInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17885,7 +19573,7 @@ func awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response *smithyhtt } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCannotDeleteEntityWhileInUse(&output, decoder) + err = awsRestxml_deserializeDocumentCachePolicyInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17898,8 +19586,8 @@ func awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response *smithyhtt return output } -func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CloudFrontOriginAccessIdentityAlreadyExists{} +func awsRestxml_deserializeErrorCannotChangeImmutablePublicKeyFields(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CannotChangeImmutablePublicKeyFields{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17929,7 +19617,7 @@ func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityAlreadyExists(resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentCannotChangeImmutablePublicKeyFields(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17942,8 +19630,8 @@ func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityAlreadyExists(resp return output } -func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CloudFrontOriginAccessIdentityInUse{} +func awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CannotDeleteEntityWhileInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17973,7 +19661,7 @@ func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityInUse(&output, decoder) + err = awsRestxml_deserializeDocumentCannotDeleteEntityWhileInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17986,8 +19674,8 @@ func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response *sm return output } -func awsRestxml_deserializeErrorCNAMEAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CNAMEAlreadyExists{} +func awsRestxml_deserializeErrorCannotUpdateEntityWhileInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CannotUpdateEntityWhileInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18017,7 +19705,7 @@ func awsRestxml_deserializeErrorCNAMEAlreadyExists(response *smithyhttp.Response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCNAMEAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentCannotUpdateEntityWhileInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18030,8 +19718,8 @@ func awsRestxml_deserializeErrorCNAMEAlreadyExists(response *smithyhttp.Response return output } -func awsRestxml_deserializeErrorContinuousDeploymentPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ContinuousDeploymentPolicyAlreadyExists{} +func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CloudFrontOriginAccessIdentityAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18061,7 +19749,7 @@ func awsRestxml_deserializeErrorContinuousDeploymentPolicyAlreadyExists(response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18074,8 +19762,8 @@ func awsRestxml_deserializeErrorContinuousDeploymentPolicyAlreadyExists(response return output } -func awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ContinuousDeploymentPolicyInUse{} +func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CloudFrontOriginAccessIdentityInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18105,7 +19793,7 @@ func awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response *smithy } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyInUse(&output, decoder) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18118,8 +19806,8 @@ func awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response *smithy return output } -func awsRestxml_deserializeErrorDistributionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DistributionAlreadyExists{} +func awsRestxml_deserializeErrorCNAMEAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CNAMEAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18149,7 +19837,7 @@ func awsRestxml_deserializeErrorDistributionAlreadyExists(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDistributionAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentCNAMEAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18162,8 +19850,8 @@ func awsRestxml_deserializeErrorDistributionAlreadyExists(response *smithyhttp.R return output } -func awsRestxml_deserializeErrorDistributionNotDisabled(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DistributionNotDisabled{} +func awsRestxml_deserializeErrorContinuousDeploymentPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ContinuousDeploymentPolicyAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18193,7 +19881,7 @@ func awsRestxml_deserializeErrorDistributionNotDisabled(response *smithyhttp.Res } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDistributionNotDisabled(&output, decoder) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18206,8 +19894,8 @@ func awsRestxml_deserializeErrorDistributionNotDisabled(response *smithyhttp.Res return output } -func awsRestxml_deserializeErrorEntityAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.EntityAlreadyExists{} +func awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ContinuousDeploymentPolicyInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18237,7 +19925,7 @@ func awsRestxml_deserializeErrorEntityAlreadyExists(response *smithyhttp.Respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentEntityAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18250,8 +19938,8 @@ func awsRestxml_deserializeErrorEntityAlreadyExists(response *smithyhttp.Respons return output } -func awsRestxml_deserializeErrorEntityLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.EntityLimitExceeded{} +func awsRestxml_deserializeErrorDistributionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DistributionAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18281,7 +19969,7 @@ func awsRestxml_deserializeErrorEntityLimitExceeded(response *smithyhttp.Respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentEntityLimitExceeded(&output, decoder) + err = awsRestxml_deserializeDocumentDistributionAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18294,8 +19982,8 @@ func awsRestxml_deserializeErrorEntityLimitExceeded(response *smithyhttp.Respons return output } -func awsRestxml_deserializeErrorEntityNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.EntityNotFound{} +func awsRestxml_deserializeErrorDistributionNotDisabled(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DistributionNotDisabled{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18325,7 +20013,7 @@ func awsRestxml_deserializeErrorEntityNotFound(response *smithyhttp.Response, er } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentEntityNotFound(&output, decoder) + err = awsRestxml_deserializeDocumentDistributionNotDisabled(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18338,8 +20026,8 @@ func awsRestxml_deserializeErrorEntityNotFound(response *smithyhttp.Response, er return output } -func awsRestxml_deserializeErrorEntitySizeLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.EntitySizeLimitExceeded{} +func awsRestxml_deserializeErrorEntityAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18369,7 +20057,7 @@ func awsRestxml_deserializeErrorEntitySizeLimitExceeded(response *smithyhttp.Res } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentEntitySizeLimitExceeded(&output, decoder) + err = awsRestxml_deserializeDocumentEntityAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18382,8 +20070,8 @@ func awsRestxml_deserializeErrorEntitySizeLimitExceeded(response *smithyhttp.Res return output } -func awsRestxml_deserializeErrorFieldLevelEncryptionConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FieldLevelEncryptionConfigAlreadyExists{} +func awsRestxml_deserializeErrorEntityLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityLimitExceeded{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18413,7 +20101,7 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionConfigAlreadyExists(response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFieldLevelEncryptionConfigAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentEntityLimitExceeded(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18426,8 +20114,8 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionConfigAlreadyExists(response return output } -func awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FieldLevelEncryptionConfigInUse{} +func awsRestxml_deserializeErrorEntityNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityNotFound{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18457,7 +20145,7 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response *smithy } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFieldLevelEncryptionConfigInUse(&output, decoder) + err = awsRestxml_deserializeDocumentEntityNotFound(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18470,8 +20158,8 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response *smithy return output } -func awsRestxml_deserializeErrorFieldLevelEncryptionProfileAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FieldLevelEncryptionProfileAlreadyExists{} +func awsRestxml_deserializeErrorEntitySizeLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntitySizeLimitExceeded{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18501,7 +20189,7 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionProfileAlreadyExists(respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentEntitySizeLimitExceeded(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18514,8 +20202,8 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionProfileAlreadyExists(respons return output } -func awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FieldLevelEncryptionProfileInUse{} +func awsRestxml_deserializeErrorFieldLevelEncryptionConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionConfigAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18545,7 +20233,7 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileInUse(&output, decoder) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionConfigAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18558,8 +20246,8 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response *smith return output } -func awsRestxml_deserializeErrorFieldLevelEncryptionProfileSizeExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FieldLevelEncryptionProfileSizeExceeded{} +func awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionConfigInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18589,7 +20277,7 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionProfileSizeExceeded(response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSizeExceeded(&output, decoder) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionConfigInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18602,8 +20290,8 @@ func awsRestxml_deserializeErrorFieldLevelEncryptionProfileSizeExceeded(response return output } -func awsRestxml_deserializeErrorFunctionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FunctionAlreadyExists{} +func awsRestxml_deserializeErrorFieldLevelEncryptionProfileAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionProfileAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18633,7 +20321,7 @@ func awsRestxml_deserializeErrorFunctionAlreadyExists(response *smithyhttp.Respo } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFunctionAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18646,8 +20334,8 @@ func awsRestxml_deserializeErrorFunctionAlreadyExists(response *smithyhttp.Respo return output } -func awsRestxml_deserializeErrorFunctionInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FunctionInUse{} +func awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionProfileInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18677,7 +20365,7 @@ func awsRestxml_deserializeErrorFunctionInUse(response *smithyhttp.Response, err } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFunctionInUse(&output, decoder) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18690,8 +20378,8 @@ func awsRestxml_deserializeErrorFunctionInUse(response *smithyhttp.Response, err return output } -func awsRestxml_deserializeErrorFunctionSizeLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.FunctionSizeLimitExceeded{} +func awsRestxml_deserializeErrorFieldLevelEncryptionProfileSizeExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionProfileSizeExceeded{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18721,7 +20409,7 @@ func awsRestxml_deserializeErrorFunctionSizeLimitExceeded(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentFunctionSizeLimitExceeded(&output, decoder) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSizeExceeded(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18734,8 +20422,8 @@ func awsRestxml_deserializeErrorFunctionSizeLimitExceeded(response *smithyhttp.R return output } -func awsRestxml_deserializeErrorIllegalDelete(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IllegalDelete{} +func awsRestxml_deserializeErrorFunctionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FunctionAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18765,7 +20453,7 @@ func awsRestxml_deserializeErrorIllegalDelete(response *smithyhttp.Response, err } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentIllegalDelete(&output, decoder) + err = awsRestxml_deserializeDocumentFunctionAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18778,8 +20466,8 @@ func awsRestxml_deserializeErrorIllegalDelete(response *smithyhttp.Response, err return output } -func awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior{} +func awsRestxml_deserializeErrorFunctionInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FunctionInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18809,7 +20497,7 @@ func awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(&output, decoder) + err = awsRestxml_deserializeDocumentFunctionInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18822,8 +20510,8 @@ func awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWith return output } -func awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IllegalOriginAccessConfiguration{} +func awsRestxml_deserializeErrorFunctionSizeLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FunctionSizeLimitExceeded{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18853,7 +20541,7 @@ func awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentIllegalOriginAccessConfiguration(&output, decoder) + err = awsRestxml_deserializeDocumentFunctionSizeLimitExceeded(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18866,8 +20554,8 @@ func awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response *smith return output } -func awsRestxml_deserializeErrorIllegalUpdate(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IllegalUpdate{} +func awsRestxml_deserializeErrorIllegalDelete(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalDelete{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18897,7 +20585,7 @@ func awsRestxml_deserializeErrorIllegalUpdate(response *smithyhttp.Response, err } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentIllegalUpdate(&output, decoder) + err = awsRestxml_deserializeDocumentIllegalDelete(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18910,8 +20598,8 @@ func awsRestxml_deserializeErrorIllegalUpdate(response *smithyhttp.Response, err return output } -func awsRestxml_deserializeErrorInconsistentQuantities(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InconsistentQuantities{} +func awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18941,7 +20629,7 @@ func awsRestxml_deserializeErrorInconsistentQuantities(response *smithyhttp.Resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInconsistentQuantities(&output, decoder) + err = awsRestxml_deserializeDocumentIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18954,8 +20642,8 @@ func awsRestxml_deserializeErrorInconsistentQuantities(response *smithyhttp.Resp return output } -func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidArgument{} +func awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalOriginAccessConfiguration{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -18985,7 +20673,7 @@ func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, e } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidArgument(&output, decoder) + err = awsRestxml_deserializeDocumentIllegalOriginAccessConfiguration(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18998,8 +20686,8 @@ func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, e return output } -func awsRestxml_deserializeErrorInvalidDefaultRootObject(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidDefaultRootObject{} +func awsRestxml_deserializeErrorIllegalUpdate(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalUpdate{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19029,7 +20717,7 @@ func awsRestxml_deserializeErrorInvalidDefaultRootObject(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidDefaultRootObject(&output, decoder) + err = awsRestxml_deserializeDocumentIllegalUpdate(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19042,8 +20730,8 @@ func awsRestxml_deserializeErrorInvalidDefaultRootObject(response *smithyhttp.Re return output } -func awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidDomainNameForOriginAccessControl{} +func awsRestxml_deserializeErrorInconsistentQuantities(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InconsistentQuantities{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19073,7 +20761,7 @@ func awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidDomainNameForOriginAccessControl(&output, decoder) + err = awsRestxml_deserializeDocumentInconsistentQuantities(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19086,8 +20774,8 @@ func awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response return output } -func awsRestxml_deserializeErrorInvalidErrorCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidErrorCode{} +func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidArgument{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19117,7 +20805,7 @@ func awsRestxml_deserializeErrorInvalidErrorCode(response *smithyhttp.Response, } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidErrorCode(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidArgument(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19130,8 +20818,8 @@ func awsRestxml_deserializeErrorInvalidErrorCode(response *smithyhttp.Response, return output } -func awsRestxml_deserializeErrorInvalidForwardCookies(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidForwardCookies{} +func awsRestxml_deserializeErrorInvalidDefaultRootObject(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidDefaultRootObject{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19161,7 +20849,7 @@ func awsRestxml_deserializeErrorInvalidForwardCookies(response *smithyhttp.Respo } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidForwardCookies(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidDefaultRootObject(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19174,8 +20862,8 @@ func awsRestxml_deserializeErrorInvalidForwardCookies(response *smithyhttp.Respo return output } -func awsRestxml_deserializeErrorInvalidFunctionAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidFunctionAssociation{} +func awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidDomainNameForOriginAccessControl{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19205,7 +20893,7 @@ func awsRestxml_deserializeErrorInvalidFunctionAssociation(response *smithyhttp. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidFunctionAssociation(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidDomainNameForOriginAccessControl(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19218,8 +20906,8 @@ func awsRestxml_deserializeErrorInvalidFunctionAssociation(response *smithyhttp. return output } -func awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidGeoRestrictionParameter{} +func awsRestxml_deserializeErrorInvalidErrorCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidErrorCode{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19249,7 +20937,7 @@ func awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidGeoRestrictionParameter(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidErrorCode(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19262,8 +20950,8 @@ func awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response *smithyh return output } -func awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidHeadersForS3Origin{} +func awsRestxml_deserializeErrorInvalidForwardCookies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidForwardCookies{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19293,7 +20981,7 @@ func awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidHeadersForS3Origin(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidForwardCookies(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19306,8 +20994,8 @@ func awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response *smithyhttp.R return output } -func awsRestxml_deserializeErrorInvalidIfMatchVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidIfMatchVersion{} +func awsRestxml_deserializeErrorInvalidFunctionAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidFunctionAssociation{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19337,7 +21025,7 @@ func awsRestxml_deserializeErrorInvalidIfMatchVersion(response *smithyhttp.Respo } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidIfMatchVersion(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidFunctionAssociation(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19350,8 +21038,8 @@ func awsRestxml_deserializeErrorInvalidIfMatchVersion(response *smithyhttp.Respo return output } -func awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidLambdaFunctionAssociation{} +func awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidGeoRestrictionParameter{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19381,7 +21069,7 @@ func awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidLambdaFunctionAssociation(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidGeoRestrictionParameter(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19394,8 +21082,8 @@ func awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response *smith return output } -func awsRestxml_deserializeErrorInvalidLocationCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidLocationCode{} +func awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidHeadersForS3Origin{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19425,7 +21113,7 @@ func awsRestxml_deserializeErrorInvalidLocationCode(response *smithyhttp.Respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidLocationCode(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidHeadersForS3Origin(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19438,8 +21126,8 @@ func awsRestxml_deserializeErrorInvalidLocationCode(response *smithyhttp.Respons return output } -func awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidMinimumProtocolVersion{} +func awsRestxml_deserializeErrorInvalidIfMatchVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidIfMatchVersion{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19469,7 +21157,7 @@ func awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response *smithyht } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidMinimumProtocolVersion(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidIfMatchVersion(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19482,8 +21170,8 @@ func awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response *smithyht return output } -func awsRestxml_deserializeErrorInvalidOrigin(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidOrigin{} +func awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidLambdaFunctionAssociation{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19513,7 +21201,7 @@ func awsRestxml_deserializeErrorInvalidOrigin(response *smithyhttp.Response, err } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidOrigin(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidLambdaFunctionAssociation(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19526,8 +21214,8 @@ func awsRestxml_deserializeErrorInvalidOrigin(response *smithyhttp.Response, err return output } -func awsRestxml_deserializeErrorInvalidOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidOriginAccessControl{} +func awsRestxml_deserializeErrorInvalidLocationCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidLocationCode{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19557,7 +21245,7 @@ func awsRestxml_deserializeErrorInvalidOriginAccessControl(response *smithyhttp. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidOriginAccessControl(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidLocationCode(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19570,8 +21258,8 @@ func awsRestxml_deserializeErrorInvalidOriginAccessControl(response *smithyhttp. return output } -func awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidOriginAccessIdentity{} +func awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidMinimumProtocolVersion{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19601,7 +21289,7 @@ func awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidOriginAccessIdentity(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidMinimumProtocolVersion(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19614,8 +21302,8 @@ func awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response *smithyhttp return output } -func awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidOriginKeepaliveTimeout{} +func awsRestxml_deserializeErrorInvalidOrigin(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOrigin{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19645,7 +21333,7 @@ func awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response *smithyht } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidOriginKeepaliveTimeout(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidOrigin(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19658,8 +21346,8 @@ func awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response *smithyht return output } -func awsRestxml_deserializeErrorInvalidOriginReadTimeout(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidOriginReadTimeout{} +func awsRestxml_deserializeErrorInvalidOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginAccessControl{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19689,7 +21377,7 @@ func awsRestxml_deserializeErrorInvalidOriginReadTimeout(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidOriginReadTimeout(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidOriginAccessControl(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19702,8 +21390,8 @@ func awsRestxml_deserializeErrorInvalidOriginReadTimeout(response *smithyhttp.Re return output } -func awsRestxml_deserializeErrorInvalidProtocolSettings(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidProtocolSettings{} +func awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginAccessIdentity{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19733,7 +21421,7 @@ func awsRestxml_deserializeErrorInvalidProtocolSettings(response *smithyhttp.Res } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidProtocolSettings(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidOriginAccessIdentity(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19746,8 +21434,8 @@ func awsRestxml_deserializeErrorInvalidProtocolSettings(response *smithyhttp.Res return output } -func awsRestxml_deserializeErrorInvalidQueryStringParameters(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidQueryStringParameters{} +func awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginKeepaliveTimeout{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19777,7 +21465,7 @@ func awsRestxml_deserializeErrorInvalidQueryStringParameters(response *smithyhtt } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidQueryStringParameters(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidOriginKeepaliveTimeout(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19790,8 +21478,8 @@ func awsRestxml_deserializeErrorInvalidQueryStringParameters(response *smithyhtt return output } -func awsRestxml_deserializeErrorInvalidRelativePath(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRelativePath{} +func awsRestxml_deserializeErrorInvalidOriginReadTimeout(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginReadTimeout{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19821,7 +21509,7 @@ func awsRestxml_deserializeErrorInvalidRelativePath(response *smithyhttp.Respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidRelativePath(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidOriginReadTimeout(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19834,8 +21522,8 @@ func awsRestxml_deserializeErrorInvalidRelativePath(response *smithyhttp.Respons return output } -func awsRestxml_deserializeErrorInvalidRequiredProtocol(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRequiredProtocol{} +func awsRestxml_deserializeErrorInvalidProtocolSettings(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidProtocolSettings{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19865,7 +21553,7 @@ func awsRestxml_deserializeErrorInvalidRequiredProtocol(response *smithyhttp.Res } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidRequiredProtocol(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidProtocolSettings(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19878,8 +21566,8 @@ func awsRestxml_deserializeErrorInvalidRequiredProtocol(response *smithyhttp.Res return output } -func awsRestxml_deserializeErrorInvalidResponseCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidResponseCode{} +func awsRestxml_deserializeErrorInvalidQueryStringParameters(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidQueryStringParameters{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19909,7 +21597,7 @@ func awsRestxml_deserializeErrorInvalidResponseCode(response *smithyhttp.Respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidResponseCode(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidQueryStringParameters(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19922,8 +21610,8 @@ func awsRestxml_deserializeErrorInvalidResponseCode(response *smithyhttp.Respons return output } -func awsRestxml_deserializeErrorInvalidTagging(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidTagging{} +func awsRestxml_deserializeErrorInvalidRelativePath(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRelativePath{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19953,7 +21641,7 @@ func awsRestxml_deserializeErrorInvalidTagging(response *smithyhttp.Response, er } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidTagging(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidRelativePath(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19966,8 +21654,8 @@ func awsRestxml_deserializeErrorInvalidTagging(response *smithyhttp.Response, er return output } -func awsRestxml_deserializeErrorInvalidTTLOrder(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidTTLOrder{} +func awsRestxml_deserializeErrorInvalidRequiredProtocol(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRequiredProtocol{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -19997,7 +21685,7 @@ func awsRestxml_deserializeErrorInvalidTTLOrder(response *smithyhttp.Response, e } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidTTLOrder(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidRequiredProtocol(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20010,8 +21698,8 @@ func awsRestxml_deserializeErrorInvalidTTLOrder(response *smithyhttp.Response, e return output } -func awsRestxml_deserializeErrorInvalidViewerCertificate(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidViewerCertificate{} +func awsRestxml_deserializeErrorInvalidResponseCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidResponseCode{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20041,7 +21729,7 @@ func awsRestxml_deserializeErrorInvalidViewerCertificate(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidViewerCertificate(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidResponseCode(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20054,8 +21742,8 @@ func awsRestxml_deserializeErrorInvalidViewerCertificate(response *smithyhttp.Re return output } -func awsRestxml_deserializeErrorInvalidWebACLId(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidWebACLId{} +func awsRestxml_deserializeErrorInvalidTagging(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTagging{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20085,7 +21773,7 @@ func awsRestxml_deserializeErrorInvalidWebACLId(response *smithyhttp.Response, e } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidWebACLId(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidTagging(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20098,8 +21786,8 @@ func awsRestxml_deserializeErrorInvalidWebACLId(response *smithyhttp.Response, e return output } -func awsRestxml_deserializeErrorKeyGroupAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.KeyGroupAlreadyExists{} +func awsRestxml_deserializeErrorInvalidTTLOrder(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTTLOrder{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20129,7 +21817,7 @@ func awsRestxml_deserializeErrorKeyGroupAlreadyExists(response *smithyhttp.Respo } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentKeyGroupAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidTTLOrder(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20142,8 +21830,8 @@ func awsRestxml_deserializeErrorKeyGroupAlreadyExists(response *smithyhttp.Respo return output } -func awsRestxml_deserializeErrorMissingBody(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.MissingBody{} +func awsRestxml_deserializeErrorInvalidViewerCertificate(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidViewerCertificate{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20173,7 +21861,7 @@ func awsRestxml_deserializeErrorMissingBody(response *smithyhttp.Response, error } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentMissingBody(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidViewerCertificate(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20186,8 +21874,8 @@ func awsRestxml_deserializeErrorMissingBody(response *smithyhttp.Response, error return output } -func awsRestxml_deserializeErrorMonitoringSubscriptionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.MonitoringSubscriptionAlreadyExists{} +func awsRestxml_deserializeErrorInvalidWebACLId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidWebACLId{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20217,7 +21905,7 @@ func awsRestxml_deserializeErrorMonitoringSubscriptionAlreadyExists(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentMonitoringSubscriptionAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentInvalidWebACLId(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20230,8 +21918,8 @@ func awsRestxml_deserializeErrorMonitoringSubscriptionAlreadyExists(response *sm return output } -func awsRestxml_deserializeErrorNoSuchCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchCachePolicy{} +func awsRestxml_deserializeErrorKeyGroupAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KeyGroupAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20261,7 +21949,7 @@ func awsRestxml_deserializeErrorNoSuchCachePolicy(response *smithyhttp.Response, } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchCachePolicy(&output, decoder) + err = awsRestxml_deserializeDocumentKeyGroupAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20274,8 +21962,8 @@ func awsRestxml_deserializeErrorNoSuchCachePolicy(response *smithyhttp.Response, return output } -func awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchCloudFrontOriginAccessIdentity{} +func awsRestxml_deserializeErrorMissingBody(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MissingBody{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20305,7 +21993,7 @@ func awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response *s } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchCloudFrontOriginAccessIdentity(&output, decoder) + err = awsRestxml_deserializeDocumentMissingBody(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20318,8 +22006,8 @@ func awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response *s return output } -func awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchContinuousDeploymentPolicy{} +func awsRestxml_deserializeErrorMonitoringSubscriptionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MonitoringSubscriptionAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20349,7 +22037,7 @@ func awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchContinuousDeploymentPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentMonitoringSubscriptionAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20362,8 +22050,8 @@ func awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response *smith return output } -func awsRestxml_deserializeErrorNoSuchDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchDistribution{} +func awsRestxml_deserializeErrorNoSuchCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchCachePolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20393,7 +22081,7 @@ func awsRestxml_deserializeErrorNoSuchDistribution(response *smithyhttp.Response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchDistribution(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchCachePolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20406,8 +22094,8 @@ func awsRestxml_deserializeErrorNoSuchDistribution(response *smithyhttp.Response return output } -func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchFieldLevelEncryptionConfig{} +func awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchCloudFrontOriginAccessIdentity{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20437,7 +22125,7 @@ func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionConfig(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchCloudFrontOriginAccessIdentity(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20450,8 +22138,8 @@ func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response *smith return output } -func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchFieldLevelEncryptionProfile{} +func awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchContinuousDeploymentPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20481,7 +22169,7 @@ func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response *smit } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionProfile(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchContinuousDeploymentPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20494,8 +22182,8 @@ func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response *smit return output } -func awsRestxml_deserializeErrorNoSuchFunctionExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchFunctionExists{} +func awsRestxml_deserializeErrorNoSuchDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchDistribution{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20525,7 +22213,7 @@ func awsRestxml_deserializeErrorNoSuchFunctionExists(response *smithyhttp.Respon } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchFunctionExists(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchDistribution(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20538,8 +22226,8 @@ func awsRestxml_deserializeErrorNoSuchFunctionExists(response *smithyhttp.Respon return output } -func awsRestxml_deserializeErrorNoSuchInvalidation(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchInvalidation{} +func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchFieldLevelEncryptionConfig{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20569,7 +22257,7 @@ func awsRestxml_deserializeErrorNoSuchInvalidation(response *smithyhttp.Response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchInvalidation(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionConfig(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20582,8 +22270,8 @@ func awsRestxml_deserializeErrorNoSuchInvalidation(response *smithyhttp.Response return output } -func awsRestxml_deserializeErrorNoSuchMonitoringSubscription(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchMonitoringSubscription{} +func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchFieldLevelEncryptionProfile{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20613,7 +22301,7 @@ func awsRestxml_deserializeErrorNoSuchMonitoringSubscription(response *smithyhtt } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchMonitoringSubscription(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionProfile(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20626,8 +22314,8 @@ func awsRestxml_deserializeErrorNoSuchMonitoringSubscription(response *smithyhtt return output } -func awsRestxml_deserializeErrorNoSuchOrigin(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchOrigin{} +func awsRestxml_deserializeErrorNoSuchFunctionExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchFunctionExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20657,7 +22345,7 @@ func awsRestxml_deserializeErrorNoSuchOrigin(response *smithyhttp.Response, erro } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchOrigin(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchFunctionExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20670,8 +22358,8 @@ func awsRestxml_deserializeErrorNoSuchOrigin(response *smithyhttp.Response, erro return output } -func awsRestxml_deserializeErrorNoSuchOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchOriginAccessControl{} +func awsRestxml_deserializeErrorNoSuchInvalidation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchInvalidation{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20701,7 +22389,7 @@ func awsRestxml_deserializeErrorNoSuchOriginAccessControl(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchOriginAccessControl(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchInvalidation(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20714,8 +22402,8 @@ func awsRestxml_deserializeErrorNoSuchOriginAccessControl(response *smithyhttp.R return output } -func awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchOriginRequestPolicy{} +func awsRestxml_deserializeErrorNoSuchMonitoringSubscription(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchMonitoringSubscription{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20745,7 +22433,7 @@ func awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchOriginRequestPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchMonitoringSubscription(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20758,8 +22446,8 @@ func awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response *smithyhttp.R return output } -func awsRestxml_deserializeErrorNoSuchPublicKey(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchPublicKey{} +func awsRestxml_deserializeErrorNoSuchOrigin(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchOrigin{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20789,7 +22477,7 @@ func awsRestxml_deserializeErrorNoSuchPublicKey(response *smithyhttp.Response, e } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchPublicKey(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchOrigin(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20802,8 +22490,8 @@ func awsRestxml_deserializeErrorNoSuchPublicKey(response *smithyhttp.Response, e return output } -func awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchRealtimeLogConfig{} +func awsRestxml_deserializeErrorNoSuchOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchOriginAccessControl{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20833,7 +22521,7 @@ func awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response *smithyhttp.Res } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchRealtimeLogConfig(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchOriginAccessControl(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20846,8 +22534,8 @@ func awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response *smithyhttp.Res return output } -func awsRestxml_deserializeErrorNoSuchResource(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchResource{} +func awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchOriginRequestPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20877,7 +22565,7 @@ func awsRestxml_deserializeErrorNoSuchResource(response *smithyhttp.Response, er } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchResource(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchOriginRequestPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20890,8 +22578,8 @@ func awsRestxml_deserializeErrorNoSuchResource(response *smithyhttp.Response, er return output } -func awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchResponseHeadersPolicy{} +func awsRestxml_deserializeErrorNoSuchPublicKey(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchPublicKey{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20921,7 +22609,7 @@ func awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchResponseHeadersPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchPublicKey(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20934,8 +22622,8 @@ func awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response *smithyhttp return output } -func awsRestxml_deserializeErrorNoSuchStreamingDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchStreamingDistribution{} +func awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchRealtimeLogConfig{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -20965,7 +22653,7 @@ func awsRestxml_deserializeErrorNoSuchStreamingDistribution(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchStreamingDistribution(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchRealtimeLogConfig(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20978,8 +22666,8 @@ func awsRestxml_deserializeErrorNoSuchStreamingDistribution(response *smithyhttp return output } -func awsRestxml_deserializeErrorOriginAccessControlAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.OriginAccessControlAlreadyExists{} +func awsRestxml_deserializeErrorNoSuchResource(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchResource{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21009,7 +22697,7 @@ func awsRestxml_deserializeErrorOriginAccessControlAlreadyExists(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentOriginAccessControlAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchResource(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21022,8 +22710,8 @@ func awsRestxml_deserializeErrorOriginAccessControlAlreadyExists(response *smith return output } -func awsRestxml_deserializeErrorOriginAccessControlInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.OriginAccessControlInUse{} +func awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchResponseHeadersPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21053,7 +22741,7 @@ func awsRestxml_deserializeErrorOriginAccessControlInUse(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentOriginAccessControlInUse(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchResponseHeadersPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21066,8 +22754,8 @@ func awsRestxml_deserializeErrorOriginAccessControlInUse(response *smithyhttp.Re return output } -func awsRestxml_deserializeErrorOriginRequestPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.OriginRequestPolicyAlreadyExists{} +func awsRestxml_deserializeErrorNoSuchStreamingDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchStreamingDistribution{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21097,7 +22785,7 @@ func awsRestxml_deserializeErrorOriginRequestPolicyAlreadyExists(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentOriginRequestPolicyAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentNoSuchStreamingDistribution(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21110,8 +22798,8 @@ func awsRestxml_deserializeErrorOriginRequestPolicyAlreadyExists(response *smith return output } -func awsRestxml_deserializeErrorOriginRequestPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.OriginRequestPolicyInUse{} +func awsRestxml_deserializeErrorOriginAccessControlAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginAccessControlAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21141,7 +22829,7 @@ func awsRestxml_deserializeErrorOriginRequestPolicyInUse(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentOriginRequestPolicyInUse(&output, decoder) + err = awsRestxml_deserializeDocumentOriginAccessControlAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21154,8 +22842,8 @@ func awsRestxml_deserializeErrorOriginRequestPolicyInUse(response *smithyhttp.Re return output } -func awsRestxml_deserializeErrorPreconditionFailed(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.PreconditionFailed{} +func awsRestxml_deserializeErrorOriginAccessControlInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginAccessControlInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21185,7 +22873,7 @@ func awsRestxml_deserializeErrorPreconditionFailed(response *smithyhttp.Response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentPreconditionFailed(&output, decoder) + err = awsRestxml_deserializeDocumentOriginAccessControlInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21198,8 +22886,8 @@ func awsRestxml_deserializeErrorPreconditionFailed(response *smithyhttp.Response return output } -func awsRestxml_deserializeErrorPublicKeyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.PublicKeyAlreadyExists{} +func awsRestxml_deserializeErrorOriginRequestPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginRequestPolicyAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21229,7 +22917,7 @@ func awsRestxml_deserializeErrorPublicKeyAlreadyExists(response *smithyhttp.Resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentPublicKeyAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentOriginRequestPolicyAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21242,8 +22930,8 @@ func awsRestxml_deserializeErrorPublicKeyAlreadyExists(response *smithyhttp.Resp return output } -func awsRestxml_deserializeErrorPublicKeyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.PublicKeyInUse{} +func awsRestxml_deserializeErrorOriginRequestPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginRequestPolicyInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21273,7 +22961,7 @@ func awsRestxml_deserializeErrorPublicKeyInUse(response *smithyhttp.Response, er } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentPublicKeyInUse(&output, decoder) + err = awsRestxml_deserializeDocumentOriginRequestPolicyInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21286,8 +22974,8 @@ func awsRestxml_deserializeErrorPublicKeyInUse(response *smithyhttp.Response, er return output } -func awsRestxml_deserializeErrorQueryArgProfileEmpty(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.QueryArgProfileEmpty{} +func awsRestxml_deserializeErrorPreconditionFailed(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PreconditionFailed{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21317,7 +23005,7 @@ func awsRestxml_deserializeErrorQueryArgProfileEmpty(response *smithyhttp.Respon } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentQueryArgProfileEmpty(&output, decoder) + err = awsRestxml_deserializeDocumentPreconditionFailed(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21330,8 +23018,8 @@ func awsRestxml_deserializeErrorQueryArgProfileEmpty(response *smithyhttp.Respon return output } -func awsRestxml_deserializeErrorRealtimeLogConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.RealtimeLogConfigAlreadyExists{} +func awsRestxml_deserializeErrorPublicKeyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PublicKeyAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21361,7 +23049,7 @@ func awsRestxml_deserializeErrorRealtimeLogConfigAlreadyExists(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentRealtimeLogConfigAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentPublicKeyAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21374,8 +23062,8 @@ func awsRestxml_deserializeErrorRealtimeLogConfigAlreadyExists(response *smithyh return output } -func awsRestxml_deserializeErrorRealtimeLogConfigInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.RealtimeLogConfigInUse{} +func awsRestxml_deserializeErrorPublicKeyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PublicKeyInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21405,7 +23093,7 @@ func awsRestxml_deserializeErrorRealtimeLogConfigInUse(response *smithyhttp.Resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentRealtimeLogConfigInUse(&output, decoder) + err = awsRestxml_deserializeDocumentPublicKeyInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21418,8 +23106,8 @@ func awsRestxml_deserializeErrorRealtimeLogConfigInUse(response *smithyhttp.Resp return output } -func awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.RealtimeLogConfigOwnerMismatch{} +func awsRestxml_deserializeErrorQueryArgProfileEmpty(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.QueryArgProfileEmpty{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21449,7 +23137,7 @@ func awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentRealtimeLogConfigOwnerMismatch(&output, decoder) + err = awsRestxml_deserializeDocumentQueryArgProfileEmpty(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21462,8 +23150,8 @@ func awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response *smithyh return output } -func awsRestxml_deserializeErrorResourceInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceInUse{} +func awsRestxml_deserializeErrorRealtimeLogConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RealtimeLogConfigAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21493,7 +23181,7 @@ func awsRestxml_deserializeErrorResourceInUse(response *smithyhttp.Response, err } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentResourceInUse(&output, decoder) + err = awsRestxml_deserializeDocumentRealtimeLogConfigAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21506,8 +23194,8 @@ func awsRestxml_deserializeErrorResourceInUse(response *smithyhttp.Response, err return output } -func awsRestxml_deserializeErrorResponseHeadersPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResponseHeadersPolicyAlreadyExists{} +func awsRestxml_deserializeErrorRealtimeLogConfigInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RealtimeLogConfigInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21537,7 +23225,7 @@ func awsRestxml_deserializeErrorResponseHeadersPolicyAlreadyExists(response *smi } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentResponseHeadersPolicyAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentRealtimeLogConfigInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21550,8 +23238,8 @@ func awsRestxml_deserializeErrorResponseHeadersPolicyAlreadyExists(response *smi return output } -func awsRestxml_deserializeErrorResponseHeadersPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResponseHeadersPolicyInUse{} +func awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RealtimeLogConfigOwnerMismatch{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21581,7 +23269,7 @@ func awsRestxml_deserializeErrorResponseHeadersPolicyInUse(response *smithyhttp. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentResponseHeadersPolicyInUse(&output, decoder) + err = awsRestxml_deserializeDocumentRealtimeLogConfigOwnerMismatch(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21594,8 +23282,8 @@ func awsRestxml_deserializeErrorResponseHeadersPolicyInUse(response *smithyhttp. return output } -func awsRestxml_deserializeErrorStagingDistributionInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.StagingDistributionInUse{} +func awsRestxml_deserializeErrorResourceInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21625,7 +23313,7 @@ func awsRestxml_deserializeErrorStagingDistributionInUse(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentStagingDistributionInUse(&output, decoder) + err = awsRestxml_deserializeDocumentResourceInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21638,8 +23326,8 @@ func awsRestxml_deserializeErrorStagingDistributionInUse(response *smithyhttp.Re return output } -func awsRestxml_deserializeErrorStreamingDistributionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.StreamingDistributionAlreadyExists{} +func awsRestxml_deserializeErrorResponseHeadersPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResponseHeadersPolicyAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21669,7 +23357,7 @@ func awsRestxml_deserializeErrorStreamingDistributionAlreadyExists(response *smi } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentStreamingDistributionAlreadyExists(&output, decoder) + err = awsRestxml_deserializeDocumentResponseHeadersPolicyAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21682,8 +23370,8 @@ func awsRestxml_deserializeErrorStreamingDistributionAlreadyExists(response *smi return output } -func awsRestxml_deserializeErrorStreamingDistributionNotDisabled(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.StreamingDistributionNotDisabled{} +func awsRestxml_deserializeErrorResponseHeadersPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResponseHeadersPolicyInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21713,7 +23401,7 @@ func awsRestxml_deserializeErrorStreamingDistributionNotDisabled(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentStreamingDistributionNotDisabled(&output, decoder) + err = awsRestxml_deserializeDocumentResponseHeadersPolicyInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21726,8 +23414,8 @@ func awsRestxml_deserializeErrorStreamingDistributionNotDisabled(response *smith return output } -func awsRestxml_deserializeErrorTestFunctionFailed(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TestFunctionFailed{} +func awsRestxml_deserializeErrorStagingDistributionInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.StagingDistributionInUse{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21757,7 +23445,7 @@ func awsRestxml_deserializeErrorTestFunctionFailed(response *smithyhttp.Response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTestFunctionFailed(&output, decoder) + err = awsRestxml_deserializeDocumentStagingDistributionInUse(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21770,8 +23458,8 @@ func awsRestxml_deserializeErrorTestFunctionFailed(response *smithyhttp.Response return output } -func awsRestxml_deserializeErrorTooLongCSPInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooLongCSPInResponseHeadersPolicy{} +func awsRestxml_deserializeErrorStreamingDistributionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.StreamingDistributionAlreadyExists{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21801,7 +23489,7 @@ func awsRestxml_deserializeErrorTooLongCSPInResponseHeadersPolicy(response *smit } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooLongCSPInResponseHeadersPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentStreamingDistributionAlreadyExists(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21814,8 +23502,8 @@ func awsRestxml_deserializeErrorTooLongCSPInResponseHeadersPolicy(response *smit return output } -func awsRestxml_deserializeErrorTooManyCacheBehaviors(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCacheBehaviors{} +func awsRestxml_deserializeErrorStreamingDistributionNotDisabled(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.StreamingDistributionNotDisabled{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21845,7 +23533,7 @@ func awsRestxml_deserializeErrorTooManyCacheBehaviors(response *smithyhttp.Respo } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCacheBehaviors(&output, decoder) + err = awsRestxml_deserializeDocumentStreamingDistributionNotDisabled(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21858,8 +23546,8 @@ func awsRestxml_deserializeErrorTooManyCacheBehaviors(response *smithyhttp.Respo return output } -func awsRestxml_deserializeErrorTooManyCachePolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCachePolicies{} +func awsRestxml_deserializeErrorTestFunctionFailed(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TestFunctionFailed{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21889,7 +23577,7 @@ func awsRestxml_deserializeErrorTooManyCachePolicies(response *smithyhttp.Respon } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCachePolicies(&output, decoder) + err = awsRestxml_deserializeDocumentTestFunctionFailed(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21902,8 +23590,8 @@ func awsRestxml_deserializeErrorTooManyCachePolicies(response *smithyhttp.Respon return output } -func awsRestxml_deserializeErrorTooManyCertificates(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCertificates{} +func awsRestxml_deserializeErrorTooLongCSPInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooLongCSPInResponseHeadersPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21933,7 +23621,7 @@ func awsRestxml_deserializeErrorTooManyCertificates(response *smithyhttp.Respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCertificates(&output, decoder) + err = awsRestxml_deserializeDocumentTooLongCSPInResponseHeadersPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21946,8 +23634,8 @@ func awsRestxml_deserializeErrorTooManyCertificates(response *smithyhttp.Respons return output } -func awsRestxml_deserializeErrorTooManyCloudFrontOriginAccessIdentities(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCloudFrontOriginAccessIdentities{} +func awsRestxml_deserializeErrorTooManyCacheBehaviors(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCacheBehaviors{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -21977,7 +23665,7 @@ func awsRestxml_deserializeErrorTooManyCloudFrontOriginAccessIdentities(response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCloudFrontOriginAccessIdentities(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCacheBehaviors(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21990,8 +23678,8 @@ func awsRestxml_deserializeErrorTooManyCloudFrontOriginAccessIdentities(response return output } -func awsRestxml_deserializeErrorTooManyContinuousDeploymentPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyContinuousDeploymentPolicies{} +func awsRestxml_deserializeErrorTooManyCachePolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCachePolicies{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22021,7 +23709,7 @@ func awsRestxml_deserializeErrorTooManyContinuousDeploymentPolicies(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyContinuousDeploymentPolicies(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCachePolicies(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22034,8 +23722,8 @@ func awsRestxml_deserializeErrorTooManyContinuousDeploymentPolicies(response *sm return output } -func awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCookieNamesInWhiteList{} +func awsRestxml_deserializeErrorTooManyCertificates(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCertificates{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22065,7 +23753,7 @@ func awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response *smithyht } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCookieNamesInWhiteList(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCertificates(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22078,8 +23766,8 @@ func awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response *smithyht return output } -func awsRestxml_deserializeErrorTooManyCookiesInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCookiesInCachePolicy{} +func awsRestxml_deserializeErrorTooManyCloudFrontOriginAccessIdentities(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCloudFrontOriginAccessIdentities{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22109,7 +23797,7 @@ func awsRestxml_deserializeErrorTooManyCookiesInCachePolicy(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCookiesInCachePolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCloudFrontOriginAccessIdentities(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22122,8 +23810,8 @@ func awsRestxml_deserializeErrorTooManyCookiesInCachePolicy(response *smithyhttp return output } -func awsRestxml_deserializeErrorTooManyCookiesInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCookiesInOriginRequestPolicy{} +func awsRestxml_deserializeErrorTooManyContinuousDeploymentPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyContinuousDeploymentPolicies{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22153,7 +23841,7 @@ func awsRestxml_deserializeErrorTooManyCookiesInOriginRequestPolicy(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCookiesInOriginRequestPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyContinuousDeploymentPolicies(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22166,8 +23854,8 @@ func awsRestxml_deserializeErrorTooManyCookiesInOriginRequestPolicy(response *sm return output } -func awsRestxml_deserializeErrorTooManyCustomHeadersInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyCustomHeadersInResponseHeadersPolicy{} +func awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCookieNamesInWhiteList{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22197,7 +23885,7 @@ func awsRestxml_deserializeErrorTooManyCustomHeadersInResponseHeadersPolicy(resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyCustomHeadersInResponseHeadersPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCookieNamesInWhiteList(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22210,8 +23898,8 @@ func awsRestxml_deserializeErrorTooManyCustomHeadersInResponseHeadersPolicy(resp return output } -func awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionCNAMEs{} +func awsRestxml_deserializeErrorTooManyCookiesInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCookiesInCachePolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22241,7 +23929,7 @@ func awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionCNAMEs(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCookiesInCachePolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22254,8 +23942,8 @@ func awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response *smithyhttp.R return output } -func awsRestxml_deserializeErrorTooManyDistributions(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributions{} +func awsRestxml_deserializeErrorTooManyCookiesInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCookiesInOriginRequestPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22285,7 +23973,7 @@ func awsRestxml_deserializeErrorTooManyDistributions(response *smithyhttp.Respon } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributions(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCookiesInOriginRequestPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22298,8 +23986,8 @@ func awsRestxml_deserializeErrorTooManyDistributions(response *smithyhttp.Respon return output } -func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsAssociatedToCachePolicy{} +func awsRestxml_deserializeErrorTooManyCustomHeadersInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCustomHeadersInResponseHeadersPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22329,7 +24017,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToCachePolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyCustomHeadersInResponseHeadersPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22342,8 +24030,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(resp return output } -func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig{} +func awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionCNAMEs{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22373,7 +24061,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionCNAMEs(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22386,8 +24074,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryp return output } -func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsAssociatedToKeyGroup{} +func awsRestxml_deserializeErrorTooManyDistributions(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributions{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22417,7 +24105,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToKeyGroup(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributions(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22430,8 +24118,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(respons return output } -func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsAssociatedToOriginAccessControl{} +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToCachePolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22461,7 +24149,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessCont } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginAccessControl(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToCachePolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22474,8 +24162,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessCont return output } -func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsAssociatedToOriginRequestPolicy{} +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22505,7 +24193,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPol } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginRequestPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22518,8 +24206,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPol return output } -func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsAssociatedToResponseHeadersPolicy{} +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToKeyGroup{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22549,7 +24237,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersP } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToResponseHeadersPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToKeyGroup(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22562,8 +24250,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersP return output } -func awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsWithFunctionAssociations{} +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToOriginAccessControl{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22593,7 +24281,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(res } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsWithFunctionAssociations(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginAccessControl(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22606,8 +24294,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(res return output } -func awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsWithLambdaAssociations{} +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToOriginRequestPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22637,7 +24325,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(respo } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsWithLambdaAssociations(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginRequestPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22650,8 +24338,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(respo return output } -func awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyDistributionsWithSingleFunctionARN{} +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToResponseHeadersPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22681,7 +24369,7 @@ func awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(respon } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyDistributionsWithSingleFunctionARN(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToResponseHeadersPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22694,8 +24382,8 @@ func awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(respon return output } -func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionConfigs(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFieldLevelEncryptionConfigs{} +func awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsWithFunctionAssociations{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22725,7 +24413,7 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionConfigs(response *smi } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionConfigs(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsWithFunctionAssociations(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22738,8 +24426,8 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionConfigs(response *smi return output } -func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionContentTypeProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFieldLevelEncryptionContentTypeProfiles{} +func awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsWithLambdaAssociations{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22769,7 +24457,7 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionContentTypeProfiles(r } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionContentTypeProfiles(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsWithLambdaAssociations(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22782,8 +24470,8 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionContentTypeProfiles(r return output } -func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionEncryptionEntities(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFieldLevelEncryptionEncryptionEntities{} +func awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsWithSingleFunctionARN{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22813,7 +24501,7 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionEncryptionEntities(re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionEncryptionEntities(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyDistributionsWithSingleFunctionARN(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22826,8 +24514,8 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionEncryptionEntities(re return output } -func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionFieldPatterns(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFieldLevelEncryptionFieldPatterns{} +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionConfigs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionConfigs{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22857,7 +24545,7 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionFieldPatterns(respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionFieldPatterns(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionConfigs(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22870,8 +24558,8 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionFieldPatterns(respons return output } -func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFieldLevelEncryptionProfiles{} +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionContentTypeProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionContentTypeProfiles{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22901,7 +24589,7 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionProfiles(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionProfiles(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionContentTypeProfiles(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22914,8 +24602,8 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionProfiles(response *sm return output } -func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionQueryArgProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFieldLevelEncryptionQueryArgProfiles{} +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionEncryptionEntities(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionEncryptionEntities{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22945,7 +24633,7 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionQueryArgProfiles(resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionQueryArgProfiles(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionEncryptionEntities(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22958,8 +24646,8 @@ func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionQueryArgProfiles(resp return output } -func awsRestxml_deserializeErrorTooManyFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFunctionAssociations{} +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionFieldPatterns(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionFieldPatterns{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -22989,7 +24677,7 @@ func awsRestxml_deserializeErrorTooManyFunctionAssociations(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFunctionAssociations(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionFieldPatterns(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23002,8 +24690,8 @@ func awsRestxml_deserializeErrorTooManyFunctionAssociations(response *smithyhttp return output } -func awsRestxml_deserializeErrorTooManyFunctions(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyFunctions{} +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionProfiles{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23033,7 +24721,7 @@ func awsRestxml_deserializeErrorTooManyFunctions(response *smithyhttp.Response, } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyFunctions(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionProfiles(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23046,8 +24734,8 @@ func awsRestxml_deserializeErrorTooManyFunctions(response *smithyhttp.Response, return output } -func awsRestxml_deserializeErrorTooManyHeadersInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyHeadersInCachePolicy{} +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionQueryArgProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionQueryArgProfiles{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23077,7 +24765,7 @@ func awsRestxml_deserializeErrorTooManyHeadersInCachePolicy(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyHeadersInCachePolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionQueryArgProfiles(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23090,8 +24778,8 @@ func awsRestxml_deserializeErrorTooManyHeadersInCachePolicy(response *smithyhttp return output } -func awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyHeadersInForwardedValues{} +func awsRestxml_deserializeErrorTooManyFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFunctionAssociations{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23121,7 +24809,7 @@ func awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response *smithy } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyHeadersInForwardedValues(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFunctionAssociations(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23134,8 +24822,8 @@ func awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response *smithy return output } -func awsRestxml_deserializeErrorTooManyHeadersInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyHeadersInOriginRequestPolicy{} +func awsRestxml_deserializeErrorTooManyFunctions(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFunctions{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23165,7 +24853,7 @@ func awsRestxml_deserializeErrorTooManyHeadersInOriginRequestPolicy(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyHeadersInOriginRequestPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyFunctions(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23178,8 +24866,8 @@ func awsRestxml_deserializeErrorTooManyHeadersInOriginRequestPolicy(response *sm return output } -func awsRestxml_deserializeErrorTooManyInvalidationsInProgress(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyInvalidationsInProgress{} +func awsRestxml_deserializeErrorTooManyHeadersInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHeadersInCachePolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23209,7 +24897,7 @@ func awsRestxml_deserializeErrorTooManyInvalidationsInProgress(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyInvalidationsInProgress(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyHeadersInCachePolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23222,8 +24910,8 @@ func awsRestxml_deserializeErrorTooManyInvalidationsInProgress(response *smithyh return output } -func awsRestxml_deserializeErrorTooManyKeyGroups(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyKeyGroups{} +func awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHeadersInForwardedValues{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23253,7 +24941,7 @@ func awsRestxml_deserializeErrorTooManyKeyGroups(response *smithyhttp.Response, } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyKeyGroups(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyHeadersInForwardedValues(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23266,8 +24954,8 @@ func awsRestxml_deserializeErrorTooManyKeyGroups(response *smithyhttp.Response, return output } -func awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyKeyGroupsAssociatedToDistribution{} +func awsRestxml_deserializeErrorTooManyHeadersInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHeadersInOriginRequestPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23297,7 +24985,7 @@ func awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyKeyGroupsAssociatedToDistribution(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyHeadersInOriginRequestPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23310,8 +24998,8 @@ func awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(respons return output } -func awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyLambdaFunctionAssociations{} +func awsRestxml_deserializeErrorTooManyInvalidationsInProgress(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyInvalidationsInProgress{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23341,7 +25029,7 @@ func awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response *smit } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyLambdaFunctionAssociations(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyInvalidationsInProgress(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23354,8 +25042,8 @@ func awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response *smit return output } -func awsRestxml_deserializeErrorTooManyOriginAccessControls(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyOriginAccessControls{} +func awsRestxml_deserializeErrorTooManyKeyGroups(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyKeyGroups{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23385,7 +25073,7 @@ func awsRestxml_deserializeErrorTooManyOriginAccessControls(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyOriginAccessControls(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyKeyGroups(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23398,8 +25086,8 @@ func awsRestxml_deserializeErrorTooManyOriginAccessControls(response *smithyhttp return output } -func awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyOriginCustomHeaders{} +func awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyKeyGroupsAssociatedToDistribution{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23429,7 +25117,7 @@ func awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response *smithyhttp. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyOriginCustomHeaders(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyKeyGroupsAssociatedToDistribution(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23442,8 +25130,8 @@ func awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response *smithyhttp. return output } -func awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyOriginGroupsPerDistribution{} +func awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyLambdaFunctionAssociations{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23473,7 +25161,7 @@ func awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response *smi } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyOriginGroupsPerDistribution(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyLambdaFunctionAssociations(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23486,8 +25174,8 @@ func awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response *smi return output } -func awsRestxml_deserializeErrorTooManyOriginRequestPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyOriginRequestPolicies{} +func awsRestxml_deserializeErrorTooManyOriginAccessControls(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginAccessControls{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23517,7 +25205,7 @@ func awsRestxml_deserializeErrorTooManyOriginRequestPolicies(response *smithyhtt } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyOriginRequestPolicies(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyOriginAccessControls(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23530,8 +25218,8 @@ func awsRestxml_deserializeErrorTooManyOriginRequestPolicies(response *smithyhtt return output } -func awsRestxml_deserializeErrorTooManyOrigins(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyOrigins{} +func awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginCustomHeaders{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23561,7 +25249,7 @@ func awsRestxml_deserializeErrorTooManyOrigins(response *smithyhttp.Response, er } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyOrigins(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyOriginCustomHeaders(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23574,8 +25262,8 @@ func awsRestxml_deserializeErrorTooManyOrigins(response *smithyhttp.Response, er return output } -func awsRestxml_deserializeErrorTooManyPublicKeys(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyPublicKeys{} +func awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginGroupsPerDistribution{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23605,7 +25293,7 @@ func awsRestxml_deserializeErrorTooManyPublicKeys(response *smithyhttp.Response, } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyPublicKeys(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyOriginGroupsPerDistribution(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23618,8 +25306,8 @@ func awsRestxml_deserializeErrorTooManyPublicKeys(response *smithyhttp.Response, return output } -func awsRestxml_deserializeErrorTooManyPublicKeysInKeyGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyPublicKeysInKeyGroup{} +func awsRestxml_deserializeErrorTooManyOriginRequestPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginRequestPolicies{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23649,7 +25337,7 @@ func awsRestxml_deserializeErrorTooManyPublicKeysInKeyGroup(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyPublicKeysInKeyGroup(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyOriginRequestPolicies(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23662,8 +25350,8 @@ func awsRestxml_deserializeErrorTooManyPublicKeysInKeyGroup(response *smithyhttp return output } -func awsRestxml_deserializeErrorTooManyQueryStringParameters(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyQueryStringParameters{} +func awsRestxml_deserializeErrorTooManyOrigins(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOrigins{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23693,7 +25381,7 @@ func awsRestxml_deserializeErrorTooManyQueryStringParameters(response *smithyhtt } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyQueryStringParameters(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyOrigins(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23706,8 +25394,8 @@ func awsRestxml_deserializeErrorTooManyQueryStringParameters(response *smithyhtt return output } -func awsRestxml_deserializeErrorTooManyQueryStringsInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyQueryStringsInCachePolicy{} +func awsRestxml_deserializeErrorTooManyPublicKeys(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyPublicKeys{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23737,7 +25425,7 @@ func awsRestxml_deserializeErrorTooManyQueryStringsInCachePolicy(response *smith } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyQueryStringsInCachePolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyPublicKeys(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23750,8 +25438,8 @@ func awsRestxml_deserializeErrorTooManyQueryStringsInCachePolicy(response *smith return output } -func awsRestxml_deserializeErrorTooManyQueryStringsInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyQueryStringsInOriginRequestPolicy{} +func awsRestxml_deserializeErrorTooManyPublicKeysInKeyGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyPublicKeysInKeyGroup{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23781,7 +25469,7 @@ func awsRestxml_deserializeErrorTooManyQueryStringsInOriginRequestPolicy(respons } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyQueryStringsInOriginRequestPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyPublicKeysInKeyGroup(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23794,8 +25482,8 @@ func awsRestxml_deserializeErrorTooManyQueryStringsInOriginRequestPolicy(respons return output } -func awsRestxml_deserializeErrorTooManyRealtimeLogConfigs(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyRealtimeLogConfigs{} +func awsRestxml_deserializeErrorTooManyQueryStringParameters(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyQueryStringParameters{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23825,7 +25513,7 @@ func awsRestxml_deserializeErrorTooManyRealtimeLogConfigs(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyQueryStringParameters(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23838,8 +25526,8 @@ func awsRestxml_deserializeErrorTooManyRealtimeLogConfigs(response *smithyhttp.R return output } -func awsRestxml_deserializeErrorTooManyRemoveHeadersInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyRemoveHeadersInResponseHeadersPolicy{} +func awsRestxml_deserializeErrorTooManyQueryStringsInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyQueryStringsInCachePolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23869,7 +25557,7 @@ func awsRestxml_deserializeErrorTooManyRemoveHeadersInResponseHeadersPolicy(resp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyRemoveHeadersInResponseHeadersPolicy(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyQueryStringsInCachePolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23882,8 +25570,8 @@ func awsRestxml_deserializeErrorTooManyRemoveHeadersInResponseHeadersPolicy(resp return output } -func awsRestxml_deserializeErrorTooManyResponseHeadersPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyResponseHeadersPolicies{} +func awsRestxml_deserializeErrorTooManyQueryStringsInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyQueryStringsInOriginRequestPolicy{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -23913,7 +25601,7 @@ func awsRestxml_deserializeErrorTooManyResponseHeadersPolicies(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(&output, decoder) + err = awsRestxml_deserializeDocumentTooManyQueryStringsInOriginRequestPolicy(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23926,8 +25614,140 @@ func awsRestxml_deserializeErrorTooManyResponseHeadersPolicies(response *smithyh return output } -func awsRestxml_deserializeErrorTooManyStreamingDistributionCNAMEs(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyStreamingDistributionCNAMEs{} +func awsRestxml_deserializeErrorTooManyRealtimeLogConfigs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRealtimeLogConfigs{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyRemoveHeadersInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRemoveHeadersInResponseHeadersPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyRemoveHeadersInResponseHeadersPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyResponseHeadersPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyResponseHeadersPolicies{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyStreamingDistributionCNAMEs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyStreamingDistributionCNAMEs{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -25043,142 +26863,13 @@ func awsRestxml_deserializeDocumentAllowedMethods(v **types.AllowedMethods, deco return nil } -func awsRestxml_deserializeDocumentAwsAccountNumberList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("AwsAccountNumber", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentAwsAccountNumberListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentBatchTooLarge(v **types.BatchTooLarge, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.BatchTooLarge - if *v == nil { - sv = &types.BatchTooLarge{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentAnycastIpList(v **types.AnycastIpList, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.CacheBehavior + var sv *types.AnycastIpList if *v == nil { - sv = &types.CacheBehavior{} + sv = &types.AnycastIpList{} } else { sv = *v } @@ -25194,13 +26885,13 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("AllowedMethods", t.Name.Local): + case strings.EqualFold("AnycastIps", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentAllowedMethods(&sv.AllowedMethods, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentAnycastIps(&sv.AnycastIps, nodeDecoder); err != nil { return err } - case strings.EqualFold("CachePolicyId", t.Name.Local): + case strings.EqualFold("Arn", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25210,10 +26901,10 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode } { xtv := string(val) - sv.CachePolicyId = ptr.String(xtv) + sv.Arn = ptr.String(xtv) } - case strings.EqualFold("Compress", t.Name.Local): + case strings.EqualFold("Id", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25222,14 +26913,11 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode break } { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) - } - sv.Compress = ptr.Bool(xtv) + xtv := string(val) + sv.Id = ptr.String(xtv) } - case strings.EqualFold("DefaultTTL", t.Name.Local): + case strings.EqualFold("IpCount", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25243,41 +26931,10 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode if err != nil { return err } - sv.DefaultTTL = ptr.Int64(i64) - } - - case strings.EqualFold("FieldLevelEncryptionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FieldLevelEncryptionId = ptr.String(xtv) - } - - case strings.EqualFold("ForwardedValues", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentForwardedValues(&sv.ForwardedValues, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("FunctionAssociations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentFunctionAssociations(&sv.FunctionAssociations, nodeDecoder); err != nil { - return err + sv.IpCount = ptr.Int32(int32(i64)) } - case strings.EqualFold("LambdaFunctionAssociations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentLambdaFunctionAssociations(&sv.LambdaFunctionAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("MaxTTL", t.Name.Local): + case strings.EqualFold("LastModifiedTime", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25287,14 +26944,14 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode } { xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) + t, err := smithytime.ParseDateTime(xtv) if err != nil { return err } - sv.MaxTTL = ptr.Int64(i64) + sv.LastModifiedTime = ptr.Time(t) } - case strings.EqualFold("MinTTL", t.Name.Local): + case strings.EqualFold("Name", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25304,14 +26961,10 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode } { xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MinTTL = ptr.Int64(i64) + sv.Name = ptr.String(xtv) } - case strings.EqualFold("OriginRequestPolicyId", t.Name.Local): + case strings.EqualFold("Status", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25321,23 +26974,46 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode } { xtv := string(val) - sv.OriginRequestPolicyId = ptr.String(xtv) + sv.Status = ptr.String(xtv) } - case strings.EqualFold("PathPattern", t.Name.Local): - val, err := decoder.Value() + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() if err != nil { return err } - if val == nil { - break - } - { - xtv := string(val) - sv.PathPattern = ptr.String(xtv) - } - case strings.EqualFold("RealtimeLogConfigArn", t.Name.Local): + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAnycastIpListCollection(v **types.AnycastIpListCollection, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AnycastIpListCollection + if *v == nil { + sv = &types.AnycastIpListCollection{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25346,11 +27022,20 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode break } { - xtv := string(val) - sv.RealtimeLogConfigArn = ptr.String(xtv) + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) } - case strings.EqualFold("ResponseHeadersPolicyId", t.Name.Local): + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAnycastIpListSummaries(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25360,10 +27045,10 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode } { xtv := string(val) - sv.ResponseHeadersPolicyId = ptr.String(xtv) + sv.Marker = ptr.String(xtv) } - case strings.EqualFold("SmoothStreaming", t.Name.Local): + case strings.EqualFold("MaxItems", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25372,14 +27057,15 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode break } { - xtv, err := strconv.ParseBool(string(val)) + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) if err != nil { - return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + return err } - sv.SmoothStreaming = ptr.Bool(xtv) + sv.MaxItems = ptr.Int32(int32(i64)) } - case strings.EqualFold("TargetOriginId", t.Name.Local): + case strings.EqualFold("NextMarker", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25389,22 +27075,10 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode } { xtv := string(val) - sv.TargetOriginId = ptr.String(xtv) - } - - case strings.EqualFold("TrustedKeyGroups", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrustedKeyGroups(&sv.TrustedKeyGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("TrustedSigners", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrustedSigners(&sv.TrustedSigners, nodeDecoder); err != nil { - return err + sv.NextMarker = ptr.String(xtv) } - case strings.EqualFold("ViewerProtocolPolicy", t.Name.Local): + case strings.EqualFold("Quantity", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25414,7 +27088,11 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode } { xtv := string(val) - sv.ViewerProtocolPolicy = types.ViewerProtocolPolicy(xtv) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) } default: @@ -25431,13 +27109,13 @@ func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decode return nil } -func awsRestxml_deserializeDocumentCacheBehaviorList(v *[]types.CacheBehavior, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentAnycastIpListSummaries(v *[]types.AnycastIpListSummary, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv []types.CacheBehavior + var sv []types.AnycastIpListSummary if *v == nil { - sv = make([]types.CacheBehavior, 0) + sv = make([]types.AnycastIpListSummary, 0) } else { sv = *v } @@ -25452,11 +27130,11 @@ func awsRestxml_deserializeDocumentCacheBehaviorList(v *[]types.CacheBehavior, d break } switch { - case strings.EqualFold("CacheBehavior", t.Name.Local): - var col types.CacheBehavior + case strings.EqualFold("AnycastIpListSummary", t.Name.Local): + var col types.AnycastIpListSummary nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) destAddr := &col - if err := awsRestxml_deserializeDocumentCacheBehavior(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentAnycastIpListSummary(&destAddr, nodeDecoder); err != nil { return err } col = *destAddr @@ -25475,22 +27153,22 @@ func awsRestxml_deserializeDocumentCacheBehaviorList(v *[]types.CacheBehavior, d return nil } -func awsRestxml_deserializeDocumentCacheBehaviorListUnwrapped(v *[]types.CacheBehavior, decoder smithyxml.NodeDecoder) error { - var sv []types.CacheBehavior +func awsRestxml_deserializeDocumentAnycastIpListSummariesUnwrapped(v *[]types.AnycastIpListSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.AnycastIpListSummary if *v == nil { - sv = make([]types.CacheBehavior, 0) + sv = make([]types.AnycastIpListSummary, 0) } else { sv = *v } switch { default: - var mv types.CacheBehavior + var mv types.AnycastIpListSummary t := decoder.StartEl _ = t nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) destAddr := &mv - if err := awsRestxml_deserializeDocumentCacheBehavior(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentAnycastIpListSummary(&destAddr, nodeDecoder); err != nil { return err } mv = *destAddr @@ -25499,13 +27177,13 @@ func awsRestxml_deserializeDocumentCacheBehaviorListUnwrapped(v *[]types.CacheBe *v = sv return nil } -func awsRestxml_deserializeDocumentCacheBehaviors(v **types.CacheBehaviors, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentAnycastIpListSummary(v **types.AnycastIpListSummary, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.CacheBehaviors + var sv *types.AnycastIpListSummary if *v == nil { - sv = &types.CacheBehaviors{} + sv = &types.AnycastIpListSummary{} } else { sv = *v } @@ -25521,13 +27199,33 @@ func awsRestxml_deserializeDocumentCacheBehaviors(v **types.CacheBehaviors, deco originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Items", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCacheBehaviorList(&sv.Items, nodeDecoder); err != nil { + case strings.EqualFold("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } - case strings.EqualFold("Quantity", t.Name.Local): + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("IpCount", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -25541,7 +27239,50 @@ func awsRestxml_deserializeDocumentCacheBehaviors(v **types.CacheBehaviors, deco if err != nil { return err } - sv.Quantity = ptr.Int32(int32(i64)) + sv.IpCount = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) } default: @@ -25558,17 +27299,18 @@ func awsRestxml_deserializeDocumentCacheBehaviors(v **types.CacheBehaviors, deco return nil } -func awsRestxml_deserializeDocumentCachedMethods(v **types.CachedMethods, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentAnycastIps(v *[]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.CachedMethods + var sv []string if *v == nil { - sv = &types.CachedMethods{} + sv = make([]string, 0) } else { sv = *v } + originalDecoder := decoder for { t, done, err := decoder.Token() if err != nil { @@ -25577,11 +27319,611 @@ func awsRestxml_deserializeDocumentCachedMethods(v **types.CachedMethods, decode if done { break } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder switch { - case strings.EqualFold("Items", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + case strings.EqualFold("AnycastIp", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAnycastIpsUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentAwsAccountNumberList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("AwsAccountNumber", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAwsAccountNumberListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentBatchTooLarge(v **types.BatchTooLarge, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.BatchTooLarge + if *v == nil { + sv = &types.BatchTooLarge{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CacheBehavior + if *v == nil { + sv = &types.CacheBehavior{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AllowedMethods", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAllowedMethods(&sv.AllowedMethods, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CachePolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CachePolicyId = ptr.String(xtv) + } + + case strings.EqualFold("Compress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Compress = ptr.Bool(xtv) + } + + case strings.EqualFold("DefaultTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.DefaultTTL = ptr.Int64(i64) + } + + case strings.EqualFold("FieldLevelEncryptionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FieldLevelEncryptionId = ptr.String(xtv) + } + + case strings.EqualFold("ForwardedValues", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentForwardedValues(&sv.ForwardedValues, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("FunctionAssociations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionAssociations(&sv.FunctionAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("GrpcConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentGrpcConfig(&sv.GrpcConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("LambdaFunctionAssociations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLambdaFunctionAssociations(&sv.LambdaFunctionAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxTTL = ptr.Int64(i64) + } + + case strings.EqualFold("MinTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MinTTL = ptr.Int64(i64) + } + + case strings.EqualFold("OriginRequestPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginRequestPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("PathPattern", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PathPattern = ptr.String(xtv) + } + + case strings.EqualFold("RealtimeLogConfigArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RealtimeLogConfigArn = ptr.String(xtv) + } + + case strings.EqualFold("ResponseHeadersPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResponseHeadersPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("SmoothStreaming", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.SmoothStreaming = ptr.Bool(xtv) + } + + case strings.EqualFold("TargetOriginId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetOriginId = ptr.String(xtv) + } + + case strings.EqualFold("TrustedKeyGroups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedKeyGroups(&sv.TrustedKeyGroups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrustedSigners", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedSigners(&sv.TrustedSigners, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ViewerProtocolPolicy", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ViewerProtocolPolicy = types.ViewerProtocolPolicy(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCacheBehaviorList(v *[]types.CacheBehavior, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CacheBehavior + if *v == nil { + sv = make([]types.CacheBehavior, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("CacheBehavior", t.Name.Local): + var col types.CacheBehavior + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCacheBehavior(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCacheBehaviorListUnwrapped(v *[]types.CacheBehavior, decoder smithyxml.NodeDecoder) error { + var sv []types.CacheBehavior + if *v == nil { + sv = make([]types.CacheBehavior, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CacheBehavior + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCacheBehavior(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCacheBehaviors(v **types.CacheBehaviors, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CacheBehaviors + if *v == nil { + sv = &types.CacheBehaviors{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCacheBehaviorList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachedMethods(v **types.CachedMethods, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachedMethods + if *v == nil { + sv = &types.CachedMethods{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsRestxml_deserializeDocumentMethodsList(&sv.Items, nodeDecoder); err != nil { return err } @@ -26016,280 +28358,329 @@ func awsRestxml_deserializeDocumentCachePolicyInUse(v **types.CachePolicyInUse, return nil } -func awsRestxml_deserializeDocumentCachePolicyList(v **types.CachePolicyList, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CachePolicyList - if *v == nil { - sv = &types.CachePolicyList{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Items", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCachePolicySummaryList(&sv.Items, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextMarker = ptr.String(xtv) - } - - case strings.EqualFold("Quantity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Quantity = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCachePolicyQueryStringsConfig(v **types.CachePolicyQueryStringsConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CachePolicyQueryStringsConfig - if *v == nil { - sv = &types.CachePolicyQueryStringsConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("QueryStringBehavior", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.QueryStringBehavior = types.CachePolicyQueryStringBehavior(xtv) - } - - case strings.EqualFold("QueryStrings", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentQueryStringNames(&sv.QueryStrings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCachePolicySummary(v **types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CachePolicySummary - if *v == nil { - sv = &types.CachePolicySummary{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CachePolicy", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.CachePolicyType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCachePolicySummaryList(v *[]types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CachePolicySummary - if *v == nil { - sv = make([]types.CachePolicySummary, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("CachePolicySummary", t.Name.Local): - var col types.CachePolicySummary - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentCachePolicySummary(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCachePolicySummaryListUnwrapped(v *[]types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { - var sv []types.CachePolicySummary - if *v == nil { - sv = make([]types.CachePolicySummary, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CachePolicySummary - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentCachePolicySummary(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentCannotChangeImmutablePublicKeyFields(v **types.CannotChangeImmutablePublicKeyFields, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentCachePolicyList(v **types.CachePolicyList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyList + if *v == nil { + sv = &types.CachePolicyList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicySummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyQueryStringsConfig(v **types.CachePolicyQueryStringsConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyQueryStringsConfig + if *v == nil { + sv = &types.CachePolicyQueryStringsConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("QueryStringBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.QueryStringBehavior = types.CachePolicyQueryStringBehavior(xtv) + } + + case strings.EqualFold("QueryStrings", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryStringNames(&sv.QueryStrings, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicySummary(v **types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicySummary + if *v == nil { + sv = &types.CachePolicySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.CachePolicyType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicySummaryList(v *[]types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CachePolicySummary + if *v == nil { + sv = make([]types.CachePolicySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("CachePolicySummary", t.Name.Local): + var col types.CachePolicySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCachePolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicySummaryListUnwrapped(v *[]types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.CachePolicySummary + if *v == nil { + sv = make([]types.CachePolicySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CachePolicySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCachePolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCannotChangeImmutablePublicKeyFields(v **types.CannotChangeImmutablePublicKeyFields, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CannotChangeImmutablePublicKeyFields + if *v == nil { + sv = &types.CannotChangeImmutablePublicKeyFields{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCannotDeleteEntityWhileInUse(v **types.CannotDeleteEntityWhileInUse, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.CannotChangeImmutablePublicKeyFields + var sv *types.CannotDeleteEntityWhileInUse if *v == nil { - sv = &types.CannotChangeImmutablePublicKeyFields{} + sv = &types.CannotDeleteEntityWhileInUse{} } else { sv = *v } @@ -26332,13 +28723,13 @@ func awsRestxml_deserializeDocumentCannotChangeImmutablePublicKeyFields(v **type return nil } -func awsRestxml_deserializeDocumentCannotDeleteEntityWhileInUse(v **types.CannotDeleteEntityWhileInUse, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentCannotUpdateEntityWhileInUse(v **types.CannotUpdateEntityWhileInUse, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.CannotDeleteEntityWhileInUse + var sv *types.CannotUpdateEntityWhileInUse if *v == nil { - sv = &types.CannotDeleteEntityWhileInUse{} + sv = &types.CannotUpdateEntityWhileInUse{} } else { sv = *v } @@ -28663,6 +31054,12 @@ func awsRestxml_deserializeDocumentDefaultCacheBehavior(v **types.DefaultCacheBe return err } + case strings.EqualFold("GrpcConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentGrpcConfig(&sv.GrpcConfig, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("LambdaFunctionAssociations", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsRestxml_deserializeDocumentLambdaFunctionAssociations(&sv.LambdaFunctionAssociations, nodeDecoder); err != nil { @@ -29033,6 +31430,19 @@ func awsRestxml_deserializeDocumentDistributionConfig(v **types.DistributionConf return err } + case strings.EqualFold("AnycastIpListId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AnycastIpListId = ptr.String(xtv) + } + case strings.EqualFold("CacheBehaviors", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsRestxml_deserializeDocumentCacheBehaviors(&sv.CacheBehaviors, nodeDecoder); err != nil { @@ -29633,6 +32043,19 @@ func awsRestxml_deserializeDocumentDistributionSummary(v **types.DistributionSum return err } + case strings.EqualFold("AnycastIpListId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AnycastIpListId = ptr.String(xtv) + } + case strings.EqualFold("ARN", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -32659,6 +35082,58 @@ func awsRestxml_deserializeDocumentGeoRestriction(v **types.GeoRestriction, deco return nil } +func awsRestxml_deserializeDocumentGrpcConfig(v **types.GrpcConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.GrpcConfig + if *v == nil { + sv = &types.GrpcConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentHeaderList(v *[]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -37449,6 +39924,12 @@ func awsRestxml_deserializeDocumentOrigin(v **types.Origin, decoder smithyxml.No return err } + case strings.EqualFold("VpcOriginConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVpcOriginConfig(&sv.VpcOriginConfig, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -44911,13 +47392,198 @@ func awsRestxml_deserializeDocumentTestFunctionFailed(v **types.TestFunctionFail return nil } -func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TestResult + if *v == nil { + sv = &types.TestResult{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ComputeUtilization", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ComputeUtilization = ptr.String(xtv) + } + + case strings.EqualFold("FunctionErrorMessage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FunctionErrorMessage = ptr.String(xtv) + } + + case strings.EqualFold("FunctionExecutionLogs", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionExecutionLogList(&sv.FunctionExecutionLogs, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("FunctionOutput", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FunctionOutput = ptr.String(xtv) + } + + case strings.EqualFold("FunctionSummary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooLongCSPInResponseHeadersPolicy(v **types.TooLongCSPInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooLongCSPInResponseHeadersPolicy + if *v == nil { + sv = &types.TooLongCSPInResponseHeadersPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCacheBehaviors(v **types.TooManyCacheBehaviors, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCacheBehaviors + if *v == nil { + sv = &types.TooManyCacheBehaviors{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCachePolicies(v **types.TooManyCachePolicies, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TestResult + var sv *types.TooManyCachePolicies if *v == nil { - sv = &types.TestResult{} + sv = &types.TooManyCachePolicies{} } else { sv = *v } @@ -44933,7 +47599,7 @@ func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smit originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ComputeUtilization", t.Name.Local): + case strings.EqualFold("Message", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -44943,10 +47609,46 @@ func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smit } { xtv := string(val) - sv.ComputeUtilization = ptr.String(xtv) + sv.Message = ptr.String(xtv) } - case strings.EqualFold("FunctionErrorMessage", t.Name.Local): + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCertificates(v **types.TooManyCertificates, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCertificates + if *v == nil { + sv = &types.TooManyCertificates{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -44956,16 +47658,46 @@ func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smit } { xtv := string(val) - sv.FunctionErrorMessage = ptr.String(xtv) + sv.Message = ptr.String(xtv) } - case strings.EqualFold("FunctionExecutionLogs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentFunctionExecutionLogList(&sv.FunctionExecutionLogs, nodeDecoder); err != nil { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { return err } - case strings.EqualFold("FunctionOutput", t.Name.Local): + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCloudFrontOriginAccessIdentities(v **types.TooManyCloudFrontOriginAccessIdentities, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCloudFrontOriginAccessIdentities + if *v == nil { + sv = &types.TooManyCloudFrontOriginAccessIdentities{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -44975,14 +47707,57 @@ func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smit } { xtv := string(val) - sv.FunctionOutput = ptr.String(xtv) + sv.Message = ptr.String(xtv) } - case strings.EqualFold("FunctionSummary", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyContinuousDeploymentPolicies(v **types.TooManyContinuousDeploymentPolicies, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyContinuousDeploymentPolicies + if *v == nil { + sv = &types.TooManyContinuousDeploymentPolicies{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } default: // Do nothing and ignore the unexpected tag element @@ -44998,13 +47773,13 @@ func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smit return nil } -func awsRestxml_deserializeDocumentTooLongCSPInResponseHeadersPolicy(v **types.TooLongCSPInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyCookieNamesInWhiteList(v **types.TooManyCookieNamesInWhiteList, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooLongCSPInResponseHeadersPolicy + var sv *types.TooManyCookieNamesInWhiteList if *v == nil { - sv = &types.TooLongCSPInResponseHeadersPolicy{} + sv = &types.TooManyCookieNamesInWhiteList{} } else { sv = *v } @@ -45047,13 +47822,13 @@ func awsRestxml_deserializeDocumentTooLongCSPInResponseHeadersPolicy(v **types.T return nil } -func awsRestxml_deserializeDocumentTooManyCacheBehaviors(v **types.TooManyCacheBehaviors, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyCookiesInCachePolicy(v **types.TooManyCookiesInCachePolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCacheBehaviors + var sv *types.TooManyCookiesInCachePolicy if *v == nil { - sv = &types.TooManyCacheBehaviors{} + sv = &types.TooManyCookiesInCachePolicy{} } else { sv = *v } @@ -45096,13 +47871,13 @@ func awsRestxml_deserializeDocumentTooManyCacheBehaviors(v **types.TooManyCacheB return nil } -func awsRestxml_deserializeDocumentTooManyCachePolicies(v **types.TooManyCachePolicies, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyCookiesInOriginRequestPolicy(v **types.TooManyCookiesInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCachePolicies + var sv *types.TooManyCookiesInOriginRequestPolicy if *v == nil { - sv = &types.TooManyCachePolicies{} + sv = &types.TooManyCookiesInOriginRequestPolicy{} } else { sv = *v } @@ -45145,13 +47920,13 @@ func awsRestxml_deserializeDocumentTooManyCachePolicies(v **types.TooManyCachePo return nil } -func awsRestxml_deserializeDocumentTooManyCertificates(v **types.TooManyCertificates, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyCustomHeadersInResponseHeadersPolicy(v **types.TooManyCustomHeadersInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCertificates + var sv *types.TooManyCustomHeadersInResponseHeadersPolicy if *v == nil { - sv = &types.TooManyCertificates{} + sv = &types.TooManyCustomHeadersInResponseHeadersPolicy{} } else { sv = *v } @@ -45194,13 +47969,13 @@ func awsRestxml_deserializeDocumentTooManyCertificates(v **types.TooManyCertific return nil } -func awsRestxml_deserializeDocumentTooManyCloudFrontOriginAccessIdentities(v **types.TooManyCloudFrontOriginAccessIdentities, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionCNAMEs(v **types.TooManyDistributionCNAMEs, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCloudFrontOriginAccessIdentities + var sv *types.TooManyDistributionCNAMEs if *v == nil { - sv = &types.TooManyCloudFrontOriginAccessIdentities{} + sv = &types.TooManyDistributionCNAMEs{} } else { sv = *v } @@ -45243,13 +48018,13 @@ func awsRestxml_deserializeDocumentTooManyCloudFrontOriginAccessIdentities(v **t return nil } -func awsRestxml_deserializeDocumentTooManyContinuousDeploymentPolicies(v **types.TooManyContinuousDeploymentPolicies, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributions(v **types.TooManyDistributions, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyContinuousDeploymentPolicies + var sv *types.TooManyDistributions if *v == nil { - sv = &types.TooManyContinuousDeploymentPolicies{} + sv = &types.TooManyDistributions{} } else { sv = *v } @@ -45292,13 +48067,13 @@ func awsRestxml_deserializeDocumentTooManyContinuousDeploymentPolicies(v **types return nil } -func awsRestxml_deserializeDocumentTooManyCookieNamesInWhiteList(v **types.TooManyCookieNamesInWhiteList, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToCachePolicy(v **types.TooManyDistributionsAssociatedToCachePolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCookieNamesInWhiteList + var sv *types.TooManyDistributionsAssociatedToCachePolicy if *v == nil { - sv = &types.TooManyCookieNamesInWhiteList{} + sv = &types.TooManyDistributionsAssociatedToCachePolicy{} } else { sv = *v } @@ -45341,13 +48116,13 @@ func awsRestxml_deserializeDocumentTooManyCookieNamesInWhiteList(v **types.TooMa return nil } -func awsRestxml_deserializeDocumentTooManyCookiesInCachePolicy(v **types.TooManyCookiesInCachePolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(v **types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCookiesInCachePolicy + var sv *types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig if *v == nil { - sv = &types.TooManyCookiesInCachePolicy{} + sv = &types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig{} } else { sv = *v } @@ -45390,13 +48165,13 @@ func awsRestxml_deserializeDocumentTooManyCookiesInCachePolicy(v **types.TooMany return nil } -func awsRestxml_deserializeDocumentTooManyCookiesInOriginRequestPolicy(v **types.TooManyCookiesInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToKeyGroup(v **types.TooManyDistributionsAssociatedToKeyGroup, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCookiesInOriginRequestPolicy + var sv *types.TooManyDistributionsAssociatedToKeyGroup if *v == nil { - sv = &types.TooManyCookiesInOriginRequestPolicy{} + sv = &types.TooManyDistributionsAssociatedToKeyGroup{} } else { sv = *v } @@ -45439,13 +48214,13 @@ func awsRestxml_deserializeDocumentTooManyCookiesInOriginRequestPolicy(v **types return nil } -func awsRestxml_deserializeDocumentTooManyCustomHeadersInResponseHeadersPolicy(v **types.TooManyCustomHeadersInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginAccessControl(v **types.TooManyDistributionsAssociatedToOriginAccessControl, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyCustomHeadersInResponseHeadersPolicy + var sv *types.TooManyDistributionsAssociatedToOriginAccessControl if *v == nil { - sv = &types.TooManyCustomHeadersInResponseHeadersPolicy{} + sv = &types.TooManyDistributionsAssociatedToOriginAccessControl{} } else { sv = *v } @@ -45488,13 +48263,13 @@ func awsRestxml_deserializeDocumentTooManyCustomHeadersInResponseHeadersPolicy(v return nil } -func awsRestxml_deserializeDocumentTooManyDistributionCNAMEs(v **types.TooManyDistributionCNAMEs, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginRequestPolicy(v **types.TooManyDistributionsAssociatedToOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionCNAMEs + var sv *types.TooManyDistributionsAssociatedToOriginRequestPolicy if *v == nil { - sv = &types.TooManyDistributionCNAMEs{} + sv = &types.TooManyDistributionsAssociatedToOriginRequestPolicy{} } else { sv = *v } @@ -45537,13 +48312,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionCNAMEs(v **types.TooManyDi return nil } -func awsRestxml_deserializeDocumentTooManyDistributions(v **types.TooManyDistributions, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToResponseHeadersPolicy(v **types.TooManyDistributionsAssociatedToResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributions + var sv *types.TooManyDistributionsAssociatedToResponseHeadersPolicy if *v == nil { - sv = &types.TooManyDistributions{} + sv = &types.TooManyDistributionsAssociatedToResponseHeadersPolicy{} } else { sv = *v } @@ -45586,13 +48361,13 @@ func awsRestxml_deserializeDocumentTooManyDistributions(v **types.TooManyDistrib return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToCachePolicy(v **types.TooManyDistributionsAssociatedToCachePolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsWithFunctionAssociations(v **types.TooManyDistributionsWithFunctionAssociations, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsAssociatedToCachePolicy + var sv *types.TooManyDistributionsWithFunctionAssociations if *v == nil { - sv = &types.TooManyDistributionsAssociatedToCachePolicy{} + sv = &types.TooManyDistributionsWithFunctionAssociations{} } else { sv = *v } @@ -45635,13 +48410,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToCachePolicy(v return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(v **types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsWithLambdaAssociations(v **types.TooManyDistributionsWithLambdaAssociations, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig + var sv *types.TooManyDistributionsWithLambdaAssociations if *v == nil { - sv = &types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig{} + sv = &types.TooManyDistributionsWithLambdaAssociations{} } else { sv = *v } @@ -45684,13 +48459,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToFieldLevelEnc return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToKeyGroup(v **types.TooManyDistributionsAssociatedToKeyGroup, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyDistributionsWithSingleFunctionARN(v **types.TooManyDistributionsWithSingleFunctionARN, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsAssociatedToKeyGroup + var sv *types.TooManyDistributionsWithSingleFunctionARN if *v == nil { - sv = &types.TooManyDistributionsAssociatedToKeyGroup{} + sv = &types.TooManyDistributionsWithSingleFunctionARN{} } else { sv = *v } @@ -45733,13 +48508,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToKeyGroup(v ** return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginAccessControl(v **types.TooManyDistributionsAssociatedToOriginAccessControl, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionConfigs(v **types.TooManyFieldLevelEncryptionConfigs, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsAssociatedToOriginAccessControl + var sv *types.TooManyFieldLevelEncryptionConfigs if *v == nil { - sv = &types.TooManyDistributionsAssociatedToOriginAccessControl{} + sv = &types.TooManyFieldLevelEncryptionConfigs{} } else { sv = *v } @@ -45782,13 +48557,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginAccessC return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginRequestPolicy(v **types.TooManyDistributionsAssociatedToOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionContentTypeProfiles(v **types.TooManyFieldLevelEncryptionContentTypeProfiles, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsAssociatedToOriginRequestPolicy + var sv *types.TooManyFieldLevelEncryptionContentTypeProfiles if *v == nil { - sv = &types.TooManyDistributionsAssociatedToOriginRequestPolicy{} + sv = &types.TooManyFieldLevelEncryptionContentTypeProfiles{} } else { sv = *v } @@ -45831,13 +48606,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginRequest return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToResponseHeadersPolicy(v **types.TooManyDistributionsAssociatedToResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionEncryptionEntities(v **types.TooManyFieldLevelEncryptionEncryptionEntities, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsAssociatedToResponseHeadersPolicy + var sv *types.TooManyFieldLevelEncryptionEncryptionEntities if *v == nil { - sv = &types.TooManyDistributionsAssociatedToResponseHeadersPolicy{} + sv = &types.TooManyFieldLevelEncryptionEncryptionEntities{} } else { sv = *v } @@ -45880,13 +48655,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToResponseHeade return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsWithFunctionAssociations(v **types.TooManyDistributionsWithFunctionAssociations, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionFieldPatterns(v **types.TooManyFieldLevelEncryptionFieldPatterns, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsWithFunctionAssociations + var sv *types.TooManyFieldLevelEncryptionFieldPatterns if *v == nil { - sv = &types.TooManyDistributionsWithFunctionAssociations{} + sv = &types.TooManyFieldLevelEncryptionFieldPatterns{} } else { sv = *v } @@ -45929,13 +48704,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsWithFunctionAssociations( return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsWithLambdaAssociations(v **types.TooManyDistributionsWithLambdaAssociations, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionProfiles(v **types.TooManyFieldLevelEncryptionProfiles, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsWithLambdaAssociations + var sv *types.TooManyFieldLevelEncryptionProfiles if *v == nil { - sv = &types.TooManyDistributionsWithLambdaAssociations{} + sv = &types.TooManyFieldLevelEncryptionProfiles{} } else { sv = *v } @@ -45978,13 +48753,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsWithLambdaAssociations(v return nil } -func awsRestxml_deserializeDocumentTooManyDistributionsWithSingleFunctionARN(v **types.TooManyDistributionsWithSingleFunctionARN, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionQueryArgProfiles(v **types.TooManyFieldLevelEncryptionQueryArgProfiles, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyDistributionsWithSingleFunctionARN + var sv *types.TooManyFieldLevelEncryptionQueryArgProfiles if *v == nil { - sv = &types.TooManyDistributionsWithSingleFunctionARN{} + sv = &types.TooManyFieldLevelEncryptionQueryArgProfiles{} } else { sv = *v } @@ -46027,13 +48802,13 @@ func awsRestxml_deserializeDocumentTooManyDistributionsWithSingleFunctionARN(v * return nil } -func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionConfigs(v **types.TooManyFieldLevelEncryptionConfigs, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFunctionAssociations(v **types.TooManyFunctionAssociations, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFieldLevelEncryptionConfigs + var sv *types.TooManyFunctionAssociations if *v == nil { - sv = &types.TooManyFieldLevelEncryptionConfigs{} + sv = &types.TooManyFunctionAssociations{} } else { sv = *v } @@ -46076,13 +48851,13 @@ func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionConfigs(v **types. return nil } -func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionContentTypeProfiles(v **types.TooManyFieldLevelEncryptionContentTypeProfiles, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyFunctions(v **types.TooManyFunctions, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFieldLevelEncryptionContentTypeProfiles + var sv *types.TooManyFunctions if *v == nil { - sv = &types.TooManyFieldLevelEncryptionContentTypeProfiles{} + sv = &types.TooManyFunctions{} } else { sv = *v } @@ -46125,13 +48900,13 @@ func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionContentTypeProfile return nil } -func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionEncryptionEntities(v **types.TooManyFieldLevelEncryptionEncryptionEntities, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyHeadersInCachePolicy(v **types.TooManyHeadersInCachePolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFieldLevelEncryptionEncryptionEntities + var sv *types.TooManyHeadersInCachePolicy if *v == nil { - sv = &types.TooManyFieldLevelEncryptionEncryptionEntities{} + sv = &types.TooManyHeadersInCachePolicy{} } else { sv = *v } @@ -46174,13 +48949,13 @@ func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionEncryptionEntities return nil } -func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionFieldPatterns(v **types.TooManyFieldLevelEncryptionFieldPatterns, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyHeadersInForwardedValues(v **types.TooManyHeadersInForwardedValues, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFieldLevelEncryptionFieldPatterns + var sv *types.TooManyHeadersInForwardedValues if *v == nil { - sv = &types.TooManyFieldLevelEncryptionFieldPatterns{} + sv = &types.TooManyHeadersInForwardedValues{} } else { sv = *v } @@ -46223,13 +48998,13 @@ func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionFieldPatterns(v ** return nil } -func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionProfiles(v **types.TooManyFieldLevelEncryptionProfiles, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyHeadersInOriginRequestPolicy(v **types.TooManyHeadersInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFieldLevelEncryptionProfiles + var sv *types.TooManyHeadersInOriginRequestPolicy if *v == nil { - sv = &types.TooManyFieldLevelEncryptionProfiles{} + sv = &types.TooManyHeadersInOriginRequestPolicy{} } else { sv = *v } @@ -46272,13 +49047,13 @@ func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionProfiles(v **types return nil } -func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionQueryArgProfiles(v **types.TooManyFieldLevelEncryptionQueryArgProfiles, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyInvalidationsInProgress(v **types.TooManyInvalidationsInProgress, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFieldLevelEncryptionQueryArgProfiles + var sv *types.TooManyInvalidationsInProgress if *v == nil { - sv = &types.TooManyFieldLevelEncryptionQueryArgProfiles{} + sv = &types.TooManyInvalidationsInProgress{} } else { sv = *v } @@ -46321,13 +49096,13 @@ func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionQueryArgProfiles(v return nil } -func awsRestxml_deserializeDocumentTooManyFunctionAssociations(v **types.TooManyFunctionAssociations, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyKeyGroups(v **types.TooManyKeyGroups, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFunctionAssociations + var sv *types.TooManyKeyGroups if *v == nil { - sv = &types.TooManyFunctionAssociations{} + sv = &types.TooManyKeyGroups{} } else { sv = *v } @@ -46370,13 +49145,13 @@ func awsRestxml_deserializeDocumentTooManyFunctionAssociations(v **types.TooMany return nil } -func awsRestxml_deserializeDocumentTooManyFunctions(v **types.TooManyFunctions, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyKeyGroupsAssociatedToDistribution(v **types.TooManyKeyGroupsAssociatedToDistribution, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyFunctions + var sv *types.TooManyKeyGroupsAssociatedToDistribution if *v == nil { - sv = &types.TooManyFunctions{} + sv = &types.TooManyKeyGroupsAssociatedToDistribution{} } else { sv = *v } @@ -46419,13 +49194,13 @@ func awsRestxml_deserializeDocumentTooManyFunctions(v **types.TooManyFunctions, return nil } -func awsRestxml_deserializeDocumentTooManyHeadersInCachePolicy(v **types.TooManyHeadersInCachePolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyLambdaFunctionAssociations(v **types.TooManyLambdaFunctionAssociations, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyHeadersInCachePolicy + var sv *types.TooManyLambdaFunctionAssociations if *v == nil { - sv = &types.TooManyHeadersInCachePolicy{} + sv = &types.TooManyLambdaFunctionAssociations{} } else { sv = *v } @@ -46468,13 +49243,13 @@ func awsRestxml_deserializeDocumentTooManyHeadersInCachePolicy(v **types.TooMany return nil } -func awsRestxml_deserializeDocumentTooManyHeadersInForwardedValues(v **types.TooManyHeadersInForwardedValues, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyOriginAccessControls(v **types.TooManyOriginAccessControls, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyHeadersInForwardedValues + var sv *types.TooManyOriginAccessControls if *v == nil { - sv = &types.TooManyHeadersInForwardedValues{} + sv = &types.TooManyOriginAccessControls{} } else { sv = *v } @@ -46517,13 +49292,13 @@ func awsRestxml_deserializeDocumentTooManyHeadersInForwardedValues(v **types.Too return nil } -func awsRestxml_deserializeDocumentTooManyHeadersInOriginRequestPolicy(v **types.TooManyHeadersInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyOriginCustomHeaders(v **types.TooManyOriginCustomHeaders, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyHeadersInOriginRequestPolicy + var sv *types.TooManyOriginCustomHeaders if *v == nil { - sv = &types.TooManyHeadersInOriginRequestPolicy{} + sv = &types.TooManyOriginCustomHeaders{} } else { sv = *v } @@ -46566,13 +49341,13 @@ func awsRestxml_deserializeDocumentTooManyHeadersInOriginRequestPolicy(v **types return nil } -func awsRestxml_deserializeDocumentTooManyInvalidationsInProgress(v **types.TooManyInvalidationsInProgress, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyOriginGroupsPerDistribution(v **types.TooManyOriginGroupsPerDistribution, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyInvalidationsInProgress + var sv *types.TooManyOriginGroupsPerDistribution if *v == nil { - sv = &types.TooManyInvalidationsInProgress{} + sv = &types.TooManyOriginGroupsPerDistribution{} } else { sv = *v } @@ -46615,13 +49390,13 @@ func awsRestxml_deserializeDocumentTooManyInvalidationsInProgress(v **types.TooM return nil } -func awsRestxml_deserializeDocumentTooManyKeyGroups(v **types.TooManyKeyGroups, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyOriginRequestPolicies(v **types.TooManyOriginRequestPolicies, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyKeyGroups + var sv *types.TooManyOriginRequestPolicies if *v == nil { - sv = &types.TooManyKeyGroups{} + sv = &types.TooManyOriginRequestPolicies{} } else { sv = *v } @@ -46664,13 +49439,13 @@ func awsRestxml_deserializeDocumentTooManyKeyGroups(v **types.TooManyKeyGroups, return nil } -func awsRestxml_deserializeDocumentTooManyKeyGroupsAssociatedToDistribution(v **types.TooManyKeyGroupsAssociatedToDistribution, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyOrigins(v **types.TooManyOrigins, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyKeyGroupsAssociatedToDistribution + var sv *types.TooManyOrigins if *v == nil { - sv = &types.TooManyKeyGroupsAssociatedToDistribution{} + sv = &types.TooManyOrigins{} } else { sv = *v } @@ -46713,13 +49488,13 @@ func awsRestxml_deserializeDocumentTooManyKeyGroupsAssociatedToDistribution(v ** return nil } -func awsRestxml_deserializeDocumentTooManyLambdaFunctionAssociations(v **types.TooManyLambdaFunctionAssociations, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyPublicKeys(v **types.TooManyPublicKeys, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyLambdaFunctionAssociations + var sv *types.TooManyPublicKeys if *v == nil { - sv = &types.TooManyLambdaFunctionAssociations{} + sv = &types.TooManyPublicKeys{} } else { sv = *v } @@ -46762,13 +49537,13 @@ func awsRestxml_deserializeDocumentTooManyLambdaFunctionAssociations(v **types.T return nil } -func awsRestxml_deserializeDocumentTooManyOriginAccessControls(v **types.TooManyOriginAccessControls, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyPublicKeysInKeyGroup(v **types.TooManyPublicKeysInKeyGroup, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyOriginAccessControls + var sv *types.TooManyPublicKeysInKeyGroup if *v == nil { - sv = &types.TooManyOriginAccessControls{} + sv = &types.TooManyPublicKeysInKeyGroup{} } else { sv = *v } @@ -46811,13 +49586,13 @@ func awsRestxml_deserializeDocumentTooManyOriginAccessControls(v **types.TooMany return nil } -func awsRestxml_deserializeDocumentTooManyOriginCustomHeaders(v **types.TooManyOriginCustomHeaders, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyQueryStringParameters(v **types.TooManyQueryStringParameters, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyOriginCustomHeaders + var sv *types.TooManyQueryStringParameters if *v == nil { - sv = &types.TooManyOriginCustomHeaders{} + sv = &types.TooManyQueryStringParameters{} } else { sv = *v } @@ -46860,13 +49635,13 @@ func awsRestxml_deserializeDocumentTooManyOriginCustomHeaders(v **types.TooManyO return nil } -func awsRestxml_deserializeDocumentTooManyOriginGroupsPerDistribution(v **types.TooManyOriginGroupsPerDistribution, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyQueryStringsInCachePolicy(v **types.TooManyQueryStringsInCachePolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyOriginGroupsPerDistribution + var sv *types.TooManyQueryStringsInCachePolicy if *v == nil { - sv = &types.TooManyOriginGroupsPerDistribution{} + sv = &types.TooManyQueryStringsInCachePolicy{} } else { sv = *v } @@ -46909,13 +49684,13 @@ func awsRestxml_deserializeDocumentTooManyOriginGroupsPerDistribution(v **types. return nil } -func awsRestxml_deserializeDocumentTooManyOriginRequestPolicies(v **types.TooManyOriginRequestPolicies, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyQueryStringsInOriginRequestPolicy(v **types.TooManyQueryStringsInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyOriginRequestPolicies + var sv *types.TooManyQueryStringsInOriginRequestPolicy if *v == nil { - sv = &types.TooManyOriginRequestPolicies{} + sv = &types.TooManyQueryStringsInOriginRequestPolicy{} } else { sv = *v } @@ -46958,13 +49733,13 @@ func awsRestxml_deserializeDocumentTooManyOriginRequestPolicies(v **types.TooMan return nil } -func awsRestxml_deserializeDocumentTooManyOrigins(v **types.TooManyOrigins, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(v **types.TooManyRealtimeLogConfigs, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyOrigins + var sv *types.TooManyRealtimeLogConfigs if *v == nil { - sv = &types.TooManyOrigins{} + sv = &types.TooManyRealtimeLogConfigs{} } else { sv = *v } @@ -47007,13 +49782,13 @@ func awsRestxml_deserializeDocumentTooManyOrigins(v **types.TooManyOrigins, deco return nil } -func awsRestxml_deserializeDocumentTooManyPublicKeys(v **types.TooManyPublicKeys, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyRemoveHeadersInResponseHeadersPolicy(v **types.TooManyRemoveHeadersInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyPublicKeys + var sv *types.TooManyRemoveHeadersInResponseHeadersPolicy if *v == nil { - sv = &types.TooManyPublicKeys{} + sv = &types.TooManyRemoveHeadersInResponseHeadersPolicy{} } else { sv = *v } @@ -47056,13 +49831,13 @@ func awsRestxml_deserializeDocumentTooManyPublicKeys(v **types.TooManyPublicKeys return nil } -func awsRestxml_deserializeDocumentTooManyPublicKeysInKeyGroup(v **types.TooManyPublicKeysInKeyGroup, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(v **types.TooManyResponseHeadersPolicies, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyPublicKeysInKeyGroup + var sv *types.TooManyResponseHeadersPolicies if *v == nil { - sv = &types.TooManyPublicKeysInKeyGroup{} + sv = &types.TooManyResponseHeadersPolicies{} } else { sv = *v } @@ -47105,13 +49880,13 @@ func awsRestxml_deserializeDocumentTooManyPublicKeysInKeyGroup(v **types.TooMany return nil } -func awsRestxml_deserializeDocumentTooManyQueryStringParameters(v **types.TooManyQueryStringParameters, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyStreamingDistributionCNAMEs(v **types.TooManyStreamingDistributionCNAMEs, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyQueryStringParameters + var sv *types.TooManyStreamingDistributionCNAMEs if *v == nil { - sv = &types.TooManyQueryStringParameters{} + sv = &types.TooManyStreamingDistributionCNAMEs{} } else { sv = *v } @@ -47154,13 +49929,13 @@ func awsRestxml_deserializeDocumentTooManyQueryStringParameters(v **types.TooMan return nil } -func awsRestxml_deserializeDocumentTooManyQueryStringsInCachePolicy(v **types.TooManyQueryStringsInCachePolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyStreamingDistributions(v **types.TooManyStreamingDistributions, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyQueryStringsInCachePolicy + var sv *types.TooManyStreamingDistributions if *v == nil { - sv = &types.TooManyQueryStringsInCachePolicy{} + sv = &types.TooManyStreamingDistributions{} } else { sv = *v } @@ -47203,13 +49978,13 @@ func awsRestxml_deserializeDocumentTooManyQueryStringsInCachePolicy(v **types.To return nil } -func awsRestxml_deserializeDocumentTooManyQueryStringsInOriginRequestPolicy(v **types.TooManyQueryStringsInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTooManyTrustedSigners(v **types.TooManyTrustedSigners, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyQueryStringsInOriginRequestPolicy + var sv *types.TooManyTrustedSigners if *v == nil { - sv = &types.TooManyQueryStringsInOriginRequestPolicy{} + sv = &types.TooManyTrustedSigners{} } else { sv = *v } @@ -47252,13 +50027,13 @@ func awsRestxml_deserializeDocumentTooManyQueryStringsInOriginRequestPolicy(v ** return nil } -func awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(v **types.TooManyRealtimeLogConfigs, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTrafficConfig(v **types.TrafficConfig, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyRealtimeLogConfigs + var sv *types.TrafficConfig if *v == nil { - sv = &types.TooManyRealtimeLogConfigs{} + sv = &types.TrafficConfig{} } else { sv = *v } @@ -47274,7 +50049,19 @@ func awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(v **types.TooManyRe originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Message", t.Name.Local): + case strings.EqualFold("SingleHeaderConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentSingleHeaderConfig(&sv.SingleHeaderConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("SingleWeightConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentSingleWeightConfig(&sv.SingleWeightConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Type", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47284,7 +50071,7 @@ func awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(v **types.TooManyRe } { xtv := string(val) - sv.Message = ptr.String(xtv) + sv.Type = types.ContinuousDeploymentPolicyType(xtv) } default: @@ -47301,13 +50088,13 @@ func awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(v **types.TooManyRe return nil } -func awsRestxml_deserializeDocumentTooManyRemoveHeadersInResponseHeadersPolicy(v **types.TooManyRemoveHeadersInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTrustedKeyGroupDoesNotExist(v **types.TrustedKeyGroupDoesNotExist, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyRemoveHeadersInResponseHeadersPolicy + var sv *types.TrustedKeyGroupDoesNotExist if *v == nil { - sv = &types.TooManyRemoveHeadersInResponseHeadersPolicy{} + sv = &types.TrustedKeyGroupDoesNotExist{} } else { sv = *v } @@ -47350,13 +50137,93 @@ func awsRestxml_deserializeDocumentTooManyRemoveHeadersInResponseHeadersPolicy(v return nil } -func awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(v **types.TooManyResponseHeadersPolicies, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTrustedKeyGroupIdList(v *[]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyResponseHeadersPolicies + var sv []string if *v == nil { - sv = &types.TooManyResponseHeadersPolicies{} + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("KeyGroup", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrustedKeyGroupIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentTrustedKeyGroups(v **types.TrustedKeyGroups, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrustedKeyGroups + if *v == nil { + sv = &types.TrustedKeyGroups{} } else { sv = *v } @@ -47372,7 +50239,29 @@ func awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(v **types.TooM originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Message", t.Name.Local): + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedKeyGroupIdList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47382,7 +50271,11 @@ func awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(v **types.TooM } { xtv := string(val) - sv.Message = ptr.String(xtv) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) } default: @@ -47399,13 +50292,13 @@ func awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(v **types.TooM return nil } -func awsRestxml_deserializeDocumentTooManyStreamingDistributionCNAMEs(v **types.TooManyStreamingDistributionCNAMEs, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTrustedSignerDoesNotExist(v **types.TrustedSignerDoesNotExist, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyStreamingDistributionCNAMEs + var sv *types.TrustedSignerDoesNotExist if *v == nil { - sv = &types.TooManyStreamingDistributionCNAMEs{} + sv = &types.TrustedSignerDoesNotExist{} } else { sv = *v } @@ -47448,13 +50341,13 @@ func awsRestxml_deserializeDocumentTooManyStreamingDistributionCNAMEs(v **types. return nil } -func awsRestxml_deserializeDocumentTooManyStreamingDistributions(v **types.TooManyStreamingDistributions, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentTrustedSigners(v **types.TrustedSigners, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyStreamingDistributions + var sv *types.TrustedSigners if *v == nil { - sv = &types.TooManyStreamingDistributions{} + sv = &types.TrustedSigners{} } else { sv = *v } @@ -47470,7 +50363,29 @@ func awsRestxml_deserializeDocumentTooManyStreamingDistributions(v **types.TooMa originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Message", t.Name.Local): + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAwsAccountNumberList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47480,7 +50395,11 @@ func awsRestxml_deserializeDocumentTooManyStreamingDistributions(v **types.TooMa } { xtv := string(val) - sv.Message = ptr.String(xtv) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) } default: @@ -47497,13 +50416,13 @@ func awsRestxml_deserializeDocumentTooManyStreamingDistributions(v **types.TooMa return nil } -func awsRestxml_deserializeDocumentTooManyTrustedSigners(v **types.TooManyTrustedSigners, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentUnsupportedOperation(v **types.UnsupportedOperation, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TooManyTrustedSigners + var sv *types.UnsupportedOperation if *v == nil { - sv = &types.TooManyTrustedSigners{} + sv = &types.UnsupportedOperation{} } else { sv = *v } @@ -47546,13 +50465,13 @@ func awsRestxml_deserializeDocumentTooManyTrustedSigners(v **types.TooManyTruste return nil } -func awsRestxml_deserializeDocumentTrafficConfig(v **types.TrafficConfig, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TrafficConfig + var sv *types.ViewerCertificate if *v == nil { - sv = &types.TrafficConfig{} + sv = &types.ViewerCertificate{} } else { sv = *v } @@ -47568,19 +50487,33 @@ func awsRestxml_deserializeDocumentTrafficConfig(v **types.TrafficConfig, decode originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("SingleHeaderConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentContinuousDeploymentSingleHeaderConfig(&sv.SingleHeaderConfig, nodeDecoder); err != nil { + case strings.EqualFold("ACMCertificateArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + sv.ACMCertificateArn = ptr.String(xtv) + } - case strings.EqualFold("SingleWeightConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentContinuousDeploymentSingleWeightConfig(&sv.SingleWeightConfig, nodeDecoder); err != nil { + case strings.EqualFold("Certificate", t.Name.Local): + val, err := decoder.Value() + if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + sv.Certificate = ptr.String(xtv) + } - case strings.EqualFold("Type", t.Name.Local): + case strings.EqualFold("CertificateSource", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47590,7 +50523,62 @@ func awsRestxml_deserializeDocumentTrafficConfig(v **types.TrafficConfig, decode } { xtv := string(val) - sv.Type = types.ContinuousDeploymentPolicyType(xtv) + sv.CertificateSource = types.CertificateSource(xtv) + } + + case strings.EqualFold("CloudFrontDefaultCertificate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.CloudFrontDefaultCertificate = ptr.Bool(xtv) + } + + case strings.EqualFold("IAMCertificateId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IAMCertificateId = ptr.String(xtv) + } + + case strings.EqualFold("MinimumProtocolVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumProtocolVersion = types.MinimumProtocolVersion(xtv) + } + + case strings.EqualFold("SSLSupportMethod", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SSLSupportMethod = types.SSLSupportMethod(xtv) } default: @@ -47607,13 +50595,13 @@ func awsRestxml_deserializeDocumentTrafficConfig(v **types.TrafficConfig, decode return nil } -func awsRestxml_deserializeDocumentTrustedKeyGroupDoesNotExist(v **types.TrustedKeyGroupDoesNotExist, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentVpcOrigin(v **types.VpcOrigin, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TrustedKeyGroupDoesNotExist + var sv *types.VpcOrigin if *v == nil { - sv = &types.TrustedKeyGroupDoesNotExist{} + sv = &types.VpcOrigin{} } else { sv = *v } @@ -47629,7 +50617,7 @@ func awsRestxml_deserializeDocumentTrustedKeyGroupDoesNotExist(v **types.Trusted originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Message", t.Name.Local): + case strings.EqualFold("Arn", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47639,7 +50627,73 @@ func awsRestxml_deserializeDocumentTrustedKeyGroupDoesNotExist(v **types.Trusted } { xtv := string(val) - sv.Message = ptr.String(xtv) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("CreatedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(t) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + case strings.EqualFold("VpcOriginEndpointConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVpcOriginEndpointConfig(&sv.VpcOriginEndpointConfig, nodeDecoder); err != nil { + return err } default: @@ -47656,18 +50710,17 @@ func awsRestxml_deserializeDocumentTrustedKeyGroupDoesNotExist(v **types.Trusted return nil } -func awsRestxml_deserializeDocumentTrustedKeyGroupIdList(v *[]string, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentVpcOriginConfig(v **types.VpcOriginConfig, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv []string + var sv *types.VpcOriginConfig if *v == nil { - sv = make([]string, 0) + sv = &types.VpcOriginConfig{} } else { sv = *v } - originalDecoder := decoder for { t, done, err := decoder.Token() if err != nil { @@ -47676,11 +50729,10 @@ func awsRestxml_deserializeDocumentTrustedKeyGroupIdList(v *[]string, decoder sm if done { break } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("KeyGroup", t.Name.Local): - var col string + case strings.EqualFold("VpcOriginId", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47690,11 +50742,11 @@ func awsRestxml_deserializeDocumentTrustedKeyGroupIdList(v *[]string, decoder sm } { xtv := string(val) - col = xtv + sv.VpcOriginId = ptr.String(xtv) } - sv = append(sv, col) default: + // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() if err != nil { return err @@ -47707,42 +50759,13 @@ func awsRestxml_deserializeDocumentTrustedKeyGroupIdList(v *[]string, decoder sm return nil } -func awsRestxml_deserializeDocumentTrustedKeyGroupIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentTrustedKeyGroups(v **types.TrustedKeyGroups, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentVpcOriginEndpointConfig(v **types.VpcOriginEndpointConfig, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TrustedKeyGroups + var sv *types.VpcOriginEndpointConfig if *v == nil { - sv = &types.TrustedKeyGroups{} + sv = &types.VpcOriginEndpointConfig{} } else { sv = *v } @@ -47758,7 +50781,7 @@ func awsRestxml_deserializeDocumentTrustedKeyGroups(v **types.TrustedKeyGroups, originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Enabled", t.Name.Local): + case strings.EqualFold("Arn", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47767,20 +50790,28 @@ func awsRestxml_deserializeDocumentTrustedKeyGroups(v **types.TrustedKeyGroups, break } { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) + xtv := string(val) + sv.Arn = ptr.String(xtv) } - case strings.EqualFold("Items", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrustedKeyGroupIdList(&sv.Items, nodeDecoder); err != nil { + case strings.EqualFold("HTTPPort", t.Name.Local): + val, err := decoder.Value() + if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.HTTPPort = ptr.Int32(int32(i64)) + } - case strings.EqualFold("Quantity", t.Name.Local): + case strings.EqualFold("HTTPSPort", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47794,46 +50825,23 @@ func awsRestxml_deserializeDocumentTrustedKeyGroups(v **types.TrustedKeyGroups, if err != nil { return err } - sv.Quantity = ptr.Int32(int32(i64)) + sv.HTTPSPort = ptr.Int32(int32(i64)) } - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrustedSignerDoesNotExist(v **types.TrustedSignerDoesNotExist, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrustedSignerDoesNotExist - if *v == nil { - sv = &types.TrustedSignerDoesNotExist{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): + case strings.EqualFold("OriginProtocolPolicy", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47843,7 +50851,13 @@ func awsRestxml_deserializeDocumentTrustedSignerDoesNotExist(v **types.TrustedSi } { xtv := string(val) - sv.Message = ptr.String(xtv) + sv.OriginProtocolPolicy = types.OriginProtocolPolicy(xtv) + } + + case strings.EqualFold("OriginSslProtocols", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginSslProtocols(&sv.OriginSslProtocols, nodeDecoder); err != nil { + return err } default: @@ -47860,13 +50874,13 @@ func awsRestxml_deserializeDocumentTrustedSignerDoesNotExist(v **types.TrustedSi return nil } -func awsRestxml_deserializeDocumentTrustedSigners(v **types.TrustedSigners, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentVpcOriginList(v **types.VpcOriginList, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.TrustedSigners + var sv *types.VpcOriginList if *v == nil { - sv = &types.TrustedSigners{} + sv = &types.VpcOriginList{} } else { sv = *v } @@ -47882,7 +50896,7 @@ func awsRestxml_deserializeDocumentTrustedSigners(v **types.TrustedSigners, deco originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Enabled", t.Name.Local): + case strings.EqualFold("IsTruncated", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47895,16 +50909,29 @@ func awsRestxml_deserializeDocumentTrustedSigners(v **types.TrustedSigners, deco if err != nil { return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) } - sv.Enabled = ptr.Bool(xtv) + sv.IsTruncated = ptr.Bool(xtv) } case strings.EqualFold("Items", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentAwsAccountNumberList(&sv.Items, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentVpcOriginSummaryList(&sv.Items, nodeDecoder); err != nil { return err } - case strings.EqualFold("Quantity", t.Name.Local): + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47918,46 +50945,23 @@ func awsRestxml_deserializeDocumentTrustedSigners(v **types.TrustedSigners, deco if err != nil { return err } - sv.Quantity = ptr.Int32(int32(i64)) + sv.MaxItems = ptr.Int32(int32(i64)) } - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentUnsupportedOperation(v **types.UnsupportedOperation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UnsupportedOperation - if *v == nil { - sv = &types.UnsupportedOperation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): + case strings.EqualFold("Quantity", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -47967,7 +50971,11 @@ func awsRestxml_deserializeDocumentUnsupportedOperation(v **types.UnsupportedOpe } { xtv := string(val) - sv.Message = ptr.String(xtv) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) } default: @@ -47984,13 +50992,13 @@ func awsRestxml_deserializeDocumentUnsupportedOperation(v **types.UnsupportedOpe return nil } -func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentVpcOriginSummary(v **types.VpcOriginSummary, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.ViewerCertificate + var sv *types.VpcOriginSummary if *v == nil { - sv = &types.ViewerCertificate{} + sv = &types.VpcOriginSummary{} } else { sv = *v } @@ -48006,7 +51014,7 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ACMCertificateArn", t.Name.Local): + case strings.EqualFold("Arn", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -48016,10 +51024,10 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate } { xtv := string(val) - sv.ACMCertificateArn = ptr.String(xtv) + sv.Arn = ptr.String(xtv) } - case strings.EqualFold("Certificate", t.Name.Local): + case strings.EqualFold("CreatedTime", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -48029,10 +51037,14 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate } { xtv := string(val) - sv.Certificate = ptr.String(xtv) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(t) } - case strings.EqualFold("CertificateSource", t.Name.Local): + case strings.EqualFold("Id", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -48042,10 +51054,10 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate } { xtv := string(val) - sv.CertificateSource = types.CertificateSource(xtv) + sv.Id = ptr.String(xtv) } - case strings.EqualFold("CloudFrontDefaultCertificate", t.Name.Local): + case strings.EqualFold("LastModifiedTime", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -48054,14 +51066,15 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate break } { - xtv, err := strconv.ParseBool(string(val)) + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) if err != nil { - return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + return err } - sv.CloudFrontDefaultCertificate = ptr.Bool(xtv) + sv.LastModifiedTime = ptr.Time(t) } - case strings.EqualFold("IAMCertificateId", t.Name.Local): + case strings.EqualFold("Name", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -48071,10 +51084,10 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate } { xtv := string(val) - sv.IAMCertificateId = ptr.String(xtv) + sv.Name = ptr.String(xtv) } - case strings.EqualFold("MinimumProtocolVersion", t.Name.Local): + case strings.EqualFold("OriginEndpointArn", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -48084,10 +51097,10 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate } { xtv := string(val) - sv.MinimumProtocolVersion = types.MinimumProtocolVersion(xtv) + sv.OriginEndpointArn = ptr.String(xtv) } - case strings.EqualFold("SSLSupportMethod", t.Name.Local): + case strings.EqualFold("Status", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -48097,7 +51110,7 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate } { xtv := string(val) - sv.SSLSupportMethod = types.SSLSupportMethod(xtv) + sv.Status = ptr.String(xtv) } default: @@ -48113,3 +51126,72 @@ func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate *v = sv return nil } + +func awsRestxml_deserializeDocumentVpcOriginSummaryList(v *[]types.VpcOriginSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.VpcOriginSummary + if *v == nil { + sv = make([]types.VpcOriginSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("VpcOriginSummary", t.Name.Local): + var col types.VpcOriginSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentVpcOriginSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentVpcOriginSummaryListUnwrapped(v *[]types.VpcOriginSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.VpcOriginSummary + if *v == nil { + sv = make([]types.VpcOriginSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.VpcOriginSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentVpcOriginSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} diff --git a/service/cloudfront/generated.json b/service/cloudfront/generated.json index bd06adb328e..9c85a6aa410 100644 --- a/service/cloudfront/generated.json +++ b/service/cloudfront/generated.json @@ -11,6 +11,7 @@ "api_client_test.go", "api_op_AssociateAlias.go", "api_op_CopyDistribution.go", + "api_op_CreateAnycastIpList.go", "api_op_CreateCachePolicy.go", "api_op_CreateCloudFrontOriginAccessIdentity.go", "api_op_CreateContinuousDeploymentPolicy.go", @@ -30,6 +31,8 @@ "api_op_CreateResponseHeadersPolicy.go", "api_op_CreateStreamingDistribution.go", "api_op_CreateStreamingDistributionWithTags.go", + "api_op_CreateVpcOrigin.go", + "api_op_DeleteAnycastIpList.go", "api_op_DeleteCachePolicy.go", "api_op_DeleteCloudFrontOriginAccessIdentity.go", "api_op_DeleteContinuousDeploymentPolicy.go", @@ -46,8 +49,10 @@ "api_op_DeleteRealtimeLogConfig.go", "api_op_DeleteResponseHeadersPolicy.go", "api_op_DeleteStreamingDistribution.go", + "api_op_DeleteVpcOrigin.go", "api_op_DescribeFunction.go", "api_op_DescribeKeyValueStore.go", + "api_op_GetAnycastIpList.go", "api_op_GetCachePolicy.go", "api_op_GetCachePolicyConfig.go", "api_op_GetCloudFrontOriginAccessIdentity.go", @@ -76,16 +81,20 @@ "api_op_GetResponseHeadersPolicyConfig.go", "api_op_GetStreamingDistribution.go", "api_op_GetStreamingDistributionConfig.go", + "api_op_GetVpcOrigin.go", + "api_op_ListAnycastIpLists.go", "api_op_ListCachePolicies.go", "api_op_ListCloudFrontOriginAccessIdentities.go", "api_op_ListConflictingAliases.go", "api_op_ListContinuousDeploymentPolicies.go", "api_op_ListDistributions.go", + "api_op_ListDistributionsByAnycastIpListId.go", "api_op_ListDistributionsByCachePolicyId.go", "api_op_ListDistributionsByKeyGroup.go", "api_op_ListDistributionsByOriginRequestPolicyId.go", "api_op_ListDistributionsByRealtimeLogConfig.go", "api_op_ListDistributionsByResponseHeadersPolicyId.go", + "api_op_ListDistributionsByVpcOriginId.go", "api_op_ListDistributionsByWebACLId.go", "api_op_ListFieldLevelEncryptionConfigs.go", "api_op_ListFieldLevelEncryptionProfiles.go", @@ -100,6 +109,7 @@ "api_op_ListResponseHeadersPolicies.go", "api_op_ListStreamingDistributions.go", "api_op_ListTagsForResource.go", + "api_op_ListVpcOrigins.go", "api_op_PublishFunction.go", "api_op_TagResource.go", "api_op_TestFunction.go", @@ -120,6 +130,7 @@ "api_op_UpdateRealtimeLogConfig.go", "api_op_UpdateResponseHeadersPolicy.go", "api_op_UpdateStreamingDistribution.go", + "api_op_UpdateVpcOrigin.go", "auth.go", "deserializers.go", "doc.go", diff --git a/service/cloudfront/serializers.go b/service/cloudfront/serializers.go index f16b819b017..86f8bf1853d 100644 --- a/service/cloudfront/serializers.go +++ b/service/cloudfront/serializers.go @@ -217,6 +217,122 @@ func awsRestxml_serializeOpDocumentCopyDistributionInput(v *CopyDistributionInpu return nil } +type awsRestxml_serializeOpCreateAnycastIpList struct { +} + +func (*awsRestxml_serializeOpCreateAnycastIpList) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateAnycastIpList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateAnycastIpListInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/anycast-ip-list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateAnycastIpListRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentCreateAnycastIpListInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateAnycastIpListInput(v *CreateAnycastIpListInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateAnycastIpListInput(v *CreateAnycastIpListInput, value smithyxml.Value) error { + defer value.Close() + if v.IpCount != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IpCount", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.IpCount) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.Tags != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Tags", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTags(v.Tags, el); err != nil { + return err + } + } + return nil +} + type awsRestxml_serializeOpCreateCachePolicy struct { } @@ -1916,14 +2032,14 @@ func awsRestxml_serializeOpHttpBindingsCreateStreamingDistributionWithTagsInput( return nil } -type awsRestxml_serializeOpDeleteCachePolicy struct { +type awsRestxml_serializeOpCreateVpcOrigin struct { } -func (*awsRestxml_serializeOpDeleteCachePolicy) ID() string { +func (*awsRestxml_serializeOpCreateVpcOrigin) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpDeleteCachePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpCreateVpcOrigin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1935,16 +2051,16 @@ func (m *awsRestxml_serializeOpDeleteCachePolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteCachePolicyInput) + input, ok := in.Parameters.(*CreateVpcOriginInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/vpc-origin") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1957,7 +2073,21 @@ func (m *awsRestxml_serializeOpDeleteCachePolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateVpcOriginRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentCreateVpcOriginInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1970,36 +2100,53 @@ func (m *awsRestxml_serializeOpDeleteCachePolicy) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(v *DeleteCachePolicyInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsCreateVpcOriginInput(v *CreateVpcOriginInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return nil +} + +func awsRestxml_serializeOpDocumentCreateVpcOriginInput(v *CreateVpcOriginInput, value smithyxml.Value) error { + defer value.Close() + if v.Tags != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Tags", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTags(v.Tags, el); err != nil { return err } } - - if v.IfMatch != nil { - locationName := "If-Match" - encoder.SetHeader(locationName).String(*v.IfMatch) + if v.VpcOriginEndpointConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VpcOriginEndpointConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentVpcOriginEndpointConfig(v.VpcOriginEndpointConfig, el); err != nil { + return err + } } - return nil } -type awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity struct { +type awsRestxml_serializeOpDeleteAnycastIpList struct { } -func (*awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) ID() string { +func (*awsRestxml_serializeOpDeleteAnycastIpList) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpDeleteAnycastIpList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2011,13 +2158,13 @@ func (m *awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteCloudFrontOriginAccessIdentityInput) + input, ok := in.Parameters.(*DeleteAnycastIpListInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/anycast-ip-list/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -2033,7 +2180,7 @@ func (m *awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsDeleteAnycastIpListInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2046,7 +2193,7 @@ func (m *awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) HandleSeria span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(v *DeleteCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsDeleteAnycastIpListInput(v *DeleteAnycastIpListInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2068,14 +2215,14 @@ func awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput return nil } -type awsRestxml_serializeOpDeleteContinuousDeploymentPolicy struct { +type awsRestxml_serializeOpDeleteCachePolicy struct { } -func (*awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) ID() string { +func (*awsRestxml_serializeOpDeleteCachePolicy) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpDeleteCachePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2087,13 +2234,13 @@ func (m *awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteContinuousDeploymentPolicyInput) + input, ok := in.Parameters.(*DeleteCachePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-policy/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -2109,7 +2256,7 @@ func (m *awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsDeleteContinuousDeploymentPolicyInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2122,7 +2269,7 @@ func (m *awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) HandleSerialize span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsDeleteContinuousDeploymentPolicyInput(v *DeleteContinuousDeploymentPolicyInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(v *DeleteCachePolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2144,14 +2291,14 @@ func awsRestxml_serializeOpHttpBindingsDeleteContinuousDeploymentPolicyInput(v * return nil } -type awsRestxml_serializeOpDeleteDistribution struct { +type awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity struct { } -func (*awsRestxml_serializeOpDeleteDistribution) ID() string { +func (*awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpDeleteDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2163,13 +2310,13 @@ func (m *awsRestxml_serializeOpDeleteDistribution) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteDistributionInput) + input, ok := in.Parameters.(*DeleteCloudFrontOriginAccessIdentityInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -2185,7 +2332,7 @@ func (m *awsRestxml_serializeOpDeleteDistribution) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2198,7 +2345,7 @@ func (m *awsRestxml_serializeOpDeleteDistribution) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(v *DeleteDistributionInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(v *DeleteCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2220,14 +2367,14 @@ func awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(v *DeleteDistribu return nil } -type awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig struct { +type awsRestxml_serializeOpDeleteContinuousDeploymentPolicy struct { } -func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) ID() string { +func (*awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2239,13 +2386,13 @@ func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteFieldLevelEncryptionConfigInput) + input, ok := in.Parameters.(*DeleteContinuousDeploymentPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-policy/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -2261,7 +2408,7 @@ func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsDeleteContinuousDeploymentPolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2274,7 +2421,7 @@ func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) HandleSerialize span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(v *DeleteFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsDeleteContinuousDeploymentPolicyInput(v *DeleteContinuousDeploymentPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2296,14 +2443,14 @@ func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(v * return nil } -type awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile struct { +type awsRestxml_serializeOpDeleteDistribution struct { } -func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) ID() string { +func (*awsRestxml_serializeOpDeleteDistribution) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpDeleteDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2315,13 +2462,13 @@ func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteFieldLevelEncryptionProfileInput) + input, ok := in.Parameters.(*DeleteDistributionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -2337,7 +2484,7 @@ func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2350,7 +2497,7 @@ func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) HandleSerializ span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(v *DeleteFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(v *DeleteDistributionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2372,14 +2519,14 @@ func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(v return nil } -type awsRestxml_serializeOpDeleteFunction struct { +type awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig struct { } -func (*awsRestxml_serializeOpDeleteFunction) ID() string { +func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpDeleteFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2391,13 +2538,13 @@ func (m *awsRestxml_serializeOpDeleteFunction) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteFunctionInput) + input, ok := in.Parameters.(*DeleteFieldLevelEncryptionConfigInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -2413,7 +2560,7 @@ func (m *awsRestxml_serializeOpDeleteFunction) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsDeleteFunctionInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2426,29 +2573,181 @@ func (m *awsRestxml_serializeOpDeleteFunction) HandleSerialize(ctx context.Conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsDeleteFunctionInput(v *DeleteFunctionInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(v *DeleteFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.IfMatch != nil { - locationName := "If-Match" - encoder.SetHeader(locationName).String(*v.IfMatch) - } - - if v.Name == nil || len(*v.Name) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } - if v.Name != nil { - if err := encoder.SetURI("Name").String(*v.Name); err != nil { + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + return nil } -type awsRestxml_serializeOpDeleteKeyGroup struct { +type awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteFieldLevelEncryptionProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(v *DeleteFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteFunction struct { +} + +func (*awsRestxml_serializeOpDeleteFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteFunctionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteFunctionInput(v *DeleteFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteKeyGroup struct { } func (*awsRestxml_serializeOpDeleteKeyGroup) ID() string { @@ -3154,6 +3453,82 @@ func awsRestxml_serializeOpHttpBindingsDeleteStreamingDistributionInput(v *Delet return nil } +type awsRestxml_serializeOpDeleteVpcOrigin struct { +} + +func (*awsRestxml_serializeOpDeleteVpcOrigin) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteVpcOrigin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteVpcOriginInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/vpc-origin/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteVpcOriginInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteVpcOriginInput(v *DeleteVpcOriginInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + type awsRestxml_serializeOpDescribeFunction struct { } @@ -3300,6 +3675,77 @@ func awsRestxml_serializeOpHttpBindingsDescribeKeyValueStoreInput(v *DescribeKey return nil } +type awsRestxml_serializeOpGetAnycastIpList struct { +} + +func (*awsRestxml_serializeOpGetAnycastIpList) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetAnycastIpList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetAnycastIpListInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/anycast-ip-list/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetAnycastIpListInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetAnycastIpListInput(v *GetAnycastIpListInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + type awsRestxml_serializeOpGetCachePolicy struct { } @@ -5052,11 +5498,153 @@ func awsRestxml_serializeOpDocumentGetRealtimeLogConfigInput(v *GetRealtimeLogCo type awsRestxml_serializeOpGetResponseHeadersPolicy struct { } -func (*awsRestxml_serializeOpGetResponseHeadersPolicy) ID() string { +func (*awsRestxml_serializeOpGetResponseHeadersPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetResponseHeadersPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetResponseHeadersPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyInput(v *GetResponseHeadersPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetResponseHeadersPolicyConfig struct { +} + +func (*awsRestxml_serializeOpGetResponseHeadersPolicyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetResponseHeadersPolicyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetResponseHeadersPolicyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}/config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyConfigInput(v *GetResponseHeadersPolicyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetStreamingDistribution struct { +} + +func (*awsRestxml_serializeOpGetStreamingDistribution) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpGetResponseHeadersPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpGetStreamingDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5068,13 +5656,13 @@ func (m *awsRestxml_serializeOpGetResponseHeadersPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetResponseHeadersPolicyInput) + input, ok := in.Parameters.(*GetStreamingDistributionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -5090,7 +5678,7 @@ func (m *awsRestxml_serializeOpGetResponseHeadersPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5103,7 +5691,7 @@ func (m *awsRestxml_serializeOpGetResponseHeadersPolicy) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyInput(v *GetResponseHeadersPolicyInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(v *GetStreamingDistributionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5120,14 +5708,14 @@ func awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyInput(v *GetRespo return nil } -type awsRestxml_serializeOpGetResponseHeadersPolicyConfig struct { +type awsRestxml_serializeOpGetStreamingDistributionConfig struct { } -func (*awsRestxml_serializeOpGetResponseHeadersPolicyConfig) ID() string { +func (*awsRestxml_serializeOpGetStreamingDistributionConfig) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpGetResponseHeadersPolicyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpGetStreamingDistributionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5139,13 +5727,13 @@ func (m *awsRestxml_serializeOpGetResponseHeadersPolicyConfig) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetResponseHeadersPolicyConfigInput) + input, ok := in.Parameters.(*GetStreamingDistributionConfigInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}/config") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}/config") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -5161,7 +5749,7 @@ func (m *awsRestxml_serializeOpGetResponseHeadersPolicyConfig) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyConfigInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5174,7 +5762,7 @@ func (m *awsRestxml_serializeOpGetResponseHeadersPolicyConfig) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyConfigInput(v *GetResponseHeadersPolicyConfigInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(v *GetStreamingDistributionConfigInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5191,14 +5779,14 @@ func awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyConfigInput(v *Ge return nil } -type awsRestxml_serializeOpGetStreamingDistribution struct { +type awsRestxml_serializeOpGetVpcOrigin struct { } -func (*awsRestxml_serializeOpGetStreamingDistribution) ID() string { +func (*awsRestxml_serializeOpGetVpcOrigin) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpGetStreamingDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpGetVpcOrigin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5210,13 +5798,13 @@ func (m *awsRestxml_serializeOpGetStreamingDistribution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetStreamingDistributionInput) + input, ok := in.Parameters.(*GetVpcOriginInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/vpc-origin/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -5232,7 +5820,7 @@ func (m *awsRestxml_serializeOpGetStreamingDistribution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsGetVpcOriginInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5245,7 +5833,7 @@ func (m *awsRestxml_serializeOpGetStreamingDistribution) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(v *GetStreamingDistributionInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsGetVpcOriginInput(v *GetVpcOriginInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5262,14 +5850,14 @@ func awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(v *GetStrea return nil } -type awsRestxml_serializeOpGetStreamingDistributionConfig struct { +type awsRestxml_serializeOpListAnycastIpLists struct { } -func (*awsRestxml_serializeOpGetStreamingDistributionConfig) ID() string { +func (*awsRestxml_serializeOpListAnycastIpLists) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpGetStreamingDistributionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpListAnycastIpLists) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5281,13 +5869,13 @@ func (m *awsRestxml_serializeOpGetStreamingDistributionConfig) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetStreamingDistributionConfigInput) + input, ok := in.Parameters.(*ListAnycastIpListsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}/config") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/anycast-ip-list") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -5303,7 +5891,7 @@ func (m *awsRestxml_serializeOpGetStreamingDistributionConfig) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsListAnycastIpListsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5316,18 +5904,17 @@ func (m *awsRestxml_serializeOpGetStreamingDistributionConfig) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(v *GetStreamingDistributionConfigInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsListAnycastIpListsInput(v *ListAnycastIpListsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) } return nil @@ -5695,6 +6282,85 @@ func awsRestxml_serializeOpHttpBindingsListDistributionsInput(v *ListDistributio return nil } +type awsRestxml_serializeOpListDistributionsByAnycastIpListId struct { +} + +func (*awsRestxml_serializeOpListDistributionsByAnycastIpListId) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByAnycastIpListId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListDistributionsByAnycastIpListIdInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByAnycastIpListId/{AnycastIpListId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListDistributionsByAnycastIpListIdInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListDistributionsByAnycastIpListIdInput(v *ListDistributionsByAnycastIpListIdInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AnycastIpListId == nil || len(*v.AnycastIpListId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AnycastIpListId must not be empty")} + } + if v.AnycastIpListId != nil { + if err := encoder.SetURI("AnycastIpListId").String(*v.AnycastIpListId); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + type awsRestxml_serializeOpListDistributionsByCachePolicyId struct { } @@ -6136,6 +6802,85 @@ func awsRestxml_serializeOpHttpBindingsListDistributionsByResponseHeadersPolicyI return nil } +type awsRestxml_serializeOpListDistributionsByVpcOriginId struct { +} + +func (*awsRestxml_serializeOpListDistributionsByVpcOriginId) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByVpcOriginId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListDistributionsByVpcOriginIdInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByVpcOriginId/{VpcOriginId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListDistributionsByVpcOriginIdInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListDistributionsByVpcOriginIdInput(v *ListDistributionsByVpcOriginIdInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if v.VpcOriginId == nil || len(*v.VpcOriginId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member VpcOriginId must not be empty")} + } + if v.VpcOriginId != nil { + if err := encoder.SetURI("VpcOriginId").String(*v.VpcOriginId); err != nil { + return err + } + } + + return nil +} + type awsRestxml_serializeOpListDistributionsByWebACLId struct { } @@ -7029,13 +7774,83 @@ func (m *awsRestxml_serializeOpListStreamingDistributions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListStreamingDistributionsInput) + input, ok := in.Parameters.(*ListStreamingDistributionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(v *ListStreamingDistributionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListTagsForResource struct { +} + +func (*awsRestxml_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/tagging") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7051,7 +7866,7 @@ func (m *awsRestxml_serializeOpListStreamingDistributions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7064,30 +7879,26 @@ func (m *awsRestxml_serializeOpListStreamingDistributions) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(v *ListStreamingDistributionsInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Marker != nil { - encoder.SetQuery("Marker").String(*v.Marker) - } - - if v.MaxItems != nil { - encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + if v.Resource != nil { + encoder.SetQuery("Resource").String(*v.Resource) } return nil } -type awsRestxml_serializeOpListTagsForResource struct { +type awsRestxml_serializeOpListVpcOrigins struct { } -func (*awsRestxml_serializeOpListTagsForResource) ID() string { +func (*awsRestxml_serializeOpListVpcOrigins) ID() string { return "OperationSerializer" } -func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestxml_serializeOpListVpcOrigins) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7099,13 +7910,13 @@ func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*ListVpcOriginsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/2020-05-31/tagging") + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/vpc-origin") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7121,7 +7932,7 @@ func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + if err := awsRestxml_serializeOpHttpBindingsListVpcOriginsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7134,13 +7945,17 @@ func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { +func awsRestxml_serializeOpHttpBindingsListVpcOriginsInput(v *ListVpcOriginsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Resource != nil { - encoder.SetQuery("Resource").String(*v.Resource) + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) } return nil @@ -9176,6 +9991,106 @@ func awsRestxml_serializeOpHttpBindingsUpdateStreamingDistributionInput(v *Updat return nil } +type awsRestxml_serializeOpUpdateVpcOrigin struct { +} + +func (*awsRestxml_serializeOpUpdateVpcOrigin) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateVpcOrigin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateVpcOriginInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/vpc-origin/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsUpdateVpcOriginInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.VpcOriginEndpointConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VpcOriginEndpointConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentVpcOriginEndpointConfig(input.VpcOriginEndpointConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsUpdateVpcOriginInput(v *UpdateVpcOriginInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + func awsRestxml_serializeDocumentAccessControlAllowHeadersList(v []string, value smithyxml.Value) error { var array *smithyxml.Array if !value.IsFlattened() { @@ -9452,6 +10367,19 @@ func awsRestxml_serializeDocumentCacheBehavior(v *types.CacheBehavior, value smi return err } } + if v.GrpcConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "GrpcConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentGrpcConfig(v.GrpcConfig, el); err != nil { + return err + } + } if v.LambdaFunctionAssociations != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -10454,6 +11382,19 @@ func awsRestxml_serializeDocumentDefaultCacheBehavior(v *types.DefaultCacheBehav return err } } + if v.GrpcConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "GrpcConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentGrpcConfig(v.GrpcConfig, el); err != nil { + return err + } + } if v.LambdaFunctionAssociations != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -10599,6 +11540,17 @@ func awsRestxml_serializeDocumentDistributionConfig(v *types.DistributionConfig, return err } } + if v.AnycastIpListId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AnycastIpListId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.AnycastIpListId) + } if v.CacheBehaviors != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -11368,6 +12320,22 @@ func awsRestxml_serializeDocumentGeoRestriction(v *types.GeoRestriction, value s return nil } +func awsRestxml_serializeDocumentGrpcConfig(v *types.GrpcConfig, value smithyxml.Value) error { + defer value.Close() + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + return nil +} + func awsRestxml_serializeDocumentHeaderList(v []string, value smithyxml.Value) error { var array *smithyxml.Array if !value.IsFlattened() { @@ -11923,6 +12891,19 @@ func awsRestxml_serializeDocumentOrigin(v *types.Origin, value smithyxml.Value) return err } } + if v.VpcOriginConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VpcOriginConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentVpcOriginConfig(v.VpcOriginConfig, el); err != nil { + return err + } + } return nil } @@ -14354,3 +15335,92 @@ func awsRestxml_serializeDocumentViewerCertificate(v *types.ViewerCertificate, v } return nil } + +func awsRestxml_serializeDocumentVpcOriginConfig(v *types.VpcOriginConfig, value smithyxml.Value) error { + defer value.Close() + if v.VpcOriginId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VpcOriginId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.VpcOriginId) + } + return nil +} + +func awsRestxml_serializeDocumentVpcOriginEndpointConfig(v *types.VpcOriginEndpointConfig, value smithyxml.Value) error { + defer value.Close() + if v.Arn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Arn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Arn) + } + if v.HTTPPort != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HTTPPort", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.HTTPPort) + } + if v.HTTPSPort != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HTTPSPort", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.HTTPSPort) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if len(v.OriginProtocolPolicy) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginProtocolPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.OriginProtocolPolicy)) + } + if v.OriginSslProtocols != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginSslProtocols", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginSslProtocols(v.OriginSslProtocols, el); err != nil { + return err + } + } + return nil +} diff --git a/service/cloudfront/snapshot/api_op_CreateAnycastIpList.go.snap b/service/cloudfront/snapshot/api_op_CreateAnycastIpList.go.snap new file mode 100644 index 00000000000..5580cfcfb0e --- /dev/null +++ b/service/cloudfront/snapshot/api_op_CreateAnycastIpList.go.snap @@ -0,0 +1,41 @@ +CreateAnycastIpList + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_CreateVpcOrigin.go.snap b/service/cloudfront/snapshot/api_op_CreateVpcOrigin.go.snap new file mode 100644 index 00000000000..6970fec2a9b --- /dev/null +++ b/service/cloudfront/snapshot/api_op_CreateVpcOrigin.go.snap @@ -0,0 +1,41 @@ +CreateVpcOrigin + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_DeleteAnycastIpList.go.snap b/service/cloudfront/snapshot/api_op_DeleteAnycastIpList.go.snap new file mode 100644 index 00000000000..d6b30eda4a4 --- /dev/null +++ b/service/cloudfront/snapshot/api_op_DeleteAnycastIpList.go.snap @@ -0,0 +1,41 @@ +DeleteAnycastIpList + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_DeleteVpcOrigin.go.snap b/service/cloudfront/snapshot/api_op_DeleteVpcOrigin.go.snap new file mode 100644 index 00000000000..7919a7024ae --- /dev/null +++ b/service/cloudfront/snapshot/api_op_DeleteVpcOrigin.go.snap @@ -0,0 +1,41 @@ +DeleteVpcOrigin + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_GetAnycastIpList.go.snap b/service/cloudfront/snapshot/api_op_GetAnycastIpList.go.snap new file mode 100644 index 00000000000..0a57e1c128c --- /dev/null +++ b/service/cloudfront/snapshot/api_op_GetAnycastIpList.go.snap @@ -0,0 +1,41 @@ +GetAnycastIpList + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_GetVpcOrigin.go.snap b/service/cloudfront/snapshot/api_op_GetVpcOrigin.go.snap new file mode 100644 index 00000000000..02ed557c78f --- /dev/null +++ b/service/cloudfront/snapshot/api_op_GetVpcOrigin.go.snap @@ -0,0 +1,41 @@ +GetVpcOrigin + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_ListAnycastIpLists.go.snap b/service/cloudfront/snapshot/api_op_ListAnycastIpLists.go.snap new file mode 100644 index 00000000000..8db7302564c --- /dev/null +++ b/service/cloudfront/snapshot/api_op_ListAnycastIpLists.go.snap @@ -0,0 +1,40 @@ +ListAnycastIpLists + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_ListDistributionsByAnycastIpListId.go.snap b/service/cloudfront/snapshot/api_op_ListDistributionsByAnycastIpListId.go.snap new file mode 100644 index 00000000000..e83a6329a26 --- /dev/null +++ b/service/cloudfront/snapshot/api_op_ListDistributionsByAnycastIpListId.go.snap @@ -0,0 +1,41 @@ +ListDistributionsByAnycastIpListId + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_ListDistributionsByVpcOriginId.go.snap b/service/cloudfront/snapshot/api_op_ListDistributionsByVpcOriginId.go.snap new file mode 100644 index 00000000000..f37ab1f8662 --- /dev/null +++ b/service/cloudfront/snapshot/api_op_ListDistributionsByVpcOriginId.go.snap @@ -0,0 +1,41 @@ +ListDistributionsByVpcOriginId + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_ListVpcOrigins.go.snap b/service/cloudfront/snapshot/api_op_ListVpcOrigins.go.snap new file mode 100644 index 00000000000..8eb467f0684 --- /dev/null +++ b/service/cloudfront/snapshot/api_op_ListVpcOrigins.go.snap @@ -0,0 +1,40 @@ +ListVpcOrigins + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot/api_op_UpdateVpcOrigin.go.snap b/service/cloudfront/snapshot/api_op_UpdateVpcOrigin.go.snap new file mode 100644 index 00000000000..e8da3ac1abd --- /dev/null +++ b/service/cloudfront/snapshot/api_op_UpdateVpcOrigin.go.snap @@ -0,0 +1,41 @@ +UpdateVpcOrigin + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/cloudfront/snapshot_test.go b/service/cloudfront/snapshot_test.go index 8a64596f5a7..921077924d0 100644 --- a/service/cloudfront/snapshot_test.go +++ b/service/cloudfront/snapshot_test.go @@ -86,6 +86,18 @@ func TestCheckSnapshot_CopyDistribution(t *testing.T) { } } +func TestCheckSnapshot_CreateAnycastIpList(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateAnycastIpList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateAnycastIpList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateCachePolicy(t *testing.T) { svc := New(Options{}) _, err := svc.CreateCachePolicy(context.Background(), nil, func(o *Options) { @@ -314,6 +326,30 @@ func TestCheckSnapshot_CreateStreamingDistributionWithTags(t *testing.T) { } } +func TestCheckSnapshot_CreateVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteAnycastIpList(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteAnycastIpList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteAnycastIpList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteCachePolicy(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteCachePolicy(context.Background(), nil, func(o *Options) { @@ -506,6 +542,18 @@ func TestCheckSnapshot_DeleteStreamingDistribution(t *testing.T) { } } +func TestCheckSnapshot_DeleteVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeFunction(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeFunction(context.Background(), nil, func(o *Options) { @@ -530,6 +578,18 @@ func TestCheckSnapshot_DescribeKeyValueStore(t *testing.T) { } } +func TestCheckSnapshot_GetAnycastIpList(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAnycastIpList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetAnycastIpList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetCachePolicy(t *testing.T) { svc := New(Options{}) _, err := svc.GetCachePolicy(context.Background(), nil, func(o *Options) { @@ -866,6 +926,30 @@ func TestCheckSnapshot_GetStreamingDistributionConfig(t *testing.T) { } } +func TestCheckSnapshot_GetVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListAnycastIpLists(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAnycastIpLists(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListAnycastIpLists") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListCachePolicies(t *testing.T) { svc := New(Options{}) _, err := svc.ListCachePolicies(context.Background(), nil, func(o *Options) { @@ -926,6 +1010,18 @@ func TestCheckSnapshot_ListDistributions(t *testing.T) { } } +func TestCheckSnapshot_ListDistributionsByAnycastIpListId(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDistributionsByAnycastIpListId(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListDistributionsByAnycastIpListId") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDistributionsByCachePolicyId(t *testing.T) { svc := New(Options{}) _, err := svc.ListDistributionsByCachePolicyId(context.Background(), nil, func(o *Options) { @@ -986,6 +1082,18 @@ func TestCheckSnapshot_ListDistributionsByResponseHeadersPolicyId(t *testing.T) } } +func TestCheckSnapshot_ListDistributionsByVpcOriginId(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDistributionsByVpcOriginId(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListDistributionsByVpcOriginId") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDistributionsByWebACLId(t *testing.T) { svc := New(Options{}) _, err := svc.ListDistributionsByWebACLId(context.Background(), nil, func(o *Options) { @@ -1154,6 +1262,18 @@ func TestCheckSnapshot_ListTagsForResource(t *testing.T) { } } +func TestCheckSnapshot_ListVpcOrigins(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListVpcOrigins(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListVpcOrigins") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_PublishFunction(t *testing.T) { svc := New(Options{}) _, err := svc.PublishFunction(context.Background(), nil, func(o *Options) { @@ -1393,6 +1513,18 @@ func TestCheckSnapshot_UpdateStreamingDistribution(t *testing.T) { t.Fatal(err) } } + +func TestCheckSnapshot_UpdateVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} func TestUpdateSnapshot_AssociateAlias(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateAlias(context.Background(), nil, func(o *Options) { @@ -1417,6 +1549,18 @@ func TestUpdateSnapshot_CopyDistribution(t *testing.T) { } } +func TestUpdateSnapshot_CreateAnycastIpList(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateAnycastIpList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateAnycastIpList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateCachePolicy(t *testing.T) { svc := New(Options{}) _, err := svc.CreateCachePolicy(context.Background(), nil, func(o *Options) { @@ -1645,6 +1789,30 @@ func TestUpdateSnapshot_CreateStreamingDistributionWithTags(t *testing.T) { } } +func TestUpdateSnapshot_CreateVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteAnycastIpList(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteAnycastIpList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteAnycastIpList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteCachePolicy(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteCachePolicy(context.Background(), nil, func(o *Options) { @@ -1837,6 +2005,18 @@ func TestUpdateSnapshot_DeleteStreamingDistribution(t *testing.T) { } } +func TestUpdateSnapshot_DeleteVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeFunction(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeFunction(context.Background(), nil, func(o *Options) { @@ -1861,6 +2041,18 @@ func TestUpdateSnapshot_DescribeKeyValueStore(t *testing.T) { } } +func TestUpdateSnapshot_GetAnycastIpList(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAnycastIpList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetAnycastIpList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetCachePolicy(t *testing.T) { svc := New(Options{}) _, err := svc.GetCachePolicy(context.Background(), nil, func(o *Options) { @@ -2197,6 +2389,30 @@ func TestUpdateSnapshot_GetStreamingDistributionConfig(t *testing.T) { } } +func TestUpdateSnapshot_GetVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListAnycastIpLists(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAnycastIpLists(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListAnycastIpLists") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListCachePolicies(t *testing.T) { svc := New(Options{}) _, err := svc.ListCachePolicies(context.Background(), nil, func(o *Options) { @@ -2257,6 +2473,18 @@ func TestUpdateSnapshot_ListDistributions(t *testing.T) { } } +func TestUpdateSnapshot_ListDistributionsByAnycastIpListId(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDistributionsByAnycastIpListId(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListDistributionsByAnycastIpListId") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDistributionsByCachePolicyId(t *testing.T) { svc := New(Options{}) _, err := svc.ListDistributionsByCachePolicyId(context.Background(), nil, func(o *Options) { @@ -2317,6 +2545,18 @@ func TestUpdateSnapshot_ListDistributionsByResponseHeadersPolicyId(t *testing.T) } } +func TestUpdateSnapshot_ListDistributionsByVpcOriginId(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDistributionsByVpcOriginId(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListDistributionsByVpcOriginId") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDistributionsByWebACLId(t *testing.T) { svc := New(Options{}) _, err := svc.ListDistributionsByWebACLId(context.Background(), nil, func(o *Options) { @@ -2485,6 +2725,18 @@ func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { } } +func TestUpdateSnapshot_ListVpcOrigins(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListVpcOrigins(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListVpcOrigins") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_PublishFunction(t *testing.T) { svc := New(Options{}) _, err := svc.PublishFunction(context.Background(), nil, func(o *Options) { @@ -2724,3 +2976,15 @@ func TestUpdateSnapshot_UpdateStreamingDistribution(t *testing.T) { t.Fatal(err) } } + +func TestUpdateSnapshot_UpdateVpcOrigin(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateVpcOrigin(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateVpcOrigin") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/cloudfront/types/errors.go b/service/cloudfront/types/errors.go index c0043671003..d048f8eefad 100644 --- a/service/cloudfront/types/errors.go +++ b/service/cloudfront/types/errors.go @@ -141,7 +141,7 @@ func (e *CannotChangeImmutablePublicKeyFields) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The key value store entity cannot be deleted while it is in use. +// The entity cannot be deleted while it is in use. type CannotDeleteEntityWhileInUse struct { Message *string @@ -167,6 +167,32 @@ func (e *CannotDeleteEntityWhileInUse) ErrorCode() string { } func (e *CannotDeleteEntityWhileInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The entity cannot be updated while it is in use. +type CannotUpdateEntityWhileInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CannotUpdateEntityWhileInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CannotUpdateEntityWhileInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CannotUpdateEntityWhileInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CannotUpdateEntityWhileInUse" + } + return *e.ErrorCodeOverride +} +func (e *CannotUpdateEntityWhileInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // If the CallerReference is a value you already sent in a previous request to // create an identity but the content of the CloudFrontOriginAccessIdentityConfig // is different from the original request, CloudFront returns a @@ -361,8 +387,7 @@ func (e *DistributionNotDisabled) ErrorCode() string { } func (e *DistributionNotDisabled) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The key value store entity already exists. You must provide a unique key value -// store entity. +// The entity already exists. You must provide a unique entity. type EntityAlreadyExists struct { Message *string @@ -388,7 +413,7 @@ func (e *EntityAlreadyExists) ErrorCode() string { } func (e *EntityAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The key value store entity limit has been exceeded. +// The entity limit has been exceeded. type EntityLimitExceeded struct { Message *string @@ -414,7 +439,7 @@ func (e *EntityLimitExceeded) ErrorCode() string { } func (e *EntityLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The key value store entity was not found. +// The entity was not found. type EntityNotFound struct { Message *string @@ -440,7 +465,7 @@ func (e *EntityNotFound) ErrorCode() string { } func (e *EntityNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The key value store entity size limit was exceeded. +// The entity size limit was exceeded. type EntitySizeLimitExceeded struct { Message *string @@ -685,7 +710,7 @@ func (e *FunctionSizeLimitExceeded) ErrorCode() string { } func (e *FunctionSizeLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// You cannot delete a managed policy. +// Deletion is not allowed for this entity. type IllegalDelete struct { Message *string diff --git a/service/cloudfront/types/types.go b/service/cloudfront/types/types.go index 7b8baae95a3..34c0845a41b 100644 --- a/service/cloudfront/types/types.go +++ b/service/cloudfront/types/types.go @@ -158,6 +158,125 @@ type AllowedMethods struct { noSmithyDocumentSerde } +// An Anycast static IP list. +type AnycastIpList struct { + + // The static IP addresses that are allocated to the Anycast static IP list. + // + // This member is required. + AnycastIps []string + + // The Amazon Resource Name (ARN) of the Anycast static IP list. + // + // This member is required. + Arn *string + + // The ID of the Anycast static IP list. + // + // This member is required. + Id *string + + // The number of IP addresses in the Anycast static IP list. + // + // This member is required. + IpCount *int32 + + // The last time the Anycast static IP list was modified. + // + // This member is required. + LastModifiedTime *time.Time + + // The name of the Anycast static IP list. + // + // This member is required. + Name *string + + // The status of the Anycast static IP list. Valid values: Deployed , Deploying , + // or Failed . + // + // This member is required. + Status *string + + noSmithyDocumentSerde +} + +// The Anycast static IP list collection. +type AnycastIpListCollection struct { + + // If there are more items in the list collection than are in this response, this + // value is true . + // + // This member is required. + IsTruncated *bool + + // Use this field when paginating results to indicate where to begin in your list. + // The response includes items in the list that occur after the marker. To get the + // next page of the list, set this field's value to the value of NextMarker from + // the current page's response. + // + // This member is required. + Marker *string + + // The maximum number of Anycast static IP list collections that you want returned + // in the response. + // + // This member is required. + MaxItems *int32 + + // The quantity of Anycast static IP lists in the collection. + // + // This member is required. + Quantity *int32 + + // Items in the Anycast static IP list collection. Each item is of the AnycastIpListSummary structure + // type. + Items []AnycastIpListSummary + + // Indicates the next page of the Anycast static IP list collection. To get the + // next page of the list, use this value in the Marker field of your request. + NextMarker *string + + noSmithyDocumentSerde +} + +// An abbreviated version of the AnycastIpList structure. Omits the allocated static IP +// addresses (AnycastIpList$AnycastIps ). +type AnycastIpListSummary struct { + + // The Amazon Resource Name (ARN) of the Anycast static IP list. + // + // This member is required. + Arn *string + + // The ID of the Anycast static IP list. + // + // This member is required. + Id *string + + // The number of IP addresses in the Anycast static IP list. + // + // This member is required. + IpCount *int32 + + // The last time the Anycast static IP list was modified. + // + // This member is required. + LastModifiedTime *time.Time + + // The name of the Anycast static IP list. + // + // This member is required. + Name *string + + // The deployment status of the Anycast static IP list. Valid values: Deployed, + // Deploying, or Failed. + // + // This member is required. + Status *string + + noSmithyDocumentSerde +} + // A complex type that describes how CloudFront processes requests. // // You must create at least as many cache behaviors (including the default cache @@ -335,6 +454,9 @@ type CacheBehavior struct { // a cache behavior. FunctionAssociations *FunctionAssociations + // The gRPC configuration for your cache behavior. + GrpcConfig *GrpcConfig + // A complex type that contains zero or more Lambda@Edge function associations for // a cache behavior. LambdaFunctionAssociations *LambdaFunctionAssociations @@ -1460,6 +1582,9 @@ type DefaultCacheBehavior struct { // cache behavior. FunctionAssociations *FunctionAssociations + // The gRPC configuration for your cache behavior. + GrpcConfig *GrpcConfig + // A complex type that contains zero or more Lambda@Edge function associations for // a cache behavior. LambdaFunctionAssociations *LambdaFunctionAssociations @@ -1668,6 +1793,9 @@ type DistributionConfig struct { // if any, for this distribution. Aliases *Aliases + // ID of the Anycast static IP list that is associated with the distribution. + AnycastIpListId *string + // A complex type that contains zero or more CacheBehavior elements. CacheBehaviors *CacheBehaviors @@ -2044,6 +2172,9 @@ type DistributionSummary struct { // [Signup, Accounts, and Credentials]: https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html AliasICPRecordals []AliasICPRecordal + // ID of the Anycast static IP list that is associated with the distribution. + AnycastIpListId *string + // A complex type that contains information about origin groups for this // distribution. OriginGroups *OriginGroups @@ -2634,6 +2765,28 @@ type GeoRestriction struct { noSmithyDocumentSerde } +// Amazon CloudFront supports gRPC, an open-source remote procedure call (RPC) +// framework built on HTTP/2. gRPC offers bi-directional streaming and binary +// protocol that buffers payloads, making it suitable for applications that require +// low latency communications. +// +// To enable your distribution to handle gRPC requests, you must include HTTP/2 as +// one of the supported HTTP versions and allow HTTP methods, including POST . +// +// For more information, see [Using gRPC with CloudFront distributions] in the Amazon CloudFront Developer Guide. +// +// [Using gRPC with CloudFront distributions]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-using-grpc.html +type GrpcConfig struct { + + // Enables your CloudFront distribution to receive gRPC requests and to proxy them + // directly to your origins. + // + // This member is required. + Enabled *bool + + noSmithyDocumentSerde +} + // Contains a list of HTTP header names. type Headers struct { @@ -3075,24 +3228,30 @@ type LambdaFunctionAssociations struct { noSmithyDocumentSerde } -// A complex type that controls whether access logs are written for the +// A complex type that specifies whether access logs are written for the // distribution. +// +// If you already enabled standard logging (legacy) and you want to enable +// standard logging (v2) to send your access logs to Amazon S3, we recommend that +// you specify a different Amazon S3 bucket or use a separate path in the same +// bucket (for example, use a log prefix or partitioning). This helps you keep +// track of which log files are associated with which logging subscription and +// prevents log files from overwriting each other. For more information, see [Standard logging (access logs)]in +// the Amazon CloudFront Developer Guide. +// +// [Standard logging (access logs)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html type LoggingConfig struct { // The Amazon S3 bucket to store the access logs in, for example, - // myawslogbucket.s3.amazonaws.com . - // - // This member is required. + // amzn-s3-demo-bucket.s3.amazonaws.com . Bucket *string // Specifies whether you want CloudFront to save access logs to an Amazon S3 // bucket. If you don't want to enable logging when you create a distribution or if // you want to disable logging for an existing distribution, specify false for // Enabled , and specify empty Bucket and Prefix elements. If you specify false - // for Enabled but you specify values for Bucket , prefix , and IncludeCookies , - // the values are automatically deleted. - // - // This member is required. + // for Enabled but you specify values for Bucket and prefix , the values are + // automatically deleted. Enabled *bool // Specifies whether you want CloudFront to include cookies in access logs, @@ -3101,16 +3260,12 @@ type LoggingConfig struct { // for this distribution. If you don't want to include cookies when you create a // distribution or if you want to disable include cookies for an existing // distribution, specify false for IncludeCookies . - // - // This member is required. IncludeCookies *bool // An optional string that you want CloudFront to prefix to the access log // filenames for this distribution, for example, myprefix/ . If you want to enable // logging, but you don't want to specify a prefix, you still must include an empty // Prefix element in the Logging element. - // - // This member is required. Prefix *string noSmithyDocumentSerde @@ -3238,6 +3393,9 @@ type Origin struct { // use the CustomOriginConfig type instead. S3OriginConfig *S3OriginConfig + // The VPC origin configuration. + VpcOriginConfig *VpcOriginConfig + noSmithyDocumentSerde } @@ -5289,7 +5447,7 @@ type StreamingDistributionSummary struct { type StreamingLoggingConfig struct { // The Amazon S3 bucket to store the access logs in, for example, - // myawslogbucket.s3.amazonaws.com . + // amzn-s3-demo-bucket.s3.amazonaws.com . // // This member is required. Bucket *string @@ -5597,4 +5755,161 @@ type ViewerCertificate struct { noSmithyDocumentSerde } +// An Amazon CloudFront VPC origin. +type VpcOrigin struct { + + // The VPC origin ARN. + // + // This member is required. + Arn *string + + // The VPC origin created time. + // + // This member is required. + CreatedTime *time.Time + + // The VPC origin ID. + // + // This member is required. + Id *string + + // The VPC origin last modified time. + // + // This member is required. + LastModifiedTime *time.Time + + // The VPC origin status. + // + // This member is required. + Status *string + + // The VPC origin endpoint configuration. + // + // This member is required. + VpcOriginEndpointConfig *VpcOriginEndpointConfig + + noSmithyDocumentSerde +} + +// An Amazon CloudFront VPC origin configuration. +type VpcOriginConfig struct { + + // The VPC origin ID. + // + // This member is required. + VpcOriginId *string + + noSmithyDocumentSerde +} + +// An Amazon CloudFront VPC origin endpoint configuration. +type VpcOriginEndpointConfig struct { + + // The ARN of the CloudFront VPC origin endpoint configuration. + // + // This member is required. + Arn *string + + // The HTTP port for the CloudFront VPC origin endpoint configuration. + // + // This member is required. + HTTPPort *int32 + + // The HTTPS port of the CloudFront VPC origin endpoint configuration. + // + // This member is required. + HTTPSPort *int32 + + // The name of the CloudFront VPC origin endpoint configuration. + // + // This member is required. + Name *string + + // The origin protocol policy for the CloudFront VPC origin endpoint configuration. + // + // This member is required. + OriginProtocolPolicy OriginProtocolPolicy + + // A complex type that contains information about the SSL/TLS protocols that + // CloudFront can use when establishing an HTTPS connection with your origin. + OriginSslProtocols *OriginSslProtocols + + noSmithyDocumentSerde +} + +// A list of CloudFront VPC origins. +type VpcOriginList struct { + + // A flag that indicates whether more VPC origins remain to be listed. If your + // results were truncated, you can make a follow-up pagination request using the + // Marker request parameter to retrieve more VPC origins in the list. + // + // This member is required. + IsTruncated *bool + + // The marker associated with the VPC origins list. + // + // This member is required. + Marker *string + + // The maximum number of items included in the list. + // + // This member is required. + MaxItems *int32 + + // The number of VPC origins in the list. + // + // This member is required. + Quantity *int32 + + // The items of the VPC origins list. + Items []VpcOriginSummary + + // The next marker associated with the VPC origins list. + NextMarker *string + + noSmithyDocumentSerde +} + +// A summary of the CloudFront VPC origin. +type VpcOriginSummary struct { + + // The VPC origin summary ARN. + // + // This member is required. + Arn *string + + // The VPC origin summary created time. + // + // This member is required. + CreatedTime *time.Time + + // The VPC origin summary ID. + // + // This member is required. + Id *string + + // The VPC origin summary last modified time. + // + // This member is required. + LastModifiedTime *time.Time + + // The VPC origin summary name. + // + // This member is required. + Name *string + + // The VPC origin summary origin endpoint ARN. + // + // This member is required. + OriginEndpointArn *string + + // The VPC origin summary status. + // + // This member is required. + Status *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/cloudfront/validators.go b/service/cloudfront/validators.go index 6f73473dd2b..743260ca71b 100644 --- a/service/cloudfront/validators.go +++ b/service/cloudfront/validators.go @@ -50,6 +50,26 @@ func (m *validateOpCopyDistribution) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpCreateAnycastIpList struct { +} + +func (*validateOpCreateAnycastIpList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAnycastIpList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAnycastIpListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAnycastIpListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateCachePolicy struct { } @@ -430,6 +450,46 @@ func (m *validateOpCreateStreamingDistributionWithTags) HandleInitialize(ctx con return next.HandleInitialize(ctx, in) } +type validateOpCreateVpcOrigin struct { +} + +func (*validateOpCreateVpcOrigin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateVpcOrigin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateVpcOriginInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateVpcOriginInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAnycastIpList struct { +} + +func (*validateOpDeleteAnycastIpList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAnycastIpList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAnycastIpListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAnycastIpListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteCachePolicy struct { } @@ -730,6 +790,26 @@ func (m *validateOpDeleteStreamingDistribution) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpDeleteVpcOrigin struct { +} + +func (*validateOpDeleteVpcOrigin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteVpcOrigin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteVpcOriginInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteVpcOriginInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeFunction struct { } @@ -770,6 +850,26 @@ func (m *validateOpDescribeKeyValueStore) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpGetAnycastIpList struct { +} + +func (*validateOpGetAnycastIpList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAnycastIpList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAnycastIpListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAnycastIpListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetCachePolicyConfig struct { } @@ -1310,6 +1410,26 @@ func (m *validateOpGetStreamingDistribution) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpGetVpcOrigin struct { +} + +func (*validateOpGetVpcOrigin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetVpcOrigin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetVpcOriginInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetVpcOriginInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListConflictingAliases struct { } @@ -1330,6 +1450,26 @@ func (m *validateOpListConflictingAliases) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpListDistributionsByAnycastIpListId struct { +} + +func (*validateOpListDistributionsByAnycastIpListId) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDistributionsByAnycastIpListId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDistributionsByAnycastIpListIdInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDistributionsByAnycastIpListIdInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListDistributionsByCachePolicyId struct { } @@ -1410,6 +1550,26 @@ func (m *validateOpListDistributionsByResponseHeadersPolicyId) HandleInitialize( return next.HandleInitialize(ctx, in) } +type validateOpListDistributionsByVpcOriginId struct { +} + +func (*validateOpListDistributionsByVpcOriginId) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDistributionsByVpcOriginId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDistributionsByVpcOriginIdInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDistributionsByVpcOriginIdInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListDistributionsByWebACLId struct { } @@ -1870,6 +2030,26 @@ func (m *validateOpUpdateStreamingDistribution) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpUpdateVpcOrigin struct { +} + +func (*validateOpUpdateVpcOrigin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateVpcOrigin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateVpcOriginInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateVpcOriginInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpAssociateAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateAlias{}, middleware.After) } @@ -1878,6 +2058,10 @@ func addOpCopyDistributionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCopyDistribution{}, middleware.After) } +func addOpCreateAnycastIpListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAnycastIpList{}, middleware.After) +} + func addOpCreateCachePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateCachePolicy{}, middleware.After) } @@ -1954,6 +2138,14 @@ func addOpCreateStreamingDistributionWithTagsValidationMiddleware(stack *middlew return stack.Initialize.Add(&validateOpCreateStreamingDistributionWithTags{}, middleware.After) } +func addOpCreateVpcOriginValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateVpcOrigin{}, middleware.After) +} + +func addOpDeleteAnycastIpListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAnycastIpList{}, middleware.After) +} + func addOpDeleteCachePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteCachePolicy{}, middleware.After) } @@ -2014,6 +2206,10 @@ func addOpDeleteStreamingDistributionValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpDeleteStreamingDistribution{}, middleware.After) } +func addOpDeleteVpcOriginValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteVpcOrigin{}, middleware.After) +} + func addOpDescribeFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeFunction{}, middleware.After) } @@ -2022,6 +2218,10 @@ func addOpDescribeKeyValueStoreValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDescribeKeyValueStore{}, middleware.After) } +func addOpGetAnycastIpListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAnycastIpList{}, middleware.After) +} + func addOpGetCachePolicyConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetCachePolicyConfig{}, middleware.After) } @@ -2130,10 +2330,18 @@ func addOpGetStreamingDistributionValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpGetStreamingDistribution{}, middleware.After) } +func addOpGetVpcOriginValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetVpcOrigin{}, middleware.After) +} + func addOpListConflictingAliasesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListConflictingAliases{}, middleware.After) } +func addOpListDistributionsByAnycastIpListIdValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDistributionsByAnycastIpListId{}, middleware.After) +} + func addOpListDistributionsByCachePolicyIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDistributionsByCachePolicyId{}, middleware.After) } @@ -2150,6 +2358,10 @@ func addOpListDistributionsByResponseHeadersPolicyIdValidationMiddleware(stack * return stack.Initialize.Add(&validateOpListDistributionsByResponseHeadersPolicyId{}, middleware.After) } +func addOpListDistributionsByVpcOriginIdValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDistributionsByVpcOriginId{}, middleware.After) +} + func addOpListDistributionsByWebACLIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDistributionsByWebACLId{}, middleware.After) } @@ -2242,6 +2454,10 @@ func addOpUpdateStreamingDistributionValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpUpdateStreamingDistribution{}, middleware.After) } +func addOpUpdateVpcOriginValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateVpcOrigin{}, middleware.After) +} + func validateAliases(v *types.Aliases) error { if v == nil { return nil @@ -2319,6 +2535,11 @@ func validateCacheBehavior(v *types.CacheBehavior) error { invalidParams.AddNested("FunctionAssociations", err.(smithy.InvalidParamsError)) } } + if v.GrpcConfig != nil { + if err := validateGrpcConfig(v.GrpcConfig); err != nil { + invalidParams.AddNested("GrpcConfig", err.(smithy.InvalidParamsError)) + } + } if v.ForwardedValues != nil { if err := validateForwardedValues(v.ForwardedValues); err != nil { invalidParams.AddNested("ForwardedValues", err.(smithy.InvalidParamsError)) @@ -2796,6 +3017,11 @@ func validateDefaultCacheBehavior(v *types.DefaultCacheBehavior) error { invalidParams.AddNested("FunctionAssociations", err.(smithy.InvalidParamsError)) } } + if v.GrpcConfig != nil { + if err := validateGrpcConfig(v.GrpcConfig); err != nil { + invalidParams.AddNested("GrpcConfig", err.(smithy.InvalidParamsError)) + } + } if v.ForwardedValues != nil { if err := validateForwardedValues(v.ForwardedValues); err != nil { invalidParams.AddNested("ForwardedValues", err.(smithy.InvalidParamsError)) @@ -2853,11 +3079,6 @@ func validateDistributionConfig(v *types.DistributionConfig) error { if v.Comment == nil { invalidParams.Add(smithy.NewErrParamRequired("Comment")) } - if v.Logging != nil { - if err := validateLoggingConfig(v.Logging); err != nil { - invalidParams.AddNested("Logging", err.(smithy.InvalidParamsError)) - } - } if v.Enabled == nil { invalidParams.Add(smithy.NewErrParamRequired("Enabled")) } @@ -3191,6 +3412,21 @@ func validateGeoRestriction(v *types.GeoRestriction) error { } } +func validateGrpcConfig(v *types.GrpcConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GrpcConfig"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateHeaders(v *types.Headers) error { if v == nil { return nil @@ -3389,30 +3625,6 @@ func validateLambdaFunctionAssociations(v *types.LambdaFunctionAssociations) err } } -func validateLoggingConfig(v *types.LoggingConfig) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "LoggingConfig"} - if v.Enabled == nil { - invalidParams.Add(smithy.NewErrParamRequired("Enabled")) - } - if v.IncludeCookies == nil { - invalidParams.Add(smithy.NewErrParamRequired("IncludeCookies")) - } - if v.Bucket == nil { - invalidParams.Add(smithy.NewErrParamRequired("Bucket")) - } - if v.Prefix == nil { - invalidParams.Add(smithy.NewErrParamRequired("Prefix")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateMonitoringSubscription(v *types.MonitoringSubscription) error { if v == nil { return nil @@ -3456,6 +3668,11 @@ func validateOrigin(v *types.Origin) error { invalidParams.AddNested("CustomOriginConfig", err.(smithy.InvalidParamsError)) } } + if v.VpcOriginConfig != nil { + if err := validateVpcOriginConfig(v.VpcOriginConfig); err != nil { + invalidParams.AddNested("VpcOriginConfig", err.(smithy.InvalidParamsError)) + } + } if v.OriginShield != nil { if err := validateOriginShield(v.OriginShield); err != nil { invalidParams.AddNested("OriginShield", err.(smithy.InvalidParamsError)) @@ -4756,6 +4973,53 @@ func validateTrustedSigners(v *types.TrustedSigners) error { } } +func validateVpcOriginConfig(v *types.VpcOriginConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "VpcOriginConfig"} + if v.VpcOriginId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcOriginId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateVpcOriginEndpointConfig(v *types.VpcOriginEndpointConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "VpcOriginEndpointConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.HTTPPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("HTTPPort")) + } + if v.HTTPSPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("HTTPSPort")) + } + if len(v.OriginProtocolPolicy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("OriginProtocolPolicy")) + } + if v.OriginSslProtocols != nil { + if err := validateOriginSslProtocols(v.OriginSslProtocols); err != nil { + invalidParams.AddNested("OriginSslProtocols", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAssociateAliasInput(v *AssociateAliasInput) error { if v == nil { return nil @@ -4792,6 +5056,29 @@ func validateOpCopyDistributionInput(v *CopyDistributionInput) error { } } +func validateOpCreateAnycastIpListInput(v *CreateAnycastIpListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAnycastIpListInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.IpCount == nil { + invalidParams.Add(smithy.NewErrParamRequired("IpCount")) + } + if v.Tags != nil { + if err := validateTags(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateCachePolicyInput(v *CreateCachePolicyInput) error { if v == nil { return nil @@ -5175,6 +5462,48 @@ func validateOpCreateStreamingDistributionWithTagsInput(v *CreateStreamingDistri } } +func validateOpCreateVpcOriginInput(v *CreateVpcOriginInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateVpcOriginInput"} + if v.VpcOriginEndpointConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcOriginEndpointConfig")) + } else if v.VpcOriginEndpointConfig != nil { + if err := validateVpcOriginEndpointConfig(v.VpcOriginEndpointConfig); err != nil { + invalidParams.AddNested("VpcOriginEndpointConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTags(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAnycastIpListInput(v *DeleteAnycastIpListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAnycastIpListInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteCachePolicyInput(v *DeleteCachePolicyInput) error { if v == nil { return nil @@ -5406,6 +5735,24 @@ func validateOpDeleteStreamingDistributionInput(v *DeleteStreamingDistributionIn } } +func validateOpDeleteVpcOriginInput(v *DeleteVpcOriginInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteVpcOriginInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeFunctionInput(v *DescribeFunctionInput) error { if v == nil { return nil @@ -5436,6 +5783,21 @@ func validateOpDescribeKeyValueStoreInput(v *DescribeKeyValueStoreInput) error { } } +func validateOpGetAnycastIpListInput(v *GetAnycastIpListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAnycastIpListInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetCachePolicyConfigInput(v *GetCachePolicyConfigInput) error { if v == nil { return nil @@ -5844,6 +6206,21 @@ func validateOpGetStreamingDistributionInput(v *GetStreamingDistributionInput) e } } +func validateOpGetVpcOriginInput(v *GetVpcOriginInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetVpcOriginInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListConflictingAliasesInput(v *ListConflictingAliasesInput) error { if v == nil { return nil @@ -5862,6 +6239,21 @@ func validateOpListConflictingAliasesInput(v *ListConflictingAliasesInput) error } } +func validateOpListDistributionsByAnycastIpListIdInput(v *ListDistributionsByAnycastIpListIdInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDistributionsByAnycastIpListIdInput"} + if v.AnycastIpListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AnycastIpListId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListDistributionsByCachePolicyIdInput(v *ListDistributionsByCachePolicyIdInput) error { if v == nil { return nil @@ -5922,6 +6314,21 @@ func validateOpListDistributionsByResponseHeadersPolicyIdInput(v *ListDistributi } } +func validateOpListDistributionsByVpcOriginIdInput(v *ListDistributionsByVpcOriginIdInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDistributionsByVpcOriginIdInput"} + if v.VpcOriginId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcOriginId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListDistributionsByWebACLIdInput(v *ListDistributionsByWebACLIdInput) error { if v == nil { return nil @@ -6390,3 +6797,28 @@ func validateOpUpdateStreamingDistributionInput(v *UpdateStreamingDistributionIn return nil } } + +func validateOpUpdateVpcOriginInput(v *UpdateVpcOriginInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateVpcOriginInput"} + if v.VpcOriginEndpointConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcOriginEndpointConfig")) + } else if v.VpcOriginEndpointConfig != nil { + if err := validateVpcOriginEndpointConfig(v.VpcOriginEndpointConfig); err != nil { + invalidParams.AddNested("VpcOriginEndpointConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/computeoptimizer/api_op_ExportIdleRecommendations.go b/service/computeoptimizer/api_op_ExportIdleRecommendations.go new file mode 100644 index 00000000000..9f45d199bb8 --- /dev/null +++ b/service/computeoptimizer/api_op_ExportIdleRecommendations.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package computeoptimizer + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Export optimization recommendations for your idle resources. +// +// Recommendations are exported in a comma-separated values (CSV) file, and its +// metadata in a JavaScript Object Notation (JSON) file, to an existing Amazon +// Simple Storage Service (Amazon S3) bucket that you specify. For more +// information, see [Exporting Recommendations]in the Compute Optimizer User Guide. +// +// You can have only one idle resource export job in progress per Amazon Web +// Services Region. +// +// [Exporting Recommendations]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html +func (c *Client) ExportIdleRecommendations(ctx context.Context, params *ExportIdleRecommendationsInput, optFns ...func(*Options)) (*ExportIdleRecommendationsOutput, error) { + if params == nil { + params = &ExportIdleRecommendationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExportIdleRecommendations", params, optFns, c.addOperationExportIdleRecommendationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExportIdleRecommendationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExportIdleRecommendationsInput struct { + + // Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name + // and key prefix for a recommendations export job. + // + // You must create the destination Amazon S3 bucket for your recommendations + // export before you create the export job. Compute Optimizer does not create the + // S3 bucket for you. After you create the S3 bucket, ensure that it has the + // required permission policy to allow Compute Optimizer to write the export file + // to it. If you plan to specify an object prefix when you create the export job, + // you must include the object prefix in the policy that you add to the S3 bucket. + // For more information, see [Amazon S3 Bucket Policy for Compute Optimizer]in the Compute Optimizer User Guide. + // + // [Amazon S3 Bucket Policy for Compute Optimizer]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html + // + // This member is required. + S3DestinationConfig *types.S3DestinationConfig + + // The Amazon Web Services account IDs for the export idle resource + // recommendations. + // + // If your account is the management account or the delegated administrator of an + // organization, use this parameter to specify the member account you want to + // export recommendations to. + // + // This parameter can't be specified together with the include member accounts + // parameter. The parameters are mutually exclusive. + // + // If this parameter or the include member accounts parameter is omitted, the + // recommendations for member accounts aren't included in the export. + // + // You can specify multiple account IDs per request. + AccountIds []string + + // The recommendations data to include in the export file. For more information + // about the fields that can be exported, see [Exported files]in the Compute Optimizer User Guide. + // + // [Exported files]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files + FieldsToExport []types.ExportableIdleField + + // The format of the export file. The CSV file is the only export file format + // currently supported. + FileFormat types.FileFormat + + // An array of objects to specify a filter that exports a more specific set of + // idle resource recommendations. + Filters []types.IdleRecommendationFilter + + // If your account is the management account or the delegated administrator of an + // organization, this parameter indicates whether to include recommendations for + // resources in all member accounts of the organization. + // + // The member accounts must also be opted in to Compute Optimizer, and trusted + // access for Compute Optimizer must be enabled in the organization account. For + // more information, see [Compute Optimizer and Amazon Web Services Organizations trusted access]in the Compute Optimizer User Guide. + // + // If this parameter is omitted, recommendations for member accounts of the + // organization aren't included in the export file. + // + // If this parameter or the account ID parameter is omitted, recommendations for + // member accounts aren't included in the export. + // + // [Compute Optimizer and Amazon Web Services Organizations trusted access]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access + IncludeMemberAccounts bool + + noSmithyDocumentSerde +} + +type ExportIdleRecommendationsOutput struct { + + // The identification number of the export job. + // + // To view the status of an export job, use the DescribeRecommendationExportJobs action and specify the job ID. + JobId *string + + // Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name + // and object keys of a recommendations export file, and its associated metadata + // file. + S3Destination *types.S3Destination + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExportIdleRecommendationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpExportIdleRecommendations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpExportIdleRecommendations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ExportIdleRecommendations"); 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 = addSpanRetryLoop(stack, options); 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 = addOpExportIdleRecommendationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportIdleRecommendations(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opExportIdleRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ExportIdleRecommendations", + } +} diff --git a/service/computeoptimizer/api_op_GetIdleRecommendations.go b/service/computeoptimizer/api_op_GetIdleRecommendations.go new file mode 100644 index 00000000000..75fa752011a --- /dev/null +++ b/service/computeoptimizer/api_op_GetIdleRecommendations.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package computeoptimizer + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns idle resource recommendations. Compute Optimizer generates +// recommendations for idle resources that meet a specific set of requirements. For +// more information, see [Resource requirements]in the Compute Optimizer User Guide +// +// [Resource requirements]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html +func (c *Client) GetIdleRecommendations(ctx context.Context, params *GetIdleRecommendationsInput, optFns ...func(*Options)) (*GetIdleRecommendationsOutput, error) { + if params == nil { + params = &GetIdleRecommendationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIdleRecommendations", params, optFns, c.addOperationGetIdleRecommendationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIdleRecommendationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIdleRecommendationsInput struct { + + // Return the idle resource recommendations to the specified Amazon Web Services + // account IDs. + // + // If your account is the management account or the delegated administrator of an + // organization, use this parameter to return the idle resource recommendations to + // specific member accounts. + // + // You can only specify one account ID per request. + AccountIds []string + + // An array of objects to specify a filter that returns a more specific list of + // idle resource recommendations. + Filters []types.IdleRecommendationFilter + + // The maximum number of idle resource recommendations to return with a single + // request. + // + // To retrieve the remaining results, make another request with the returned + // nextToken value. + MaxResults *int32 + + // The token to advance to the next page of idle resource recommendations. + NextToken *string + + // The order to sort the idle resource recommendations. + OrderBy *types.OrderBy + + // The ARN that identifies the idle resource. + ResourceArns []string + + noSmithyDocumentSerde +} + +type GetIdleRecommendationsOutput struct { + + // An array of objects that describe errors of the request. + Errors []types.IdleRecommendationError + + // An array of objects that describe the idle resource recommendations. + IdleRecommendations []types.IdleRecommendation + + // The token to advance to the next page of idle resource recommendations. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetIdleRecommendationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetIdleRecommendations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetIdleRecommendations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetIdleRecommendations"); 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 = addSpanRetryLoop(stack, options); 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_opGetIdleRecommendations(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetIdleRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetIdleRecommendations", + } +} diff --git a/service/computeoptimizer/deserializers.go b/service/computeoptimizer/deserializers.go index 30e6963459d..fca1ce246cf 100644 --- a/service/computeoptimizer/deserializers.go +++ b/service/computeoptimizer/deserializers.go @@ -822,6 +822,138 @@ func awsAwsjson10_deserializeOpErrorExportECSServiceRecommendations(response *sm } } +type awsAwsjson10_deserializeOpExportIdleRecommendations struct { +} + +func (*awsAwsjson10_deserializeOpExportIdleRecommendations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpExportIdleRecommendations) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorExportIdleRecommendations(response, &metadata) + } + output := &ExportIdleRecommendationsOutput{} + 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 = awsAwsjson10_deserializeOpDocumentExportIdleRecommendationsOutput(&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 awsAwsjson10_deserializeOpErrorExportIdleRecommendations(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("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MissingAuthenticationToken", errorCode): + return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + + case strings.EqualFold("OptInRequiredException", errorCode): + return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpExportLambdaFunctionRecommendations struct { } @@ -2394,6 +2526,138 @@ func awsAwsjson10_deserializeOpErrorGetEnrollmentStatusesForOrganization(respons } } +type awsAwsjson10_deserializeOpGetIdleRecommendations struct { +} + +func (*awsAwsjson10_deserializeOpGetIdleRecommendations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetIdleRecommendations) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorGetIdleRecommendations(response, &metadata) + } + output := &GetIdleRecommendationsOutput{} + 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 = awsAwsjson10_deserializeOpDocumentGetIdleRecommendationsOutput(&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 awsAwsjson10_deserializeOpErrorGetIdleRecommendations(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("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("MissingAuthenticationToken", errorCode): + return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + + case strings.EqualFold("OptInRequiredException", errorCode): + return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations struct { } @@ -6656,22 +6920,687 @@ func awsAwsjson10_deserializeDocumentGetRecommendationError(v **types.GetRecomme sv.Code = ptr.String(jtv) } - case "identifier": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Identifier to be of type string, got %T instead", value) - } - sv.Identifier = ptr.String(jtv) - } + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Identifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentGetRecommendationErrors(v *[]types.GetRecommendationError, 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.GetRecommendationError + if *v == nil { + cv = []types.GetRecommendationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GetRecommendationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentGetRecommendationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentGpu(v **types.Gpu, 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.Gpu + if *v == nil { + sv = &types.Gpu{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gpuCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GpuCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GpuCount = int32(i64) + } + + case "gpuMemorySizeInMiB": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GpuMemorySizeInMiB to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GpuMemorySizeInMiB = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentGpuInfo(v **types.GpuInfo, 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.GpuInfo + if *v == nil { + sv = &types.GpuInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gpus": + if err := awsAwsjson10_deserializeDocumentGpus(&sv.Gpus, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentGpus(v *[]types.Gpu, 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.Gpu + if *v == nil { + cv = []types.Gpu{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Gpu + destAddr := &col + if err := awsAwsjson10_deserializeDocumentGpu(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentIdleEstimatedMonthlySavings(v **types.IdleEstimatedMonthlySavings, 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.IdleEstimatedMonthlySavings + if *v == nil { + sv = &types.IdleEstimatedMonthlySavings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "currency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Currency to be of type string, got %T instead", value) + } + sv.Currency = types.Currency(jtv) + } + + case "value": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Value = f64 + + default: + return fmt.Errorf("expected Value to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentIdleRecommendation(v **types.IdleRecommendation, 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.IdleRecommendation + if *v == nil { + sv = &types.IdleRecommendation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "finding": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdleFinding to be of type string, got %T instead", value) + } + sv.Finding = types.IdleFinding(jtv) + } + + case "findingDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdleFindingDescription to be of type string, got %T instead", value) + } + sv.FindingDescription = ptr.String(jtv) + } + + case "lastRefreshTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastRefreshTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastRefreshTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lookBackPeriodInDays": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LookBackPeriodInDays = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LookBackPeriodInDays = f64 + + default: + return fmt.Errorf("expected LookBackPeriodInDays to be a JSON Number, got %T instead", value) + + } + } + + case "resourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdleRecommendationResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.IdleRecommendationResourceType(jtv) + } + + case "savingsOpportunity": + if err := awsAwsjson10_deserializeDocumentIdleSavingsOpportunity(&sv.SavingsOpportunity, value); err != nil { + return err + } + + case "savingsOpportunityAfterDiscounts": + if err := awsAwsjson10_deserializeDocumentIdleSavingsOpportunityAfterDiscounts(&sv.SavingsOpportunityAfterDiscounts, value); err != nil { + return err + } + + case "tags": + if err := awsAwsjson10_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "utilizationMetrics": + if err := awsAwsjson10_deserializeDocumentIdleUtilizationMetrics(&sv.UtilizationMetrics, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentIdleRecommendationError(v **types.IdleRecommendationError, 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.IdleRecommendationError + if *v == nil { + sv = &types.IdleRecommendationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Code to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Identifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdleRecommendationResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.IdleRecommendationResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentIdleRecommendationErrors(v *[]types.IdleRecommendationError, 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.IdleRecommendationError + if *v == nil { + cv = []types.IdleRecommendationError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdleRecommendationError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentIdleRecommendationError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentIdleRecommendations(v *[]types.IdleRecommendation, 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.IdleRecommendation + if *v == nil { + cv = []types.IdleRecommendation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdleRecommendation + destAddr := &col + if err := awsAwsjson10_deserializeDocumentIdleRecommendation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentIdleSavingsOpportunity(v **types.IdleSavingsOpportunity, 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.IdleSavingsOpportunity + if *v == nil { + sv = &types.IdleSavingsOpportunity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "estimatedMonthlySavings": + if err := awsAwsjson10_deserializeDocumentIdleEstimatedMonthlySavings(&sv.EstimatedMonthlySavings, value); err != nil { + return err + } + + case "savingsOpportunityPercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SavingsOpportunityPercentage = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.SavingsOpportunityPercentage = f64 + + default: + return fmt.Errorf("expected SavingsOpportunityPercentage to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentIdleSavingsOpportunityAfterDiscounts(v **types.IdleSavingsOpportunityAfterDiscounts, 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.IdleSavingsOpportunityAfterDiscounts + if *v == nil { + sv = &types.IdleSavingsOpportunityAfterDiscounts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "estimatedMonthlySavings": + if err := awsAwsjson10_deserializeDocumentIdleEstimatedMonthlySavings(&sv.EstimatedMonthlySavings, value); err != nil { + return err + } + + case "savingsOpportunityPercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SavingsOpportunityPercentage = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.SavingsOpportunityPercentage = f64 + + default: + return fmt.Errorf("expected SavingsOpportunityPercentage to be a JSON Number, got %T instead", value) - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) } default: @@ -6683,7 +7612,7 @@ func awsAwsjson10_deserializeDocumentGetRecommendationError(v **types.GetRecomme return nil } -func awsAwsjson10_deserializeDocumentGetRecommendationErrors(v *[]types.GetRecommendationError, value interface{}) error { +func awsAwsjson10_deserializeDocumentIdleSummaries(v *[]types.IdleSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6696,17 +7625,17 @@ func awsAwsjson10_deserializeDocumentGetRecommendationErrors(v *[]types.GetRecom return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.GetRecommendationError + var cv []types.IdleSummary if *v == nil { - cv = []types.GetRecommendationError{} + cv = []types.IdleSummary{} } else { cv = *v } for _, value := range shape { - var col types.GetRecommendationError + var col types.IdleSummary destAddr := &col - if err := awsAwsjson10_deserializeDocumentGetRecommendationError(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentIdleSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -6717,7 +7646,7 @@ func awsAwsjson10_deserializeDocumentGetRecommendationErrors(v *[]types.GetRecom return nil } -func awsAwsjson10_deserializeDocumentGpu(v **types.Gpu, value interface{}) error { +func awsAwsjson10_deserializeDocumentIdleSummary(v **types.IdleSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6730,39 +7659,56 @@ func awsAwsjson10_deserializeDocumentGpu(v **types.Gpu, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Gpu + var sv *types.IdleSummary if *v == nil { - sv = &types.Gpu{} + sv = &types.IdleSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "gpuCount": + case "name": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GpuCount to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected IdleFinding to be of type string, got %T instead", value) } - sv.GpuCount = int32(i64) + sv.Name = types.IdleFinding(jtv) } - case "gpuMemorySizeInMiB": + case "value": if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected GpuMemorySizeInMiB to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Value = f64 + + default: + return fmt.Errorf("expected SummaryValue to be a JSON Number, got %T instead", value) + } - sv.GpuMemorySizeInMiB = int32(i64) } default: @@ -6774,7 +7720,7 @@ func awsAwsjson10_deserializeDocumentGpu(v **types.Gpu, value interface{}) error return nil } -func awsAwsjson10_deserializeDocumentGpuInfo(v **types.GpuInfo, value interface{}) error { +func awsAwsjson10_deserializeDocumentIdleUtilizationMetric(v **types.IdleUtilizationMetric, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6787,18 +7733,65 @@ func awsAwsjson10_deserializeDocumentGpuInfo(v **types.GpuInfo, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.GpuInfo + var sv *types.IdleUtilizationMetric if *v == nil { - sv = &types.GpuInfo{} + sv = &types.IdleUtilizationMetric{} } else { sv = *v } for key, value := range shape { switch key { - case "gpus": - if err := awsAwsjson10_deserializeDocumentGpus(&sv.Gpus, value); err != nil { - return err + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdleMetricName to be of type string, got %T instead", value) + } + sv.Name = types.IdleMetricName(jtv) + } + + case "statistic": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricStatistic to be of type string, got %T instead", value) + } + sv.Statistic = types.MetricStatistic(jtv) + } + + case "value": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Value = f64 + + default: + return fmt.Errorf("expected MetricValue to be a JSON Number, got %T instead", value) + + } } default: @@ -6810,7 +7803,7 @@ func awsAwsjson10_deserializeDocumentGpuInfo(v **types.GpuInfo, value interface{ return nil } -func awsAwsjson10_deserializeDocumentGpus(v *[]types.Gpu, value interface{}) error { +func awsAwsjson10_deserializeDocumentIdleUtilizationMetrics(v *[]types.IdleUtilizationMetric, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6823,17 +7816,17 @@ func awsAwsjson10_deserializeDocumentGpus(v *[]types.Gpu, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Gpu + var cv []types.IdleUtilizationMetric if *v == nil { - cv = []types.Gpu{} + cv = []types.IdleUtilizationMetric{} } else { cv = *v } for _, value := range shape { - var col types.Gpu + var col types.IdleUtilizationMetric destAddr := &col - if err := awsAwsjson10_deserializeDocumentGpu(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentIdleUtilizationMetric(&destAddr, value); err != nil { return err } col = *destAddr @@ -9723,11 +10716,29 @@ func awsAwsjson10_deserializeDocumentRDSDBRecommendation(v **types.RDSDBRecommen sv.CurrentDBInstanceClass = ptr.String(jtv) } + case "currentInstancePerformanceRisk": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RDSCurrentInstancePerformanceRisk to be of type string, got %T instead", value) + } + sv.CurrentInstancePerformanceRisk = types.RDSCurrentInstancePerformanceRisk(jtv) + } + case "currentStorageConfiguration": if err := awsAwsjson10_deserializeDocumentDBStorageConfiguration(&sv.CurrentStorageConfiguration, value); err != nil { return err } + case "dbClusterIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DBClusterIdentifier to be of type string, got %T instead", value) + } + sv.DbClusterIdentifier = ptr.String(jtv) + } + case "effectiveRecommendationPreferences": if err := awsAwsjson10_deserializeDocumentRDSEffectiveRecommendationPreferences(&sv.EffectiveRecommendationPreferences, value); err != nil { return err @@ -9829,6 +10840,19 @@ func awsAwsjson10_deserializeDocumentRDSDBRecommendation(v **types.RDSDBRecommen } } + case "promotionTier": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PromotionTier to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PromotionTier = ptr.Int32(int32(i64)) + } + case "resourceArn": if value != nil { jtv, ok := value.(string) @@ -11137,11 +12161,26 @@ func awsAwsjson10_deserializeDocumentRecommendationSummary(v **types.Recommendat sv.AccountId = ptr.String(jtv) } + case "aggregatedSavingsOpportunity": + if err := awsAwsjson10_deserializeDocumentSavingsOpportunity(&sv.AggregatedSavingsOpportunity, value); err != nil { + return err + } + case "currentPerformanceRiskRatings": if err := awsAwsjson10_deserializeDocumentCurrentPerformanceRiskRatings(&sv.CurrentPerformanceRiskRatings, value); err != nil { return err } + case "idleSavingsOpportunity": + if err := awsAwsjson10_deserializeDocumentSavingsOpportunity(&sv.IdleSavingsOpportunity, value); err != nil { + return err + } + + case "idleSummaries": + if err := awsAwsjson10_deserializeDocumentIdleSummaries(&sv.IdleSummaries, value); err != nil { + return err + } + case "inferredWorkloadSavings": if err := awsAwsjson10_deserializeDocumentInferredWorkloadSavings(&sv.InferredWorkloadSavings, value); err != nil { return err @@ -12752,6 +13791,51 @@ func awsAwsjson10_deserializeOpDocumentExportECSServiceRecommendationsOutput(v * return nil } +func awsAwsjson10_deserializeOpDocumentExportIdleRecommendationsOutput(v **ExportIdleRecommendationsOutput, 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 *ExportIdleRecommendationsOutput + if *v == nil { + sv = &ExportIdleRecommendationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + } + sv.JobId = ptr.String(jtv) + } + + case "s3Destination": + if err := awsAwsjson10_deserializeDocumentS3Destination(&sv.S3Destination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentExportLambdaFunctionRecommendationsOutput(v **ExportLambdaFunctionRecommendationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13355,6 +14439,56 @@ func awsAwsjson10_deserializeOpDocumentGetEnrollmentStatusOutput(v **GetEnrollme return nil } +func awsAwsjson10_deserializeOpDocumentGetIdleRecommendationsOutput(v **GetIdleRecommendationsOutput, 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 *GetIdleRecommendationsOutput + if *v == nil { + sv = &GetIdleRecommendationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsAwsjson10_deserializeDocumentIdleRecommendationErrors(&sv.Errors, value); err != nil { + return err + } + + case "idleRecommendations": + if err := awsAwsjson10_deserializeDocumentIdleRecommendations(&sv.IdleRecommendations, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentGetLambdaFunctionRecommendationsOutput(v **GetLambdaFunctionRecommendationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/computeoptimizer/generated.json b/service/computeoptimizer/generated.json index c4c5c9a5c18..c5e2fe90ac0 100644 --- a/service/computeoptimizer/generated.json +++ b/service/computeoptimizer/generated.json @@ -14,6 +14,7 @@ "api_op_ExportEBSVolumeRecommendations.go", "api_op_ExportEC2InstanceRecommendations.go", "api_op_ExportECSServiceRecommendations.go", + "api_op_ExportIdleRecommendations.go", "api_op_ExportLambdaFunctionRecommendations.go", "api_op_ExportLicenseRecommendations.go", "api_op_ExportRDSDatabaseRecommendations.go", @@ -26,6 +27,7 @@ "api_op_GetEffectiveRecommendationPreferences.go", "api_op_GetEnrollmentStatus.go", "api_op_GetEnrollmentStatusesForOrganization.go", + "api_op_GetIdleRecommendations.go", "api_op_GetLambdaFunctionRecommendations.go", "api_op_GetLicenseRecommendations.go", "api_op_GetRDSDatabaseRecommendationProjectedMetrics.go", diff --git a/service/computeoptimizer/serializers.go b/service/computeoptimizer/serializers.go index 19ffa4d982b..2d555fc12a6 100644 --- a/service/computeoptimizer/serializers.go +++ b/service/computeoptimizer/serializers.go @@ -383,6 +383,67 @@ func (m *awsAwsjson10_serializeOpExportECSServiceRecommendations) HandleSerializ return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpExportIdleRecommendations struct { +} + +func (*awsAwsjson10_serializeOpExportIdleRecommendations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpExportIdleRecommendations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ExportIdleRecommendationsInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("ComputeOptimizerService.ExportIdleRecommendations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentExportIdleRecommendationsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpExportLambdaFunctionRecommendations struct { } @@ -1115,6 +1176,67 @@ func (m *awsAwsjson10_serializeOpGetEnrollmentStatusesForOrganization) HandleSer return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpGetIdleRecommendations struct { +} + +func (*awsAwsjson10_serializeOpGetIdleRecommendations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetIdleRecommendations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetIdleRecommendationsInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("ComputeOptimizerService.GetIdleRecommendations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetIdleRecommendationsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpGetLambdaFunctionRecommendations struct { } @@ -1770,6 +1892,17 @@ func awsAwsjson10_serializeDocumentExportableECSServiceFields(v []types.Exportab return nil } +func awsAwsjson10_serializeDocumentExportableIdleFields(v []types.ExportableIdleField, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsAwsjson10_serializeDocumentExportableInstanceFields(v []types.ExportableInstanceField, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1891,6 +2024,38 @@ func awsAwsjson10_serializeDocumentFunctionArns(v []string, value smithyjson.Val return nil } +func awsAwsjson10_serializeDocumentIdleRecommendationFilter(v *types.IdleRecommendationFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Name) > 0 { + ok := object.Key("name") + ok.String(string(v.Name)) + } + + if v.Values != nil { + ok := object.Key("values") + if err := awsAwsjson10_serializeDocumentFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentIdleRecommendationFilters(v []types.IdleRecommendationFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentIdleRecommendationFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson10_serializeDocumentInstanceArns(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -2009,6 +2174,23 @@ func awsAwsjson10_serializeDocumentLicenseRecommendationFilters(v []types.Licens return nil } +func awsAwsjson10_serializeDocumentOrderBy(v *types.OrderBy, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Dimension) > 0 { + ok := object.Key("dimension") + ok.String(string(v.Dimension)) + } + + if len(v.Order) > 0 { + ok := object.Key("order") + ok.String(string(v.Order)) + } + + return nil +} + func awsAwsjson10_serializeDocumentPreferredResource(v *types.PreferredResource, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2466,6 +2648,51 @@ func awsAwsjson10_serializeOpDocumentExportECSServiceRecommendationsInput(v *Exp return nil } +func awsAwsjson10_serializeOpDocumentExportIdleRecommendationsInput(v *ExportIdleRecommendationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsAwsjson10_serializeDocumentAccountIds(v.AccountIds, ok); err != nil { + return err + } + } + + if v.FieldsToExport != nil { + ok := object.Key("fieldsToExport") + if err := awsAwsjson10_serializeDocumentExportableIdleFields(v.FieldsToExport, ok); err != nil { + return err + } + } + + if len(v.FileFormat) > 0 { + ok := object.Key("fileFormat") + ok.String(string(v.FileFormat)) + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentIdleRecommendationFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.IncludeMemberAccounts { + ok := object.Key("includeMemberAccounts") + ok.Boolean(v.IncludeMemberAccounts) + } + + if v.S3DestinationConfig != nil { + ok := object.Key("s3DestinationConfig") + if err := awsAwsjson10_serializeDocumentS3DestinationConfig(v.S3DestinationConfig, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentExportLambdaFunctionRecommendationsInput(v *ExportLambdaFunctionRecommendationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2888,6 +3115,51 @@ func awsAwsjson10_serializeOpDocumentGetEnrollmentStatusInput(v *GetEnrollmentSt return nil } +func awsAwsjson10_serializeOpDocumentGetIdleRecommendationsInput(v *GetIdleRecommendationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsAwsjson10_serializeDocumentAccountIds(v.AccountIds, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsAwsjson10_serializeDocumentIdleRecommendationFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.OrderBy != nil { + ok := object.Key("orderBy") + if err := awsAwsjson10_serializeDocumentOrderBy(v.OrderBy, ok); err != nil { + return err + } + } + + if v.ResourceArns != nil { + ok := object.Key("resourceArns") + if err := awsAwsjson10_serializeDocumentResourceArns(v.ResourceArns, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetLambdaFunctionRecommendationsInput(v *GetLambdaFunctionRecommendationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/computeoptimizer/snapshot/api_op_ExportIdleRecommendations.go.snap b/service/computeoptimizer/snapshot/api_op_ExportIdleRecommendations.go.snap new file mode 100644 index 00000000000..be6fa89ede1 --- /dev/null +++ b/service/computeoptimizer/snapshot/api_op_ExportIdleRecommendations.go.snap @@ -0,0 +1,41 @@ +ExportIdleRecommendations + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/computeoptimizer/snapshot/api_op_GetIdleRecommendations.go.snap b/service/computeoptimizer/snapshot/api_op_GetIdleRecommendations.go.snap new file mode 100644 index 00000000000..e02010fa89d --- /dev/null +++ b/service/computeoptimizer/snapshot/api_op_GetIdleRecommendations.go.snap @@ -0,0 +1,40 @@ +GetIdleRecommendations + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/computeoptimizer/snapshot_test.go b/service/computeoptimizer/snapshot_test.go index 8d48c9dfc57..51b79c15910 100644 --- a/service/computeoptimizer/snapshot_test.go +++ b/service/computeoptimizer/snapshot_test.go @@ -134,6 +134,18 @@ func TestCheckSnapshot_ExportECSServiceRecommendations(t *testing.T) { } } +func TestCheckSnapshot_ExportIdleRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ExportIdleRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ExportIdleRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ExportLambdaFunctionRecommendations(t *testing.T) { svc := New(Options{}) _, err := svc.ExportLambdaFunctionRecommendations(context.Background(), nil, func(o *Options) { @@ -278,6 +290,18 @@ func TestCheckSnapshot_GetEnrollmentStatusesForOrganization(t *testing.T) { } } +func TestCheckSnapshot_GetIdleRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetIdleRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetIdleRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetLambdaFunctionRecommendations(t *testing.T) { svc := New(Options{}) _, err := svc.GetLambdaFunctionRecommendations(context.Background(), nil, func(o *Options) { @@ -445,6 +469,18 @@ func TestUpdateSnapshot_ExportECSServiceRecommendations(t *testing.T) { } } +func TestUpdateSnapshot_ExportIdleRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ExportIdleRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ExportIdleRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ExportLambdaFunctionRecommendations(t *testing.T) { svc := New(Options{}) _, err := svc.ExportLambdaFunctionRecommendations(context.Background(), nil, func(o *Options) { @@ -589,6 +625,18 @@ func TestUpdateSnapshot_GetEnrollmentStatusesForOrganization(t *testing.T) { } } +func TestUpdateSnapshot_GetIdleRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetIdleRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetIdleRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetLambdaFunctionRecommendations(t *testing.T) { svc := New(Options{}) _, err := svc.GetLambdaFunctionRecommendations(context.Background(), nil, func(o *Options) { diff --git a/service/computeoptimizer/types/enums.go b/service/computeoptimizer/types/enums.go index ba42f4cae44..e1e4154ec96 100644 --- a/service/computeoptimizer/types/enums.go +++ b/service/computeoptimizer/types/enums.go @@ -145,6 +145,25 @@ func (CustomizableMetricThreshold) Values() []CustomizableMetricThreshold { } } +type Dimension string + +// Enum values for Dimension +const ( + DimensionSavingsValue Dimension = "SavingsValue" + DimensionSavingsValueAfterDiscount Dimension = "SavingsValueAfterDiscount" +) + +// Values returns all known values for Dimension. 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 (Dimension) Values() []Dimension { + return []Dimension{ + "SavingsValue", + "SavingsValueAfterDiscount", + } +} + type EBSFilterName string // Enum values for EBSFilterName @@ -627,6 +646,61 @@ func (ExportableECSServiceField) Values() []ExportableECSServiceField { } } +type ExportableIdleField string + +// Enum values for ExportableIdleField +const ( + ExportableIdleFieldAccountId ExportableIdleField = "AccountId" + ExportableIdleFieldResourceArn ExportableIdleField = "ResourceArn" + ExportableIdleFieldResourceId ExportableIdleField = "ResourceId" + ExportableIdleFieldResourceType ExportableIdleField = "ResourceType" + ExportableIdleFieldLastRefreshTimestamp ExportableIdleField = "LastRefreshTimestamp" + ExportableIdleFieldLookbackPeriodInDays ExportableIdleField = "LookbackPeriodInDays" + ExportableIdleFieldSavingsOpportunity ExportableIdleField = "SavingsOpportunity" + ExportableIdleFieldSavingsOpportunityAfterDiscount ExportableIdleField = "SavingsOpportunityAfterDiscount" + ExportableIdleFieldUtilizationMetricsCpuMaximum ExportableIdleField = "UtilizationMetricsCpuMaximum" + ExportableIdleFieldUtilizationMetricsMemoryMaximum ExportableIdleField = "UtilizationMetricsMemoryMaximum" + ExportableIdleFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableIdleField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" + ExportableIdleFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableIdleField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" + ExportableIdleFieldUtilizationMetricsDatabaseConnectionsMaximum ExportableIdleField = "UtilizationMetricsDatabaseConnectionsMaximum" + ExportableIdleFieldUtilizationMetricsEbsVolumeReadIopsMaximum ExportableIdleField = "UtilizationMetricsEBSVolumeReadIOPSMaximum" + ExportableIdleFieldUtilizationMetricsEbsVolumeWriteIopsMaximum ExportableIdleField = "UtilizationMetricsEBSVolumeWriteIOPSMaximum" + ExportableIdleFieldUtilizationMetricsVolumeReadOpsPerSecondMaximum ExportableIdleField = "UtilizationMetricsVolumeReadOpsPerSecondMaximum" + ExportableIdleFieldUtilizationMetricsVolumeWriteOpsPerSecondMaximum ExportableIdleField = "UtilizationMetricsVolumeWriteOpsPerSecondMaximum" + ExportableIdleFieldFinding ExportableIdleField = "Finding" + ExportableIdleFieldFindingDescription ExportableIdleField = "FindingDescription" + ExportableIdleFieldTags ExportableIdleField = "Tags" +) + +// Values returns all known values for ExportableIdleField. 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 (ExportableIdleField) Values() []ExportableIdleField { + return []ExportableIdleField{ + "AccountId", + "ResourceArn", + "ResourceId", + "ResourceType", + "LastRefreshTimestamp", + "LookbackPeriodInDays", + "SavingsOpportunity", + "SavingsOpportunityAfterDiscount", + "UtilizationMetricsCpuMaximum", + "UtilizationMetricsMemoryMaximum", + "UtilizationMetricsNetworkOutBytesPerSecondMaximum", + "UtilizationMetricsNetworkInBytesPerSecondMaximum", + "UtilizationMetricsDatabaseConnectionsMaximum", + "UtilizationMetricsEBSVolumeReadIOPSMaximum", + "UtilizationMetricsEBSVolumeWriteIOPSMaximum", + "UtilizationMetricsVolumeReadOpsPerSecondMaximum", + "UtilizationMetricsVolumeWriteOpsPerSecondMaximum", + "Finding", + "FindingDescription", + "Tags", + } +} + type ExportableInstanceField string // Enum values for ExportableInstanceField @@ -938,6 +1012,7 @@ const ( ExportableRDSDBFieldCurrentInstanceOnDemandHourlyPrice ExportableRDSDBField = "CurrentInstanceOnDemandHourlyPrice" ExportableRDSDBFieldCurrentStorageOnDemandMonthlyPrice ExportableRDSDBField = "CurrentStorageOnDemandMonthlyPrice" ExportableRDSDBFieldLookbackPeriodInDays ExportableRDSDBField = "LookbackPeriodInDays" + ExportableRDSDBFieldCurrentInstancePerformanceRisk ExportableRDSDBField = "CurrentInstancePerformanceRisk" ExportableRDSDBFieldUtilizationMetricsCpuMaximum ExportableRDSDBField = "UtilizationMetricsCpuMaximum" ExportableRDSDBFieldUtilizationMetricsMemoryMaximum ExportableRDSDBField = "UtilizationMetricsMemoryMaximum" ExportableRDSDBFieldUtilizationMetricsEbsVolumeStorageSpaceUtilizationMaximum ExportableRDSDBField = "UtilizationMetricsEBSVolumeStorageSpaceUtilizationMaximum" @@ -948,6 +1023,14 @@ const ( ExportableRDSDBFieldUtilizationMetricsEbsVolumeReadThroughputMaximum ExportableRDSDBField = "UtilizationMetricsEBSVolumeReadThroughputMaximum" ExportableRDSDBFieldUtilizationMetricsEbsVolumeWriteThroughputMaximum ExportableRDSDBField = "UtilizationMetricsEBSVolumeWriteThroughputMaximum" ExportableRDSDBFieldUtilizationMetricsDatabaseConnectionsMaximum ExportableRDSDBField = "UtilizationMetricsDatabaseConnectionsMaximum" + ExportableRDSDBFieldUtilizationMetricsStorageNetworkReceiveThroughputMaximum ExportableRDSDBField = "UtilizationMetricsStorageNetworkReceiveThroughputMaximum" + ExportableRDSDBFieldUtilizationMetricsStorageNetworkTransmitThroughputMaximum ExportableRDSDBField = "UtilizationMetricsStorageNetworkTransmitThroughputMaximum" + ExportableRDSDBFieldUtilizationMetricsAuroraMemoryHealthStateMaximum ExportableRDSDBField = "UtilizationMetricsAuroraMemoryHealthStateMaximum" + ExportableRDSDBFieldUtilizationMetricsAuroraMemoryNumDeclinedSqlTotalMaximum ExportableRDSDBField = "UtilizationMetricsAuroraMemoryNumDeclinedSqlTotalMaximum" + ExportableRDSDBFieldUtilizationMetricsAuroraMemoryNumKillConnTotalMaximum ExportableRDSDBField = "UtilizationMetricsAuroraMemoryNumKillConnTotalMaximum" + ExportableRDSDBFieldUtilizationMetricsAuroraMemoryNumKillQueryTotalMaximum ExportableRDSDBField = "UtilizationMetricsAuroraMemoryNumKillQueryTotalMaximum" + ExportableRDSDBFieldUtilizationMetricsReadIopsEphemeralStorageMaximum ExportableRDSDBField = "UtilizationMetricsReadIOPSEphemeralStorageMaximum" + ExportableRDSDBFieldUtilizationMetricsWriteIopsEphemeralStorageMaximum ExportableRDSDBField = "UtilizationMetricsWriteIOPSEphemeralStorageMaximum" ExportableRDSDBFieldInstanceFinding ExportableRDSDBField = "InstanceFinding" ExportableRDSDBFieldInstanceFindingReasonCodes ExportableRDSDBField = "InstanceFindingReasonCodes" ExportableRDSDBFieldStorageFinding ExportableRDSDBField = "StorageFinding" @@ -982,6 +1065,8 @@ const ( ExportableRDSDBFieldEffectiveRecommendationPreferencesSavingsEstimationMode ExportableRDSDBField = "EffectiveRecommendationPreferencesSavingsEstimationMode" ExportableRDSDBFieldLastRefreshTimestamp ExportableRDSDBField = "LastRefreshTimestamp" ExportableRDSDBFieldTags ExportableRDSDBField = "Tags" + ExportableRDSDBFieldDbClusterIdentifier ExportableRDSDBField = "DBClusterIdentifier" + ExportableRDSDBFieldPromotionTier ExportableRDSDBField = "PromotionTier" ) // Values returns all known values for ExportableRDSDBField. Note that this can be @@ -1005,6 +1090,7 @@ func (ExportableRDSDBField) Values() []ExportableRDSDBField { "CurrentInstanceOnDemandHourlyPrice", "CurrentStorageOnDemandMonthlyPrice", "LookbackPeriodInDays", + "CurrentInstancePerformanceRisk", "UtilizationMetricsCpuMaximum", "UtilizationMetricsMemoryMaximum", "UtilizationMetricsEBSVolumeStorageSpaceUtilizationMaximum", @@ -1015,6 +1101,14 @@ func (ExportableRDSDBField) Values() []ExportableRDSDBField { "UtilizationMetricsEBSVolumeReadThroughputMaximum", "UtilizationMetricsEBSVolumeWriteThroughputMaximum", "UtilizationMetricsDatabaseConnectionsMaximum", + "UtilizationMetricsStorageNetworkReceiveThroughputMaximum", + "UtilizationMetricsStorageNetworkTransmitThroughputMaximum", + "UtilizationMetricsAuroraMemoryHealthStateMaximum", + "UtilizationMetricsAuroraMemoryNumDeclinedSqlTotalMaximum", + "UtilizationMetricsAuroraMemoryNumKillConnTotalMaximum", + "UtilizationMetricsAuroraMemoryNumKillQueryTotalMaximum", + "UtilizationMetricsReadIOPSEphemeralStorageMaximum", + "UtilizationMetricsWriteIOPSEphemeralStorageMaximum", "InstanceFinding", "InstanceFindingReasonCodes", "StorageFinding", @@ -1049,6 +1143,8 @@ func (ExportableRDSDBField) Values() []ExportableRDSDBField { "EffectiveRecommendationPreferencesSavingsEstimationMode", "LastRefreshTimestamp", "Tags", + "DBClusterIdentifier", + "PromotionTier", } } @@ -1296,6 +1392,104 @@ func (Idle) Values() []Idle { } } +type IdleFinding string + +// Enum values for IdleFinding +const ( + IdleFindingIdle IdleFinding = "Idle" + IdleFindingUnattached IdleFinding = "Unattached" +) + +// Values returns all known values for IdleFinding. 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 (IdleFinding) Values() []IdleFinding { + return []IdleFinding{ + "Idle", + "Unattached", + } +} + +type IdleMetricName string + +// Enum values for IdleMetricName +const ( + IdleMetricNameCpu IdleMetricName = "CPU" + IdleMetricNameMemory IdleMetricName = "Memory" + IdleMetricNameNetworkOutBytesPerSecond IdleMetricName = "NetworkOutBytesPerSecond" + IdleMetricNameNetworkInBytesPerSecond IdleMetricName = "NetworkInBytesPerSecond" + IdleMetricNameDatabaseConnections IdleMetricName = "DatabaseConnections" + IdleMetricNameEbsVolumeReadIops IdleMetricName = "EBSVolumeReadIOPS" + IdleMetricNameEbsVolumeWriteIops IdleMetricName = "EBSVolumeWriteIOPS" + IdleMetricNameVolumeReadOpsPerSecond IdleMetricName = "VolumeReadOpsPerSecond" + IdleMetricNameVolumeWriteOpsPerSecond IdleMetricName = "VolumeWriteOpsPerSecond" +) + +// Values returns all known values for IdleMetricName. 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 (IdleMetricName) Values() []IdleMetricName { + return []IdleMetricName{ + "CPU", + "Memory", + "NetworkOutBytesPerSecond", + "NetworkInBytesPerSecond", + "DatabaseConnections", + "EBSVolumeReadIOPS", + "EBSVolumeWriteIOPS", + "VolumeReadOpsPerSecond", + "VolumeWriteOpsPerSecond", + } +} + +type IdleRecommendationFilterName string + +// Enum values for IdleRecommendationFilterName +const ( + IdleRecommendationFilterNameFinding IdleRecommendationFilterName = "Finding" + IdleRecommendationFilterNameResourceType IdleRecommendationFilterName = "ResourceType" +) + +// Values returns all known values for IdleRecommendationFilterName. 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 (IdleRecommendationFilterName) Values() []IdleRecommendationFilterName { + return []IdleRecommendationFilterName{ + "Finding", + "ResourceType", + } +} + +type IdleRecommendationResourceType string + +// Enum values for IdleRecommendationResourceType +const ( + IdleRecommendationResourceTypeEc2Instance IdleRecommendationResourceType = "EC2Instance" + IdleRecommendationResourceTypeAutoScalingGroup IdleRecommendationResourceType = "AutoScalingGroup" + IdleRecommendationResourceTypeEbsVolume IdleRecommendationResourceType = "EBSVolume" + IdleRecommendationResourceTypeEcsService IdleRecommendationResourceType = "ECSService" + IdleRecommendationResourceTypeRdsDbInstance IdleRecommendationResourceType = "RDSDBInstance" +) + +// Values returns all known values for IdleRecommendationResourceType. 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 (IdleRecommendationResourceType) Values() []IdleRecommendationResourceType { + return []IdleRecommendationResourceType{ + "EC2Instance", + "AutoScalingGroup", + "EBSVolume", + "ECSService", + "RDSDBInstance", + } +} + type InferredWorkloadType string // Enum values for InferredWorkloadType @@ -1934,6 +2128,25 @@ func (MigrationEffort) Values() []MigrationEffort { } } +type Order string + +// Enum values for Order +const ( + OrderAsc Order = "Asc" + OrderDesc Order = "Desc" +) + +// Values returns all known values for Order. 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 (Order) Values() []Order { + return []Order{ + "Asc", + "Desc", + } +} + type PlatformDifference string // Enum values for PlatformDifference @@ -1978,6 +2191,30 @@ func (PreferredResourceName) Values() []PreferredResourceName { } } +type RDSCurrentInstancePerformanceRisk string + +// Enum values for RDSCurrentInstancePerformanceRisk +const ( + RDSCurrentInstancePerformanceRiskVeryLow RDSCurrentInstancePerformanceRisk = "VeryLow" + RDSCurrentInstancePerformanceRiskLow RDSCurrentInstancePerformanceRisk = "Low" + RDSCurrentInstancePerformanceRiskMedium RDSCurrentInstancePerformanceRisk = "Medium" + RDSCurrentInstancePerformanceRiskHigh RDSCurrentInstancePerformanceRisk = "High" +) + +// Values returns all known values for RDSCurrentInstancePerformanceRisk. 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 (RDSCurrentInstancePerformanceRisk) Values() []RDSCurrentInstancePerformanceRisk { + return []RDSCurrentInstancePerformanceRisk{ + "VeryLow", + "Low", + "Medium", + "High", + } +} + type RDSDBMetricName string // Enum values for RDSDBMetricName @@ -1992,6 +2229,14 @@ const ( RDSDBMetricNameEbsVolumeReadThroughput RDSDBMetricName = "EBSVolumeReadThroughput" RDSDBMetricNameEbsVolumeWriteThroughput RDSDBMetricName = "EBSVolumeWriteThroughput" RDSDBMetricNameDatabaseConnections RDSDBMetricName = "DatabaseConnections" + RDSDBMetricNameStorageNetworkReceiveThroughput RDSDBMetricName = "StorageNetworkReceiveThroughput" + RDSDBMetricNameStorageNetworkTransmitThroughput RDSDBMetricName = "StorageNetworkTransmitThroughput" + RDSDBMetricNameAuroraMemoryHealthState RDSDBMetricName = "AuroraMemoryHealthState" + RDSDBMetricNameAuroraMemoryNumDeclinedSql RDSDBMetricName = "AuroraMemoryNumDeclinedSql" + RDSDBMetricNameAuroraMemoryNumKillConnTotal RDSDBMetricName = "AuroraMemoryNumKillConnTotal" + RDSDBMetricNameAuroraMemoryNumKillQueryTotal RDSDBMetricName = "AuroraMemoryNumKillQueryTotal" + RDSDBMetricNameReadIopsEphemeralStorage RDSDBMetricName = "ReadIOPSEphemeralStorage" + RDSDBMetricNameWriteIopsEphemeralStorage RDSDBMetricName = "WriteIOPSEphemeralStorage" ) // Values returns all known values for RDSDBMetricName. Note that this can be @@ -2010,6 +2255,14 @@ func (RDSDBMetricName) Values() []RDSDBMetricName { "EBSVolumeReadThroughput", "EBSVolumeWriteThroughput", "DatabaseConnections", + "StorageNetworkReceiveThroughput", + "StorageNetworkTransmitThroughput", + "AuroraMemoryHealthState", + "AuroraMemoryNumDeclinedSql", + "AuroraMemoryNumKillConnTotal", + "AuroraMemoryNumKillQueryTotal", + "ReadIOPSEphemeralStorage", + "WriteIOPSEphemeralStorage", } } @@ -2085,15 +2338,20 @@ type RDSInstanceFindingReasonCode string // Enum values for RDSInstanceFindingReasonCode const ( - RDSInstanceFindingReasonCodeCpuOverProvisioned RDSInstanceFindingReasonCode = "CPUOverprovisioned" - RDSInstanceFindingReasonCodeNetworkBandwidthOverProvisioned RDSInstanceFindingReasonCode = "NetworkBandwidthOverprovisioned" - RDSInstanceFindingReasonCodeEbsIopsOverProvisioned RDSInstanceFindingReasonCode = "EBSIOPSOverprovisioned" - RDSInstanceFindingReasonCodeEbsThroughputOverProvisioned RDSInstanceFindingReasonCode = "EBSThroughputOverprovisioned" - RDSInstanceFindingReasonCodeCpuUnderProvisioned RDSInstanceFindingReasonCode = "CPUUnderprovisioned" - RDSInstanceFindingReasonCodeNetworkBandwidthUnderProvisioned RDSInstanceFindingReasonCode = "NetworkBandwidthUnderprovisioned" - RDSInstanceFindingReasonCodeEbsThroughputUnderProvisioned RDSInstanceFindingReasonCode = "EBSThroughputUnderprovisioned" - RDSInstanceFindingReasonCodeNewGenerationDbInstanceClassAvailable RDSInstanceFindingReasonCode = "NewGenerationDBInstanceClassAvailable" - RDSInstanceFindingReasonCodeNewEngineVersionAvailable RDSInstanceFindingReasonCode = "NewEngineVersionAvailable" + RDSInstanceFindingReasonCodeCpuOverProvisioned RDSInstanceFindingReasonCode = "CPUOverprovisioned" + RDSInstanceFindingReasonCodeNetworkBandwidthOverProvisioned RDSInstanceFindingReasonCode = "NetworkBandwidthOverprovisioned" + RDSInstanceFindingReasonCodeEbsIopsOverProvisioned RDSInstanceFindingReasonCode = "EBSIOPSOverprovisioned" + RDSInstanceFindingReasonCodeEbsIopsUnderProvisioned RDSInstanceFindingReasonCode = "EBSIOPSUnderprovisioned" + RDSInstanceFindingReasonCodeEbsThroughputOverProvisioned RDSInstanceFindingReasonCode = "EBSThroughputOverprovisioned" + RDSInstanceFindingReasonCodeCpuUnderProvisioned RDSInstanceFindingReasonCode = "CPUUnderprovisioned" + RDSInstanceFindingReasonCodeNetworkBandwidthUnderProvisioned RDSInstanceFindingReasonCode = "NetworkBandwidthUnderprovisioned" + RDSInstanceFindingReasonCodeEbsThroughputUnderProvisioned RDSInstanceFindingReasonCode = "EBSThroughputUnderprovisioned" + RDSInstanceFindingReasonCodeNewGenerationDbInstanceClassAvailable RDSInstanceFindingReasonCode = "NewGenerationDBInstanceClassAvailable" + RDSInstanceFindingReasonCodeNewEngineVersionAvailable RDSInstanceFindingReasonCode = "NewEngineVersionAvailable" + RDSInstanceFindingReasonCodeDbClusterWriterUnderProvisioned RDSInstanceFindingReasonCode = "DBClusterWriterUnderprovisioned" + RDSInstanceFindingReasonCodeMemoryUnderProvisioned RDSInstanceFindingReasonCode = "MemoryUnderprovisioned" + RDSInstanceFindingReasonCodeInstanceStorageReadIopsUnderProvisioned RDSInstanceFindingReasonCode = "InstanceStorageReadIOPSUnderprovisioned" + RDSInstanceFindingReasonCodeInstanceStorageWriteIopsUnderProvisioned RDSInstanceFindingReasonCode = "InstanceStorageWriteIOPSUnderprovisioned" ) // Values returns all known values for RDSInstanceFindingReasonCode. Note that @@ -2106,12 +2364,17 @@ func (RDSInstanceFindingReasonCode) Values() []RDSInstanceFindingReasonCode { "CPUOverprovisioned", "NetworkBandwidthOverprovisioned", "EBSIOPSOverprovisioned", + "EBSIOPSUnderprovisioned", "EBSThroughputOverprovisioned", "CPUUnderprovisioned", "NetworkBandwidthUnderprovisioned", "EBSThroughputUnderprovisioned", "NewGenerationDBInstanceClassAvailable", "NewEngineVersionAvailable", + "DBClusterWriterUnderprovisioned", + "MemoryUnderprovisioned", + "InstanceStorageReadIOPSUnderprovisioned", + "InstanceStorageWriteIOPSUnderprovisioned", } } @@ -2254,6 +2517,7 @@ const ( ResourceTypeEcsService ResourceType = "EcsService" ResourceTypeLicense ResourceType = "License" ResourceTypeRdsDbInstance ResourceType = "RdsDBInstance" + ResourceTypeIdle ResourceType = "Idle" ) // Values returns all known values for ResourceType. Note that this can be @@ -2270,6 +2534,7 @@ func (ResourceType) Values() []ResourceType { "EcsService", "License", "RdsDBInstance", + "Idle", } } diff --git a/service/computeoptimizer/types/types.go b/service/computeoptimizer/types/types.go index dd79df61806..fe0cd7d610e 100644 --- a/service/computeoptimizer/types/types.go +++ b/service/computeoptimizer/types/types.go @@ -1187,6 +1187,183 @@ type GpuInfo struct { noSmithyDocumentSerde } +// Describes the estimated monthly savings possible for idle resources by adopting +// Compute Optimizer recommendations. +type IdleEstimatedMonthlySavings struct { + + // The currency of the estimated monthly savings. + Currency Currency + + // The value of the estimated monthly savings for Idle resources. + Value float64 + + noSmithyDocumentSerde +} + +// Describes an Idle resource recommendation. +type IdleRecommendation struct { + + // The Amazon Web Services account ID of the idle resource. + AccountId *string + + // The finding classification of an idle resource. + Finding IdleFinding + + // A summary of the findings for the resource. + FindingDescription *string + + // The timestamp of when the idle resource recommendation was last generated. + LastRefreshTimestamp *time.Time + + // The number of days the idle resource utilization metrics were analyzed. + LookBackPeriodInDays float64 + + // The ARN of the current idle resource. + ResourceArn *string + + // The unique identifier for the resource. + ResourceId *string + + // The type of resource that is idle. + ResourceType IdleRecommendationResourceType + + // The savings opportunity for the idle resource. + SavingsOpportunity *IdleSavingsOpportunity + + // The savings opportunity for the idle resource after any applying discounts. + SavingsOpportunityAfterDiscounts *IdleSavingsOpportunityAfterDiscounts + + // A list of tags assigned to your idle resource recommendations. + Tags []Tag + + // An array of objects that describe the utilization metrics of the idle resource. + UtilizationMetrics []IdleUtilizationMetric + + noSmithyDocumentSerde +} + +// Returns of list of resources that doesn't have idle recommendations. +type IdleRecommendationError struct { + + // The error code. + Code *string + + // The ID of the error. + Identifier *string + + // The error message. + Message *string + + // The type of resource associated with the error. + ResourceType IdleRecommendationResourceType + + noSmithyDocumentSerde +} + +// Describes a filter that returns a more specific list of idle resource +// recommendations. +type IdleRecommendationFilter struct { + + // The name of the filter. + // + // Specify Finding to return recommendations with a specific finding + // classification. + // + // You can filter your idle resource recommendations by tag:key and tag-key tags. + // + // A tag:key is a key and value combination of a tag assigned to your idle + // resource recommendations. Use the tag key in the filter name and the tag value + // as the filter value. For example, to find all idle resource service + // recommendations that have a tag with the key of Owner and the value of TeamA , + // specify tag:Owner for the filter name and TeamA for the filter value. + // + // A tag-key is the key of a tag assigned to your idle resource recommendations. + // Use this filter to find all of your idle resource recommendations that have a + // tag with a specific key. This doesn’t consider the tag value. For example, you + // can find your idle resource service recommendations with a tag key value of + // Owner or without any tag keys assigned. + Name IdleRecommendationFilterName + + // The value of the filter. + Values []string + + noSmithyDocumentSerde +} + +// Describes the savings opportunity for idle resource recommendations. +type IdleSavingsOpportunity struct { + + // The estimated monthly savings possible by adopting Compute Optimizer's idle + // resource recommendations. + EstimatedMonthlySavings *IdleEstimatedMonthlySavings + + // The estimated monthly savings possible as a percentage of monthly cost by + // adopting Compute Optimizer's idle resource recommendations. + SavingsOpportunityPercentage float64 + + noSmithyDocumentSerde +} + +// Describes the savings opportunity for idle resource recommendations after +// applying discounts. +// +// Savings opportunity represents the estimated monthly savings after applying +// discounts. You can achieve this by implementing a given Compute Optimizer +// recommendation. +type IdleSavingsOpportunityAfterDiscounts struct { + + // The estimated monthly savings possible by adopting Compute Optimizer's idle + // resource recommendations. This includes any applicable discounts. + EstimatedMonthlySavings *IdleEstimatedMonthlySavings + + // The estimated monthly savings possible as a percentage of monthly cost by + // adopting Compute Optimizer's idle resource recommendations. This includes any + // applicable discounts. + SavingsOpportunityPercentage float64 + + noSmithyDocumentSerde +} + +// Describes the findings summary of the idle resources. +type IdleSummary struct { + + // The name of the finding group for the idle resources. + Name IdleFinding + + // The count of idle resources in the finding group. + Value float64 + + noSmithyDocumentSerde +} + +// Describes the utilization metric of an idle resource. +type IdleUtilizationMetric struct { + + // The name of the utilization metric. + Name IdleMetricName + + // The statistic of the utilization metric. + // + // The Compute Optimizer API, Command Line Interface (CLI), and SDKs return + // utilization metrics using only the Maximum statistic, which is the highest + // value observed during the specified period. + // + // The Compute Optimizer console displays graphs for some utilization metrics + // using the Average statistic, which is the value of Sum / SampleCount during the + // specified period. For more information, see [Viewing resource recommendations]in the Compute Optimizer User + // Guide. You can also get averaged utilization metric data for your resources + // using Amazon CloudWatch. For more information, see the [Amazon CloudWatch User Guide]. + // + // [Viewing resource recommendations]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html + // [Amazon CloudWatch User Guide]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html + Statistic MetricStatistic + + // The value of the utilization metric. + Value float64 + + noSmithyDocumentSerde +} + // The estimated monthly savings after you adjust the configurations of your // // instances running on the inferred workload types to the recommended @@ -2151,6 +2328,18 @@ type MetricSource struct { noSmithyDocumentSerde } +// Describes how the recommendations are ordered. +type OrderBy struct { + + // The dimension values to sort the recommendations. + Dimension Dimension + + // The order to sort the recommendations. + Order Order + + noSmithyDocumentSerde +} + // The preference to control which resource type values are considered when // // generating rightsizing recommendations. You can specify this preference as a @@ -2342,9 +2531,15 @@ type RDSDBRecommendation struct { // The DB instance class of the current RDS instance. CurrentDBInstanceClass *string + // The performance risk for the current DB instance. + CurrentInstancePerformanceRisk RDSCurrentInstancePerformanceRisk + // The configuration of the current RDS storage. CurrentStorageConfiguration *DBStorageConfiguration + // The identifier for DB cluster. + DbClusterIdentifier *string + // Describes the effective recommendation preferences for Amazon RDS. EffectiveRecommendationPreferences *RDSEffectiveRecommendationPreferences @@ -2384,6 +2579,9 @@ type RDSDBRecommendation struct { // The number of days the Amazon RDS utilization metrics were analyzed. LookbackPeriodInDays float64 + // The promotion tier for the Aurora instance. + PromotionTier *int32 + // The ARN of the current Amazon RDS. // // The following is the format of the ARN: @@ -2793,9 +2991,50 @@ type RecommendationSummary struct { // The Amazon Web Services account ID of the recommendation summary. AccountId *string + // Describes the savings opportunity for recommendations of a given resource type + // or for the recommendation option of an individual resource. + // + // Savings opportunity represents the estimated monthly savings you can achieve by + // implementing a given Compute Optimizer recommendation. + // + // Savings opportunity data requires that you opt in to Cost Explorer, as well as + // activate Receive Amazon EC2 resource recommendations in the Cost Explorer + // preferences page. That creates a connection between Cost Explorer and Compute + // Optimizer. With this connection, Cost Explorer generates savings estimates + // considering the price of existing resources, the price of recommended resources, + // and historical usage data. Estimated monthly savings reflects the projected + // dollar savings associated with each of the recommendations generated. For more + // information, see [Enabling Cost Explorer]and [Optimizing your cost with Rightsizing Recommendations] in the Cost Management User Guide. + // + // [Optimizing your cost with Rightsizing Recommendations]: https://docs.aws.amazon.com/cost-management/latest/userguide/ce-rightsizing.html + // [Enabling Cost Explorer]: https://docs.aws.amazon.com/cost-management/latest/userguide/ce-enable.html + AggregatedSavingsOpportunity *SavingsOpportunity + // An object that describes the performance risk ratings for a given resource type. CurrentPerformanceRiskRatings *CurrentPerformanceRiskRatings + // Describes the savings opportunity for recommendations of a given resource type + // or for the recommendation option of an individual resource. + // + // Savings opportunity represents the estimated monthly savings you can achieve by + // implementing a given Compute Optimizer recommendation. + // + // Savings opportunity data requires that you opt in to Cost Explorer, as well as + // activate Receive Amazon EC2 resource recommendations in the Cost Explorer + // preferences page. That creates a connection between Cost Explorer and Compute + // Optimizer. With this connection, Cost Explorer generates savings estimates + // considering the price of existing resources, the price of recommended resources, + // and historical usage data. Estimated monthly savings reflects the projected + // dollar savings associated with each of the recommendations generated. For more + // information, see [Enabling Cost Explorer]and [Optimizing your cost with Rightsizing Recommendations] in the Cost Management User Guide. + // + // [Optimizing your cost with Rightsizing Recommendations]: https://docs.aws.amazon.com/cost-management/latest/userguide/ce-rightsizing.html + // [Enabling Cost Explorer]: https://docs.aws.amazon.com/cost-management/latest/userguide/ce-enable.html + IdleSavingsOpportunity *SavingsOpportunity + + // Describes the findings summary of the idle resources. + IdleSummaries []IdleSummary + // An array of objects that describes the estimated monthly saving amounts for // the instances running on the specified inferredWorkloadTypes . The array // contains the top five savings opportunites for the instances that run inferred @@ -3205,9 +3444,17 @@ type VolumeConfiguration struct { // The volume type. // - // This can be gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, - // st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic - // volumes. + // The volume types can be the following: + // + // - General Purpose SSD gp2 and gp3 + // + // - Provisioned IOPS SSD io1 , io2 , and io2 Block Express + // + // - Throughput Optimized HDD st1 + // + // - Cold HDD sc1 + // + // - Magnetic volumes standard VolumeType *string noSmithyDocumentSerde diff --git a/service/computeoptimizer/validators.go b/service/computeoptimizer/validators.go index d94eb62d70e..3fe2b5319f2 100644 --- a/service/computeoptimizer/validators.go +++ b/service/computeoptimizer/validators.go @@ -109,6 +109,26 @@ func (m *validateOpExportECSServiceRecommendations) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpExportIdleRecommendations struct { +} + +func (*validateOpExportIdleRecommendations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExportIdleRecommendations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExportIdleRecommendationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExportIdleRecommendationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpExportLambdaFunctionRecommendations struct { } @@ -329,6 +349,10 @@ func addOpExportECSServiceRecommendationsValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpExportECSServiceRecommendations{}, middleware.After) } +func addOpExportIdleRecommendationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExportIdleRecommendations{}, middleware.After) +} + func addOpExportLambdaFunctionRecommendationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpExportLambdaFunctionRecommendations{}, middleware.After) } @@ -447,6 +471,21 @@ func validateOpExportECSServiceRecommendationsInput(v *ExportECSServiceRecommend } } +func validateOpExportIdleRecommendationsInput(v *ExportIdleRecommendationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExportIdleRecommendationsInput"} + if v.S3DestinationConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3DestinationConfig")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpExportLambdaFunctionRecommendationsInput(v *ExportLambdaFunctionRecommendationsInput) error { if v == nil { return nil diff --git a/service/controltower/api_op_ListEnabledBaselines.go b/service/controltower/api_op_ListEnabledBaselines.go index b2aaf040879..8a75cddf1de 100644 --- a/service/controltower/api_op_ListEnabledBaselines.go +++ b/service/controltower/api_op_ListEnabledBaselines.go @@ -38,6 +38,10 @@ type ListEnabledBaselinesInput struct { // either, or both. Filter *types.EnabledBaselineFilter + // A value that can be set to include the child enabled baselines in responses. + // The default value is false. + IncludeChildren bool + // The maximum number of results to be shown. MaxResults *int32 diff --git a/service/controltower/deserializers.go b/service/controltower/deserializers.go index bf9aa10e778..99b3e847829 100644 --- a/service/controltower/deserializers.go +++ b/service/controltower/deserializers.go @@ -5576,6 +5576,15 @@ func awsRestjson1_deserializeDocumentEnabledBaselineDetails(v **types.EnabledBas return err } + case "parentIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ParentIdentifier = ptr.String(jtv) + } + case "statusSummary": if err := awsRestjson1_deserializeDocumentEnablementStatusSummary(&sv.StatusSummary, value); err != nil { return err @@ -5769,6 +5778,15 @@ func awsRestjson1_deserializeDocumentEnabledBaselineSummary(v **types.EnabledBas sv.BaselineVersion = ptr.String(jtv) } + case "parentIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ParentIdentifier = ptr.String(jtv) + } + case "statusSummary": if err := awsRestjson1_deserializeDocumentEnablementStatusSummary(&sv.StatusSummary, value); err != nil { return err diff --git a/service/controltower/serializers.go b/service/controltower/serializers.go index b89f4f1763e..4b4d5587091 100644 --- a/service/controltower/serializers.go +++ b/service/controltower/serializers.go @@ -1391,6 +1391,11 @@ func awsRestjson1_serializeOpDocumentListEnabledBaselinesInput(v *ListEnabledBas } } + if v.IncludeChildren { + ok := object.Key("includeChildren") + ok.Boolean(v.IncludeChildren) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -2550,6 +2555,13 @@ func awsRestjson1_serializeDocumentEnabledBaselineFilter(v *types.EnabledBaselin } } + if v.ParentIdentifiers != nil { + ok := object.Key("parentIdentifiers") + if err := awsRestjson1_serializeDocumentEnabledBaselineParentIdentifiers(v.ParentIdentifiers, ok); err != nil { + return err + } + } + if v.TargetIdentifiers != nil { ok := object.Key("targetIdentifiers") if err := awsRestjson1_serializeDocumentEnabledBaselineTargetIdentifiers(v.TargetIdentifiers, ok); err != nil { @@ -2607,6 +2619,17 @@ func awsRestjson1_serializeDocumentEnabledBaselineParameters(v []types.EnabledBa return nil } +func awsRestjson1_serializeDocumentEnabledBaselineParentIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentEnabledBaselineTargetIdentifiers(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/controltower/types/types.go b/service/controltower/types/types.go index 350f4650647..3560183659f 100644 --- a/service/controltower/types/types.go +++ b/service/controltower/types/types.go @@ -200,6 +200,11 @@ type EnabledBaselineDetails struct { // Shows the parameters that are applied when enabling this Baseline . Parameters []EnabledBaselineParameterSummary + // An ARN that represents the parent EnabledBaseline at the Organizational Unit + // (OU) level, from which the child EnabledBaseline inherits its configuration. + // The value is returned by GetEnabledBaseline . + ParentIdentifier *string + noSmithyDocumentSerde } @@ -211,6 +216,10 @@ type EnabledBaselineFilter struct { // Identifiers for the Baseline objects returned as part of the filter operation. BaselineIdentifiers []string + // An optional filter that sets up a list of parentIdentifiers to filter the + // results of the ListEnabledBaseline output. + ParentIdentifiers []string + // Identifiers for the targets of the Baseline filter operation. TargetIdentifiers []string @@ -275,6 +284,10 @@ type EnabledBaselineSummary struct { // The enabled version of the baseline. BaselineVersion *string + // An ARN that represents an object returned by ListEnabledBaseline , to describe + // an enabled baseline. + ParentIdentifier *string + noSmithyDocumentSerde } diff --git a/service/costoptimizationhub/types/enums.go b/service/costoptimizationhub/types/enums.go index 3165077f97e..0f8a5477b85 100644 --- a/service/costoptimizationhub/types/enums.go +++ b/service/costoptimizationhub/types/enums.go @@ -12,6 +12,7 @@ const ( ActionTypePurchaseSavingsPlans ActionType = "PurchaseSavingsPlans" ActionTypePurchaseReservedInstances ActionType = "PurchaseReservedInstances" ActionTypeMigrateToGraviton ActionType = "MigrateToGraviton" + ActionTypeDelete ActionType = "Delete" ) // Values returns all known values for ActionType. Note that this can be expanded @@ -26,6 +27,7 @@ func (ActionType) Values() []ActionType { "PurchaseSavingsPlans", "PurchaseReservedInstances", "MigrateToGraviton", + "Delete", } } diff --git a/service/datazone/api_op_AcceptSubscriptionRequest.go b/service/datazone/api_op_AcceptSubscriptionRequest.go index 9331a070899..4f5f3095591 100644 --- a/service/datazone/api_op_AcceptSubscriptionRequest.go +++ b/service/datazone/api_op_AcceptSubscriptionRequest.go @@ -104,6 +104,12 @@ type AcceptSubscriptionRequestOutput struct { // Specifies the reason for accepting the subscription request. DecisionComment *string + // The ID of the existing subscription. + ExistingSubscriptionId *string + + // The metadata form in the subscription request. + MetadataForms []types.FormOutput + // Specifes the ID of the Amazon DataZone user who reviewed the subscription // request. ReviewerId *string diff --git a/service/datazone/api_op_CreateRule.go b/service/datazone/api_op_CreateRule.go new file mode 100644 index 00000000000..04416822631 --- /dev/null +++ b/service/datazone/api_op_CreateRule.go @@ -0,0 +1,281 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a rule in Amazon DataZone. A rule is a formal agreement that enforces +// specific requirements across user workflows (e.g., publishing assets to the +// catalog, requesting subscriptions, creating projects) within the Amazon DataZone +// data portal. These rules help maintain consistency, ensure compliance, and +// uphold governance standards in data management processes. For instance, a +// metadata enforcement rule can specify the required information for creating a +// subscription request or publishing a data asset to the catalog, ensuring +// alignment with organizational standards. +func (c *Client) CreateRule(ctx context.Context, params *CreateRuleInput, optFns ...func(*Options)) (*CreateRuleOutput, error) { + if params == nil { + params = &CreateRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRule", params, optFns, c.addOperationCreateRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRuleInput struct { + + // The action of the rule. + // + // This member is required. + Action types.RuleAction + + // The detail of the rule. + // + // This member is required. + Detail types.RuleDetail + + // The ID of the domain where the rule is created. + // + // This member is required. + DomainIdentifier *string + + // The name of the rule. + // + // This member is required. + Name *string + + // The scope of the rule. + // + // This member is required. + Scope *types.RuleScope + + // The target of the rule. + // + // This member is required. + Target types.RuleTarget + + // A unique, case-sensitive identifier that is provided to ensure the idempotency + // of the request. + ClientToken *string + + // The description of the rule. + Description *string + + noSmithyDocumentSerde +} + +type CreateRuleOutput struct { + + // The action of the rule. + // + // This member is required. + Action types.RuleAction + + // The timestamp at which the rule is created. + // + // This member is required. + CreatedAt *time.Time + + // The user who creates the rule. + // + // This member is required. + CreatedBy *string + + // The detail of the rule. + // + // This member is required. + Detail types.RuleDetail + + // The ID of the rule. + // + // This member is required. + Identifier *string + + // The name of the rule. + // + // This member is required. + Name *string + + // The type of the rule. + // + // This member is required. + RuleType types.RuleType + + // The scope of the rule. + // + // This member is required. + Scope *types.RuleScope + + // The target of the rule. + // + // This member is required. + Target types.RuleTarget + + // The description of the rule. + Description *string + + // The target type of the rule. + TargetType types.RuleTargetType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateRule{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateRule"); 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 = addSpanRetryLoop(stack, options); 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 = addIdempotencyToken_opCreateRuleMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRule(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateRule struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateRule) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateRuleInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateRuleInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateRuleMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateRule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateRule", + } +} diff --git a/service/datazone/api_op_CreateSubscriptionRequest.go b/service/datazone/api_op_CreateSubscriptionRequest.go index 17095d71d4c..a4b9847a21d 100644 --- a/service/datazone/api_op_CreateSubscriptionRequest.go +++ b/service/datazone/api_op_CreateSubscriptionRequest.go @@ -55,6 +55,9 @@ type CreateSubscriptionRequestInput struct { // of the request. ClientToken *string + // The metadata form included in the subscription request. + MetadataForms []types.FormInput + noSmithyDocumentSerde } @@ -109,6 +112,12 @@ type CreateSubscriptionRequestOutput struct { // The decision comment of the subscription request. DecisionComment *string + // The ID of the existing subscription. + ExistingSubscriptionId *string + + // The metadata form included in the subscription request. + MetadataForms []types.FormOutput + // The ID of the reviewer of the subscription request. ReviewerId *string diff --git a/service/datazone/api_op_DeleteRule.go b/service/datazone/api_op_DeleteRule.go new file mode 100644 index 00000000000..8a1908e0b14 --- /dev/null +++ b/service/datazone/api_op_DeleteRule.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +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 a rule in Amazon DataZone. A rule is a formal agreement that enforces +// specific requirements across user workflows (e.g., publishing assets to the +// catalog, requesting subscriptions, creating projects) within the Amazon DataZone +// data portal. These rules help maintain consistency, ensure compliance, and +// uphold governance standards in data management processes. For instance, a +// metadata enforcement rule can specify the required information for creating a +// subscription request or publishing a data asset to the catalog, ensuring +// alignment with organizational standards. +func (c *Client) DeleteRule(ctx context.Context, params *DeleteRuleInput, optFns ...func(*Options)) (*DeleteRuleOutput, error) { + if params == nil { + params = &DeleteRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRule", params, optFns, c.addOperationDeleteRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRuleInput struct { + + // The ID of the domain that where the rule is to be deleted. + // + // This member is required. + DomainIdentifier *string + + // The ID of the rule that is to be deleted. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteRuleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteRule{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRule"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRule(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteRule", + } +} diff --git a/service/datazone/api_op_GetRule.go b/service/datazone/api_op_GetRule.go new file mode 100644 index 00000000000..268cc7ef320 --- /dev/null +++ b/service/datazone/api_op_GetRule.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets the details of a rule in Amazon DataZone. A rule is a formal agreement +// that enforces specific requirements across user workflows (e.g., publishing +// assets to the catalog, requesting subscriptions, creating projects) within the +// Amazon DataZone data portal. These rules help maintain consistency, ensure +// compliance, and uphold governance standards in data management processes. For +// instance, a metadata enforcement rule can specify the required information for +// creating a subscription request or publishing a data asset to the catalog, +// ensuring alignment with organizational standards. +func (c *Client) GetRule(ctx context.Context, params *GetRuleInput, optFns ...func(*Options)) (*GetRuleOutput, error) { + if params == nil { + params = &GetRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRule", params, optFns, c.addOperationGetRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRuleInput struct { + + // The ID of the domain where the GetRule action is to be invoked. + // + // This member is required. + DomainIdentifier *string + + // The ID of the rule. + // + // This member is required. + Identifier *string + + // The revision of the rule. + Revision *string + + noSmithyDocumentSerde +} + +type GetRuleOutput struct { + + // The action of the rule. + // + // This member is required. + Action types.RuleAction + + // The timestamp at which the rule was created. + // + // This member is required. + CreatedAt *time.Time + + // The user who created the rule. + // + // This member is required. + CreatedBy *string + + // The detail of the rule. + // + // This member is required. + Detail types.RuleDetail + + // The ID of the rule. + // + // This member is required. + Identifier *string + + // The timestamp at which the rule was last updated. + // + // This member is required. + LastUpdatedBy *string + + // The name of the rule. + // + // This member is required. + Name *string + + // The revision of the rule. + // + // This member is required. + Revision *string + + // The type of the rule. + // + // This member is required. + RuleType types.RuleType + + // The scope of the rule. + // + // This member is required. + Scope *types.RuleScope + + // The target of the rule. + // + // This member is required. + Target types.RuleTarget + + // The timestamp at which the rule was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The description of the rule. + Description *string + + // The target type of the rule. + TargetType types.RuleTargetType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRule{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetRule"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRule(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetRule", + } +} diff --git a/service/datazone/api_op_GetSubscriptionRequestDetails.go b/service/datazone/api_op_GetSubscriptionRequestDetails.go index 469be226256..d58a8244987 100644 --- a/service/datazone/api_op_GetSubscriptionRequestDetails.go +++ b/service/datazone/api_op_GetSubscriptionRequestDetails.go @@ -94,6 +94,12 @@ type GetSubscriptionRequestDetailsOutput struct { // The decision comment of the subscription request. DecisionComment *string + // The ID of the existing subscription. + ExistingSubscriptionId *string + + // The metadata forms included in the subscription request. + MetadataForms []types.FormOutput + // The identifier of the Amazon DataZone user who reviewed the subscription // request. ReviewerId *string diff --git a/service/datazone/api_op_ListRules.go b/service/datazone/api_op_ListRules.go new file mode 100644 index 00000000000..8c3461ba965 --- /dev/null +++ b/service/datazone/api_op_ListRules.go @@ -0,0 +1,309 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists existing rules. In Amazon DataZone, a rule is a formal agreement that +// enforces specific requirements across user workflows (e.g., publishing assets to +// the catalog, requesting subscriptions, creating projects) within the Amazon +// DataZone data portal. These rules help maintain consistency, ensure compliance, +// and uphold governance standards in data management processes. For instance, a +// metadata enforcement rule can specify the required information for creating a +// subscription request or publishing a data asset to the catalog, ensuring +// alignment with organizational standards. +func (c *Client) ListRules(ctx context.Context, params *ListRulesInput, optFns ...func(*Options)) (*ListRulesOutput, error) { + if params == nil { + params = &ListRulesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRules", params, optFns, c.addOperationListRulesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRulesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRulesInput struct { + + // The ID of the domain in which the rules are to be listed. + // + // This member is required. + DomainIdentifier *string + + // The target ID of the rule. + // + // This member is required. + TargetIdentifier *string + + // The target type of the rule. + // + // This member is required. + TargetType types.RuleTargetType + + // The action of the rule. + Action types.RuleAction + + // The asset types of the rule. + AssetTypes []string + + // The data product of the rule. + DataProduct *bool + + // Specifies whether to include cascading rules in the results. + IncludeCascaded *bool + + // The maximum number of rules to return in a single call to ListRules . When the + // number of rules to be listed is greater than the value of MaxResults , the + // response contains a NextToken value that you can use in a subsequent call to + // ListRules to list the next set of rules. + MaxResults *int32 + + // When the number of rules is greater than the default value for the MaxResults + // parameter, or if you explicitly specify a value for MaxResults that is less + // than the number of rules, the response includes a pagination token named + // NextToken . You can specify this NextToken value in a subsequent call to + // ListRules to list the next set of rules. + NextToken *string + + // The IDs of projects in which rules are to be listed. + ProjectIds []string + + // The type of the rule. + RuleType types.RuleType + + noSmithyDocumentSerde +} + +type ListRulesOutput struct { + + // The results of the ListRules action. + // + // This member is required. + Items []types.RuleSummary + + // When the number of rules is greater than the default value for the MaxResults + // parameter, or if you explicitly specify a value for MaxResults that is less + // than the number of rules, the response includes a pagination token named + // NextToken . You can specify this NextToken value in a subsequent call to + // ListRules to list the next set of rules. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListRules{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRules{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRules"); 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 = addSpanRetryLoop(stack, options); 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 = addOpListRulesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListRulesPaginatorOptions is the paginator options for ListRules +type ListRulesPaginatorOptions struct { + // The maximum number of rules to return in a single call to ListRules . When the + // number of rules to be listed is greater than the value of MaxResults , the + // response contains a NextToken value that you can use in a subsequent call to + // ListRules to list the next set of rules. + 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 +} + +// ListRulesPaginator is a paginator for ListRules +type ListRulesPaginator struct { + options ListRulesPaginatorOptions + client ListRulesAPIClient + params *ListRulesInput + nextToken *string + firstPage bool +} + +// NewListRulesPaginator returns a new ListRulesPaginator +func NewListRulesPaginator(client ListRulesAPIClient, params *ListRulesInput, optFns ...func(*ListRulesPaginatorOptions)) *ListRulesPaginator { + if params == nil { + params = &ListRulesInput{} + } + + options := ListRulesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRulesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListRules page. +func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRulesOutput, 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.ListRules(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 +} + +// ListRulesAPIClient is a client that implements the ListRules operation. +type ListRulesAPIClient interface { + ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) +} + +var _ ListRulesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListRules(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRules", + } +} diff --git a/service/datazone/api_op_RejectSubscriptionRequest.go b/service/datazone/api_op_RejectSubscriptionRequest.go index 54e22950be7..afd8cc127cb 100644 --- a/service/datazone/api_op_RejectSubscriptionRequest.go +++ b/service/datazone/api_op_RejectSubscriptionRequest.go @@ -98,6 +98,12 @@ type RejectSubscriptionRequestOutput struct { // The decision comment of the rejected subscription request. DecisionComment *string + // The ID of the existing subscription. + ExistingSubscriptionId *string + + // Metadata forms included in the subscription request. + MetadataForms []types.FormOutput + // The identifier of the subscription request reviewer. ReviewerId *string diff --git a/service/datazone/api_op_UpdateRule.go b/service/datazone/api_op_UpdateRule.go new file mode 100644 index 00000000000..d2c85377b37 --- /dev/null +++ b/service/datazone/api_op_UpdateRule.go @@ -0,0 +1,245 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datazone + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/datazone/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates a rule. In Amazon DataZone, a rule is a formal agreement that enforces +// specific requirements across user workflows (e.g., publishing assets to the +// catalog, requesting subscriptions, creating projects) within the Amazon DataZone +// data portal. These rules help maintain consistency, ensure compliance, and +// uphold governance standards in data management processes. For instance, a +// metadata enforcement rule can specify the required information for creating a +// subscription request or publishing a data asset to the catalog, ensuring +// alignment with organizational standards. +func (c *Client) UpdateRule(ctx context.Context, params *UpdateRuleInput, optFns ...func(*Options)) (*UpdateRuleOutput, error) { + if params == nil { + params = &UpdateRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRule", params, optFns, c.addOperationUpdateRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRuleInput struct { + + // The ID of the domain in which a rule is to be updated. + // + // This member is required. + DomainIdentifier *string + + // The ID of the rule that is to be updated + // + // This member is required. + Identifier *string + + // The description of the rule. + Description *string + + // The detail of the rule. + Detail types.RuleDetail + + // Specifies whether to update this rule in the child domain units. + IncludeChildDomainUnits *bool + + // The name of the rule. + Name *string + + // The scrope of the rule. + Scope *types.RuleScope + + noSmithyDocumentSerde +} + +type UpdateRuleOutput struct { + + // The action of the rule. + // + // This member is required. + Action types.RuleAction + + // The timestamp at which the rule was created. + // + // This member is required. + CreatedAt *time.Time + + // The user who created the rule. + // + // This member is required. + CreatedBy *string + + // The detail of the rule. + // + // This member is required. + Detail types.RuleDetail + + // The ID of the rule. + // + // This member is required. + Identifier *string + + // The timestamp at which the rule was last updated. + // + // This member is required. + LastUpdatedBy *string + + // The name of the rule. + // + // This member is required. + Name *string + + // The revision of the rule. + // + // This member is required. + Revision *string + + // The type of the rule. + // + // This member is required. + RuleType types.RuleType + + // The scope of the rule. + // + // This member is required. + Scope *types.RuleScope + + // The target of the rule. + // + // This member is required. + Target types.RuleTarget + + // The timestamp at which the rule was last updated. + // + // This member is required. + UpdatedAt *time.Time + + // The description of the rule. + Description *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateRule{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateRule"); 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 = addSpanRetryLoop(stack, options); 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 = addOpUpdateRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRule(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateRule", + } +} diff --git a/service/datazone/api_op_UpdateSubscriptionRequest.go b/service/datazone/api_op_UpdateSubscriptionRequest.go index 35c6ff18249..e414f79bd5b 100644 --- a/service/datazone/api_op_UpdateSubscriptionRequest.go +++ b/service/datazone/api_op_UpdateSubscriptionRequest.go @@ -100,6 +100,12 @@ type UpdateSubscriptionRequestOutput struct { // The decision comment of the UpdateSubscriptionRequest action. DecisionComment *string + // The ID of the existing subscription. + ExistingSubscriptionId *string + + // Metadata forms included in the subscription request. + MetadataForms []types.FormOutput + // The identifier of the Amazon DataZone user who reviews the subscription request. ReviewerId *string diff --git a/service/datazone/deserializers.go b/service/datazone/deserializers.go index b6e6ef93d69..dfc213eb02d 100644 --- a/service/datazone/deserializers.go +++ b/service/datazone/deserializers.go @@ -421,6 +421,15 @@ func awsRestjson1_deserializeOpDocumentAcceptSubscriptionRequestOutput(v **Accep sv.DomainId = ptr.String(jtv) } + case "existingSubscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.ExistingSubscriptionId = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) @@ -430,6 +439,11 @@ func awsRestjson1_deserializeOpDocumentAcceptSubscriptionRequestOutput(v **Accep sv.Id = ptr.String(jtv) } + case "metadataForms": + if err := awsRestjson1_deserializeDocumentMetadataForms(&sv.MetadataForms, value); err != nil { + return err + } + case "requestReason": if value != nil { jtv, ok := value.(string) @@ -6106,6 +6120,268 @@ func awsRestjson1_deserializeOpErrorCreateProjectMembership(response *smithyhttp } } +type awsRestjson1_deserializeOpCreateRule struct { +} + +func (*awsRestjson1_deserializeOpCreateRule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateRule) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateRule(response, &metadata) + } + output := &CreateRuleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateRuleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateRuleOutput(v **CreateRuleOutput, 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 *CreateRuleOutput + if *v == nil { + sv = &CreateRuleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleAction to be of type string, got %T instead", value) + } + sv.Action = types.RuleAction(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "detail": + if err := awsRestjson1_deserializeDocumentRuleDetail(&sv.Detail, value); err != nil { + return err + } + + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleId to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ruleType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleType to be of type string, got %T instead", value) + } + sv.RuleType = types.RuleType(jtv) + } + + case "scope": + if err := awsRestjson1_deserializeDocumentRuleScope(&sv.Scope, value); err != nil { + return err + } + + case "target": + if err := awsRestjson1_deserializeDocumentRuleTarget(&sv.Target, value); err != nil { + return err + } + + case "targetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleTargetType to be of type string, got %T instead", value) + } + sv.TargetType = types.RuleTargetType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateSubscriptionGrant struct { } @@ -6575,6 +6851,15 @@ func awsRestjson1_deserializeOpDocumentCreateSubscriptionRequestOutput(v **Creat sv.DomainId = ptr.String(jtv) } + case "existingSubscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.ExistingSubscriptionId = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) @@ -6584,6 +6869,11 @@ func awsRestjson1_deserializeOpDocumentCreateSubscriptionRequestOutput(v **Creat sv.Id = ptr.String(jtv) } + case "metadataForms": + if err := awsRestjson1_deserializeDocumentMetadataForms(&sv.MetadataForms, value); err != nil { + return err + } + case "requestReason": if value != nil { jtv, ok := value.(string) @@ -9278,6 +9568,112 @@ func awsRestjson1_deserializeOpErrorDeleteProjectMembership(response *smithyhttp } } +type awsRestjson1_deserializeOpDeleteRule struct { +} + +func (*awsRestjson1_deserializeOpDeleteRule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteRule) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRule(response, &metadata) + } + output := &DeleteRuleOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDeleteSubscriptionGrant struct { } @@ -16099,14 +16495,14 @@ func awsRestjson1_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, va return nil } -type awsRestjson1_deserializeOpGetSubscription struct { +type awsRestjson1_deserializeOpGetRule struct { } -func (*awsRestjson1_deserializeOpGetSubscription) ID() string { +func (*awsRestjson1_deserializeOpGetRule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetRule) 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) @@ -16124,9 +16520,9 @@ func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetRule(response, &metadata) } - output := &GetSubscriptionOutput{} + output := &GetRuleOutput{} out.Result = output var buff [1024]byte @@ -16147,7 +16543,7 @@ func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16161,7 +16557,7 @@ func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetRule(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)} @@ -16230,7 +16626,7 @@ func awsRestjson1_deserializeOpErrorGetSubscription(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetRuleOutput(v **GetRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16243,15 +16639,24 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscription return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSubscriptionOutput + var sv *GetRuleOutput if *v == nil { - sv = &GetSubscriptionOutput{} + sv = &GetRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleAction to be of type string, got %T instead", value) + } + sv.Action = types.RuleAction(jtv) + } + case "createdAt": if value != nil { switch jtv := value.(type) { @@ -16277,59 +16682,82 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscription sv.CreatedBy = ptr.String(jtv) } - case "domainId": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.DomainId = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "id": + case "detail": + if err := awsRestjson1_deserializeDocumentRuleDetail(&sv.Detail, value); err != nil { + return err + } + + case "identifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + return fmt.Errorf("expected RuleId to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Identifier = ptr.String(jtv) } - case "retainPermissions": + case "lastUpdatedBy": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) } - sv.RetainPermissions = ptr.Bool(jtv) + sv.LastUpdatedBy = ptr.String(jtv) } - case "status": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) } - sv.Status = types.SubscriptionStatus(jtv) + sv.Name = ptr.String(jtv) } - case "subscribedListing": - if err := awsRestjson1_deserializeDocumentSubscribedListing(&sv.SubscribedListing, value); err != nil { + case "revision": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Revision to be of type string, got %T instead", value) + } + sv.Revision = ptr.String(jtv) + } + + case "ruleType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleType to be of type string, got %T instead", value) + } + sv.RuleType = types.RuleType(jtv) + } + + case "scope": + if err := awsRestjson1_deserializeDocumentRuleScope(&sv.Scope, value); err != nil { return err } - case "subscribedPrincipal": - if err := awsRestjson1_deserializeDocumentSubscribedPrincipal(&sv.SubscribedPrincipal, value); err != nil { + case "target": + if err := awsRestjson1_deserializeDocumentRuleTarget(&sv.Target, value); err != nil { return err } - case "subscriptionRequestId": + case "targetType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionRequestId to be of type string, got %T instead", value) + return fmt.Errorf("expected RuleTargetType to be of type string, got %T instead", value) } - sv.SubscriptionRequestId = ptr.String(jtv) + sv.TargetType = types.RuleTargetType(jtv) } case "updatedAt": @@ -16348,15 +16776,6 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscription } } - case "updatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) - } - sv.UpdatedBy = ptr.String(jtv) - } - default: _, _ = key, value @@ -16366,14 +16785,14 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscription return nil } -type awsRestjson1_deserializeOpGetSubscriptionGrant struct { +type awsRestjson1_deserializeOpGetSubscription struct { } -func (*awsRestjson1_deserializeOpGetSubscriptionGrant) ID() string { +func (*awsRestjson1_deserializeOpGetSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSubscriptionGrant) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSubscription) 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) @@ -16391,9 +16810,9 @@ func (m *awsRestjson1_deserializeOpGetSubscriptionGrant) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSubscriptionGrant(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSubscription(response, &metadata) } - output := &GetSubscriptionGrantOutput{} + output := &GetSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -16414,7 +16833,7 @@ func (m *awsRestjson1_deserializeOpGetSubscriptionGrant) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSubscriptionGrantOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16428,7 +16847,7 @@ func (m *awsRestjson1_deserializeOpGetSubscriptionGrant) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSubscriptionGrant(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSubscription(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)} @@ -16497,7 +16916,7 @@ func awsRestjson1_deserializeOpErrorGetSubscriptionGrant(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentGetSubscriptionGrantOutput(v **GetSubscriptionGrantOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16510,20 +16929,15 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionGrantOutput(v **GetSubscri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSubscriptionGrantOutput + var sv *GetSubscriptionOutput if *v == nil { - sv = &GetSubscriptionGrantOutput{} + sv = &GetSubscriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "assets": - if err := awsRestjson1_deserializeDocumentSubscribedAssets(&sv.Assets, value); err != nil { - return err - } - case "createdAt": if value != nil { switch jtv := value.(type) { @@ -16558,45 +16972,50 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionGrantOutput(v **GetSubscri sv.DomainId = ptr.String(jtv) } - case "grantedEntity": - if err := awsRestjson1_deserializeDocumentGrantedEntity(&sv.GrantedEntity, value); err != nil { - return err - } - case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionGrantId to be of type string, got %T instead", value) + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "status": + case "retainPermissions": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected SubscriptionGrantOverallStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.Status = types.SubscriptionGrantOverallStatus(jtv) + sv.RetainPermissions = ptr.Bool(jtv) } - case "subscriptionId": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + return fmt.Errorf("expected SubscriptionStatus to be of type string, got %T instead", value) } - sv.SubscriptionId = ptr.String(jtv) + sv.Status = types.SubscriptionStatus(jtv) } - case "subscriptionTargetId": + case "subscribedListing": + if err := awsRestjson1_deserializeDocumentSubscribedListing(&sv.SubscribedListing, value); err != nil { + return err + } + + case "subscribedPrincipal": + if err := awsRestjson1_deserializeDocumentSubscribedPrincipal(&sv.SubscribedPrincipal, value); err != nil { + return err + } + + case "subscriptionRequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionTargetId to be of type string, got %T instead", value) + return fmt.Errorf("expected SubscriptionRequestId to be of type string, got %T instead", value) } - sv.SubscriptionTargetId = ptr.String(jtv) + sv.SubscriptionRequestId = ptr.String(jtv) } case "updatedAt": @@ -16633,14 +17052,14 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionGrantOutput(v **GetSubscri return nil } -type awsRestjson1_deserializeOpGetSubscriptionRequestDetails struct { +type awsRestjson1_deserializeOpGetSubscriptionGrant struct { } -func (*awsRestjson1_deserializeOpGetSubscriptionRequestDetails) ID() string { +func (*awsRestjson1_deserializeOpGetSubscriptionGrant) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSubscriptionRequestDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSubscriptionGrant) 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 +17077,9 @@ func (m *awsRestjson1_deserializeOpGetSubscriptionRequestDetails) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSubscriptionRequestDetails(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSubscriptionGrant(response, &metadata) } - output := &GetSubscriptionRequestDetailsOutput{} + output := &GetSubscriptionGrantOutput{} out.Result = output var buff [1024]byte @@ -16681,7 +17100,7 @@ func (m *awsRestjson1_deserializeOpGetSubscriptionRequestDetails) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSubscriptionRequestDetailsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSubscriptionGrantOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16695,7 +17114,7 @@ func (m *awsRestjson1_deserializeOpGetSubscriptionRequestDetails) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSubscriptionRequestDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSubscriptionGrant(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)} @@ -16764,7 +17183,7 @@ func awsRestjson1_deserializeOpErrorGetSubscriptionRequestDetails(response *smit } } -func awsRestjson1_deserializeOpDocumentGetSubscriptionRequestDetailsOutput(v **GetSubscriptionRequestDetailsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSubscriptionGrantOutput(v **GetSubscriptionGrantOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16777,9 +17196,276 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionRequestDetailsOutput(v **G return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSubscriptionRequestDetailsOutput + var sv *GetSubscriptionGrantOutput if *v == nil { - sv = &GetSubscriptionRequestDetailsOutput{} + sv = &GetSubscriptionGrantOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "assets": + if err := awsRestjson1_deserializeDocumentSubscribedAssets(&sv.Assets, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "domainId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + } + sv.DomainId = ptr.String(jtv) + } + + case "grantedEntity": + if err := awsRestjson1_deserializeDocumentGrantedEntity(&sv.GrantedEntity, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionGrantId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionGrantOverallStatus to be of type string, got %T instead", value) + } + sv.Status = types.SubscriptionGrantOverallStatus(jtv) + } + + case "subscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.SubscriptionId = ptr.String(jtv) + } + + case "subscriptionTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionTargetId to be of type string, got %T instead", value) + } + sv.SubscriptionTargetId = ptr.String(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "updatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetSubscriptionRequestDetails struct { +} + +func (*awsRestjson1_deserializeOpGetSubscriptionRequestDetails) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSubscriptionRequestDetails) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetSubscriptionRequestDetails(response, &metadata) + } + output := &GetSubscriptionRequestDetailsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetSubscriptionRequestDetailsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetSubscriptionRequestDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetSubscriptionRequestDetailsOutput(v **GetSubscriptionRequestDetailsOutput, 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 *GetSubscriptionRequestDetailsOutput + if *v == nil { + sv = &GetSubscriptionRequestDetailsOutput{} } else { sv = *v } @@ -16829,6 +17515,15 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionRequestDetailsOutput(v **G sv.DomainId = ptr.String(jtv) } + case "existingSubscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.ExistingSubscriptionId = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) @@ -16838,6 +17533,11 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionRequestDetailsOutput(v **G sv.Id = ptr.String(jtv) } + case "metadataForms": + if err := awsRestjson1_deserializeDocumentMetadataForms(&sv.MetadataForms, value); err != nil { + return err + } + case "requestReason": if value != nil { jtv, ok := value.(string) @@ -21137,6 +21837,182 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return nil } +type awsRestjson1_deserializeOpListRules struct { +} + +func (*awsRestjson1_deserializeOpListRules) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListRules) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListRules(response, &metadata) + } + output := &ListRulesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListRulesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListRulesOutput(v **ListRulesOutput, 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 *ListRulesOutput + if *v == nil { + sv = &ListRulesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsRestjson1_deserializeDocumentRuleSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListSubscriptionGrants struct { } @@ -23126,6 +24002,15 @@ func awsRestjson1_deserializeOpDocumentRejectSubscriptionRequestOutput(v **Rejec sv.DomainId = ptr.String(jtv) } + case "existingSubscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.ExistingSubscriptionId = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) @@ -23135,6 +24020,11 @@ func awsRestjson1_deserializeOpDocumentRejectSubscriptionRequestOutput(v **Rejec sv.Id = ptr.String(jtv) } + case "metadataForms": + if err := awsRestjson1_deserializeDocumentMetadataForms(&sv.MetadataForms, value); err != nil { + return err + } + case "requestReason": if value != nil { jtv, ok := value.(string) @@ -28181,14 +29071,14 @@ func awsRestjson1_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutp return nil } -type awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus struct { +type awsRestjson1_deserializeOpUpdateRule struct { } -func (*awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus) ID() string { +func (*awsRestjson1_deserializeOpUpdateRule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRule) 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) @@ -28206,9 +29096,9 @@ func (m *awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSubscriptionGrantStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRule(response, &metadata) } - output := &UpdateSubscriptionGrantStatusOutput{} + output := &UpdateRuleOutput{} out.Result = output var buff [1024]byte @@ -28229,7 +29119,7 @@ func (m *awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28243,7 +29133,7 @@ func (m *awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateSubscriptionGrantStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRule(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)} @@ -28296,6 +29186,9 @@ func awsRestjson1_deserializeOpErrorUpdateSubscriptionGrantStatus(response *smit case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -28315,7 +29208,7 @@ func awsRestjson1_deserializeOpErrorUpdateSubscriptionGrantStatus(response *smit } } -func awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(v **UpdateSubscriptionGrantStatusOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateRuleOutput(v **UpdateRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28328,18 +29221,22 @@ func awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(v **U return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateSubscriptionGrantStatusOutput + var sv *UpdateRuleOutput if *v == nil { - sv = &UpdateSubscriptionGrantStatusOutput{} + sv = &UpdateRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "assets": - if err := awsRestjson1_deserializeDocumentSubscribedAssets(&sv.Assets, value); err != nil { - return err + case "action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleAction to be of type string, got %T instead", value) + } + sv.Action = types.RuleAction(jtv) } case "createdAt": @@ -28367,54 +29264,73 @@ func awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(v **U sv.CreatedBy = ptr.String(jtv) } - case "domainId": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.DomainId = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "grantedEntity": - if err := awsRestjson1_deserializeDocumentGrantedEntity(&sv.GrantedEntity, value); err != nil { + case "detail": + if err := awsRestjson1_deserializeDocumentRuleDetail(&sv.Detail, value); err != nil { return err } - case "id": + case "identifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionGrantId to be of type string, got %T instead", value) + return fmt.Errorf("expected RuleId to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Identifier = ptr.String(jtv) } - case "status": + case "lastUpdatedBy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionGrantOverallStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) } - sv.Status = types.SubscriptionGrantOverallStatus(jtv) + sv.LastUpdatedBy = ptr.String(jtv) } - case "subscriptionId": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) } - sv.SubscriptionId = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "subscriptionTargetId": + case "revision": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubscriptionTargetId to be of type string, got %T instead", value) + return fmt.Errorf("expected Revision to be of type string, got %T instead", value) } - sv.SubscriptionTargetId = ptr.String(jtv) + sv.Revision = ptr.String(jtv) + } + + case "ruleType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleType to be of type string, got %T instead", value) + } + sv.RuleType = types.RuleType(jtv) + } + + case "scope": + if err := awsRestjson1_deserializeDocumentRuleScope(&sv.Scope, value); err != nil { + return err + } + + case "target": + if err := awsRestjson1_deserializeDocumentRuleTarget(&sv.Target, value); err != nil { + return err } case "updatedAt": @@ -28433,15 +29349,6 @@ func awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(v **U } } - case "updatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) - } - sv.UpdatedBy = ptr.String(jtv) - } - default: _, _ = key, value @@ -28451,14 +29358,14 @@ func awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(v **U return nil } -type awsRestjson1_deserializeOpUpdateSubscriptionRequest struct { +type awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus struct { } -func (*awsRestjson1_deserializeOpUpdateSubscriptionRequest) ID() string { +func (*awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSubscriptionRequest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateSubscriptionGrantStatus) 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) @@ -28476,9 +29383,9 @@ func (m *awsRestjson1_deserializeOpUpdateSubscriptionRequest) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSubscriptionRequest(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSubscriptionGrantStatus(response, &metadata) } - output := &UpdateSubscriptionRequestOutput{} + output := &UpdateSubscriptionGrantStatusOutput{} out.Result = output var buff [1024]byte @@ -28499,7 +29406,7 @@ func (m *awsRestjson1_deserializeOpUpdateSubscriptionRequest) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateSubscriptionRequestOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28513,7 +29420,277 @@ func (m *awsRestjson1_deserializeOpUpdateSubscriptionRequest) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateSubscriptionRequest(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateSubscriptionGrantStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSubscriptionGrantStatusOutput(v **UpdateSubscriptionGrantStatusOutput, 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 *UpdateSubscriptionGrantStatusOutput + if *v == nil { + sv = &UpdateSubscriptionGrantStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "assets": + if err := awsRestjson1_deserializeDocumentSubscribedAssets(&sv.Assets, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedBy to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "domainId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + } + sv.DomainId = ptr.String(jtv) + } + + case "grantedEntity": + if err := awsRestjson1_deserializeDocumentGrantedEntity(&sv.GrantedEntity, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionGrantId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionGrantOverallStatus to be of type string, got %T instead", value) + } + sv.Status = types.SubscriptionGrantOverallStatus(jtv) + } + + case "subscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.SubscriptionId = ptr.String(jtv) + } + + case "subscriptionTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionTargetId to be of type string, got %T instead", value) + } + sv.SubscriptionTargetId = ptr.String(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "updatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSubscriptionRequest struct { +} + +func (*awsRestjson1_deserializeOpUpdateSubscriptionRequest) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSubscriptionRequest) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSubscriptionRequest(response, &metadata) + } + output := &UpdateSubscriptionRequestOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateSubscriptionRequestOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateSubscriptionRequest(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)} @@ -28650,6 +29827,15 @@ func awsRestjson1_deserializeOpDocumentUpdateSubscriptionRequestOutput(v **Updat sv.DomainId = ptr.String(jtv) } + case "existingSubscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.ExistingSubscriptionId = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) @@ -28659,6 +29845,11 @@ func awsRestjson1_deserializeOpDocumentUpdateSubscriptionRequestOutput(v **Updat sv.Id = ptr.String(jtv) } + case "metadataForms": + if err := awsRestjson1_deserializeDocumentMetadataForms(&sv.MetadataForms, value); err != nil { + return err + } + case "requestReason": if value != nil { jtv, ok := value.(string) @@ -30922,6 +32113,51 @@ func awsRestjson1_deserializeDocumentAssetTypeItem(v **types.AssetTypeItem, valu return nil } +func awsRestjson1_deserializeDocumentAssetTypesForRule(v **types.AssetTypesForRule, 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.AssetTypesForRule + if *v == nil { + sv = &types.AssetTypesForRule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "selectionMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleScopeSelectionMode to be of type string, got %T instead", value) + } + sv.SelectionMode = types.RuleScopeSelectionMode(jtv) + } + + case "specificAssetTypes": + if err := awsRestjson1_deserializeDocumentRuleAssetTypeList(&sv.SpecificAssetTypes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAuthorizedPrincipalIdentifiers(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -33733,6 +34969,55 @@ func awsRestjson1_deserializeDocumentDomainUnitSummary(v **types.DomainUnitSumma return nil } +func awsRestjson1_deserializeDocumentDomainUnitTarget(v **types.DomainUnitTarget, 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.DomainUnitTarget + if *v == nil { + sv = &types.DomainUnitTarget{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "domainUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainUnitId to be of type string, got %T instead", value) + } + sv.DomainUnitId = ptr.String(jtv) + } + + case "includeChildDomainUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildDomainUnits = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDomainUnitUserProperties(v **types.DomainUnitUserProperties, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -37245,6 +38530,217 @@ loop: return nil } +func awsRestjson1_deserializeDocumentMetadataFormEnforcementDetail(v **types.MetadataFormEnforcementDetail, 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.MetadataFormEnforcementDetail + if *v == nil { + sv = &types.MetadataFormEnforcementDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "requiredMetadataForms": + if err := awsRestjson1_deserializeDocumentRequiredMetadataFormList(&sv.RequiredMetadataForms, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetadataFormReference(v **types.MetadataFormReference, 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.MetadataFormReference + if *v == nil { + sv = &types.MetadataFormReference{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "typeIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FormTypeIdentifier to be of type string, got %T instead", value) + } + sv.TypeIdentifier = ptr.String(jtv) + } + + case "typeRevision": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Revision to be of type string, got %T instead", value) + } + sv.TypeRevision = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetadataForms(v *[]types.FormOutput, 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.FormOutput + if *v == nil { + cv = []types.FormOutput{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FormOutput + destAddr := &col + if err := awsRestjson1_deserializeDocumentFormOutput(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMetadataFormsSummary(v *[]types.MetadataFormSummary, 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.MetadataFormSummary + if *v == nil { + cv = []types.MetadataFormSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetadataFormSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetadataFormSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMetadataFormSummary(v **types.MetadataFormSummary, 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.MetadataFormSummary + if *v == nil { + sv = &types.MetadataFormSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "formName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FormName to be of type string, got %T instead", value) + } + sv.FormName = ptr.String(jtv) + } + + case "typeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FormTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + case "typeRevision": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Revision to be of type string, got %T instead", value) + } + sv.TypeRevision = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMetadataGenerationRunItem(v **types.MetadataGenerationRunItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -38666,6 +40162,51 @@ func awsRestjson1_deserializeDocumentProjectPolicyGrantPrincipal(v **types.Proje return nil } +func awsRestjson1_deserializeDocumentProjectsForRule(v **types.ProjectsForRule, 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.ProjectsForRule + if *v == nil { + sv = &types.ProjectsForRule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "selectionMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleScopeSelectionMode to be of type string, got %T instead", value) + } + sv.SelectionMode = types.RuleScopeSelectionMode(jtv) + } + + case "specificProjects": + if err := awsRestjson1_deserializeDocumentRuleProjectIdentifierList(&sv.SpecificProjects, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentProjectSummaries(v *[]types.ProjectSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -39414,6 +40955,40 @@ func awsRestjson1_deserializeDocumentRelationalFilterConfigurations(v *[]types.R return nil } +func awsRestjson1_deserializeDocumentRequiredMetadataFormList(v *[]types.MetadataFormReference, 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.MetadataFormReference + if *v == nil { + cv = []types.MetadataFormReference{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetadataFormReference + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetadataFormReference(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentResource(v **types.Resource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -39836,6 +41411,362 @@ func awsRestjson1_deserializeDocumentRowFilterList(v *[]types.RowFilter, value i return nil } +func awsRestjson1_deserializeDocumentRuleAssetTypeList(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 AssetTypeIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRuleDetail(v *types.RuleDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.RuleDetail +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "metadataFormEnforcementDetail": + var mv types.MetadataFormEnforcementDetail + destAddr := &mv + if err := awsRestjson1_deserializeDocumentMetadataFormEnforcementDetail(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.RuleDetailMemberMetadataFormEnforcementDetail{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentRuleProjectIdentifierList(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 ProjectId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRuleScope(v **types.RuleScope, 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.RuleScope + if *v == nil { + sv = &types.RuleScope{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "assetType": + if err := awsRestjson1_deserializeDocumentAssetTypesForRule(&sv.AssetType, value); err != nil { + return err + } + + case "dataProduct": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DataProduct = ptr.Bool(jtv) + } + + case "project": + if err := awsRestjson1_deserializeDocumentProjectsForRule(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRuleSummaries(v *[]types.RuleSummary, 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.RuleSummary + if *v == nil { + cv = []types.RuleSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RuleSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentRuleSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRuleSummary(v **types.RuleSummary, 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.RuleSummary + if *v == nil { + sv = &types.RuleSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleAction to be of type string, got %T instead", value) + } + sv.Action = types.RuleAction(jtv) + } + + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleId to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "lastUpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdatedBy to be of type string, got %T instead", value) + } + sv.LastUpdatedBy = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "revision": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Revision to be of type string, got %T instead", value) + } + sv.Revision = ptr.String(jtv) + } + + case "ruleType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleType to be of type string, got %T instead", value) + } + sv.RuleType = types.RuleType(jtv) + } + + case "scope": + if err := awsRestjson1_deserializeDocumentRuleScope(&sv.Scope, value); err != nil { + return err + } + + case "target": + if err := awsRestjson1_deserializeDocumentRuleTarget(&sv.Target, value); err != nil { + return err + } + + case "targetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleTargetType to be of type string, got %T instead", value) + } + sv.TargetType = types.RuleTargetType(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdatedAt to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRuleTarget(v *types.RuleTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.RuleTarget +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "domainUnitTarget": + var mv types.DomainUnitTarget + destAddr := &mv + if err := awsRestjson1_deserializeDocumentDomainUnitTarget(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.RuleTargetMemberDomainUnitTarget{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentRunStatisticsForAssets(v **types.RunStatisticsForAssets, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -41488,6 +43419,15 @@ func awsRestjson1_deserializeDocumentSubscriptionRequestSummary(v **types.Subscr sv.DomainId = ptr.String(jtv) } + case "existingSubscriptionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubscriptionId to be of type string, got %T instead", value) + } + sv.ExistingSubscriptionId = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) @@ -41497,6 +43437,11 @@ func awsRestjson1_deserializeDocumentSubscriptionRequestSummary(v **types.Subscr sv.Id = ptr.String(jtv) } + case "metadataFormsSummary": + if err := awsRestjson1_deserializeDocumentMetadataFormsSummary(&sv.MetadataFormsSummary, value); err != nil { + return err + } + case "requestReason": if value != nil { jtv, ok := value.(string) diff --git a/service/datazone/generated.json b/service/datazone/generated.json index 5cf281680f7..1e27f19ea2f 100644 --- a/service/datazone/generated.json +++ b/service/datazone/generated.json @@ -34,6 +34,7 @@ "api_op_CreateListingChangeSet.go", "api_op_CreateProject.go", "api_op_CreateProjectMembership.go", + "api_op_CreateRule.go", "api_op_CreateSubscriptionGrant.go", "api_op_CreateSubscriptionRequest.go", "api_op_CreateSubscriptionTarget.go", @@ -55,6 +56,7 @@ "api_op_DeleteListing.go", "api_op_DeleteProject.go", "api_op_DeleteProjectMembership.go", + "api_op_DeleteRule.go", "api_op_DeleteSubscriptionGrant.go", "api_op_DeleteSubscriptionRequest.go", "api_op_DeleteSubscriptionTarget.go", @@ -83,6 +85,7 @@ "api_op_GetListing.go", "api_op_GetMetadataGenerationRun.go", "api_op_GetProject.go", + "api_op_GetRule.go", "api_op_GetSubscription.go", "api_op_GetSubscriptionGrant.go", "api_op_GetSubscriptionRequestDetails.go", @@ -109,6 +112,7 @@ "api_op_ListPolicyGrants.go", "api_op_ListProjectMemberships.go", "api_op_ListProjects.go", + "api_op_ListRules.go", "api_op_ListSubscriptionGrants.go", "api_op_ListSubscriptionRequests.go", "api_op_ListSubscriptionTargets.go", @@ -143,6 +147,7 @@ "api_op_UpdateGlossaryTerm.go", "api_op_UpdateGroupProfile.go", "api_op_UpdateProject.go", + "api_op_UpdateRule.go", "api_op_UpdateSubscriptionGrantStatus.go", "api_op_UpdateSubscriptionRequest.go", "api_op_UpdateSubscriptionTarget.go", diff --git a/service/datazone/serializers.go b/service/datazone/serializers.go index a06017f6848..46a3c3cc447 100644 --- a/service/datazone/serializers.go +++ b/service/datazone/serializers.go @@ -3076,6 +3076,136 @@ func awsRestjson1_serializeOpDocumentCreateProjectMembershipInput(v *CreateProje return nil } +type awsRestjson1_serializeOpCreateRule struct { +} + +func (*awsRestjson1_serializeOpCreateRule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/rules") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateRuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateRuleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateRuleInput(v *CreateRuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateRuleInput(v *CreateRuleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Action) > 0 { + ok := object.Key("action") + ok.String(string(v.Action)) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Detail != nil { + ok := object.Key("detail") + if err := awsRestjson1_serializeDocumentRuleDetail(v.Detail, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Scope != nil { + ok := object.Key("scope") + if err := awsRestjson1_serializeDocumentRuleScope(v.Scope, ok); err != nil { + return err + } + } + + if v.Target != nil { + ok := object.Key("target") + if err := awsRestjson1_serializeDocumentRuleTarget(v.Target, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateSubscriptionGrant struct { } @@ -3285,6 +3415,13 @@ func awsRestjson1_serializeOpDocumentCreateSubscriptionRequestInput(v *CreateSub ok.String(*v.ClientToken) } + if v.MetadataForms != nil { + ok := object.Key("metadataForms") + if err := awsRestjson1_serializeDocumentMetadataFormInputs(v.MetadataForms, ok); err != nil { + return err + } + } + if v.RequestReason != nil { ok := object.Key("requestReason") ok.String(*v.RequestReason) @@ -4969,6 +5106,86 @@ func awsRestjson1_serializeOpDocumentDeleteProjectMembershipInput(v *DeleteProje return nil } +type awsRestjson1_serializeOpDeleteRule struct { +} + +func (*awsRestjson1_serializeOpDeleteRule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/rules/{identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteRuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteRuleInput(v *DeleteRuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteSubscriptionGrant struct { } @@ -7268,14 +7485,14 @@ func awsRestjson1_serializeOpHttpBindingsGetProjectInput(v *GetProjectInput, enc return nil } -type awsRestjson1_serializeOpGetSubscription struct { +type awsRestjson1_serializeOpGetRule struct { } -func (*awsRestjson1_serializeOpGetSubscription) ID() string { +func (*awsRestjson1_serializeOpGetRule) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7287,13 +7504,13 @@ func (m *awsRestjson1_serializeOpGetSubscription) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetSubscriptionInput) + input, ok := in.Parameters.(*GetRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscriptions/{identifier}") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/rules/{identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7309,7 +7526,7 @@ func (m *awsRestjson1_serializeOpGetSubscription) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetRuleInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7322,7 +7539,7 @@ func (m *awsRestjson1_serializeOpGetSubscription) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetSubscriptionInput(v *GetSubscriptionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetRuleInput(v *GetRuleInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7345,17 +7562,21 @@ func awsRestjson1_serializeOpHttpBindingsGetSubscriptionInput(v *GetSubscription } } + if v.Revision != nil { + encoder.SetQuery("revision").String(*v.Revision) + } + return nil } -type awsRestjson1_serializeOpGetSubscriptionGrant struct { +type awsRestjson1_serializeOpGetSubscription struct { } -func (*awsRestjson1_serializeOpGetSubscriptionGrant) ID() string { +func (*awsRestjson1_serializeOpGetSubscription) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetSubscriptionGrant) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7367,13 +7588,13 @@ func (m *awsRestjson1_serializeOpGetSubscriptionGrant) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetSubscriptionGrantInput) + input, ok := in.Parameters.(*GetSubscriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscription-grants/{identifier}") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscriptions/{identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7389,7 +7610,7 @@ func (m *awsRestjson1_serializeOpGetSubscriptionGrant) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionGrantInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7402,7 +7623,7 @@ func (m *awsRestjson1_serializeOpGetSubscriptionGrant) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetSubscriptionGrantInput(v *GetSubscriptionGrantInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSubscriptionInput(v *GetSubscriptionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7428,14 +7649,14 @@ func awsRestjson1_serializeOpHttpBindingsGetSubscriptionGrantInput(v *GetSubscri return nil } -type awsRestjson1_serializeOpGetSubscriptionRequestDetails struct { +type awsRestjson1_serializeOpGetSubscriptionGrant struct { } -func (*awsRestjson1_serializeOpGetSubscriptionRequestDetails) ID() string { +func (*awsRestjson1_serializeOpGetSubscriptionGrant) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetSubscriptionRequestDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSubscriptionGrant) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7447,13 +7668,13 @@ func (m *awsRestjson1_serializeOpGetSubscriptionRequestDetails) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetSubscriptionRequestDetailsInput) + input, ok := in.Parameters.(*GetSubscriptionGrantInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscription-requests/{identifier}") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscription-grants/{identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7469,7 +7690,7 @@ func (m *awsRestjson1_serializeOpGetSubscriptionRequestDetails) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionRequestDetailsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionGrantInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7482,7 +7703,7 @@ func (m *awsRestjson1_serializeOpGetSubscriptionRequestDetails) HandleSerialize( span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetSubscriptionRequestDetailsInput(v *GetSubscriptionRequestDetailsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSubscriptionGrantInput(v *GetSubscriptionGrantInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7508,14 +7729,14 @@ func awsRestjson1_serializeOpHttpBindingsGetSubscriptionRequestDetailsInput(v *G return nil } -type awsRestjson1_serializeOpGetSubscriptionTarget struct { +type awsRestjson1_serializeOpGetSubscriptionRequestDetails struct { } -func (*awsRestjson1_serializeOpGetSubscriptionTarget) ID() string { +func (*awsRestjson1_serializeOpGetSubscriptionRequestDetails) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetSubscriptionTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSubscriptionRequestDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7527,13 +7748,13 @@ func (m *awsRestjson1_serializeOpGetSubscriptionTarget) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetSubscriptionTargetInput) + input, ok := in.Parameters.(*GetSubscriptionRequestDetailsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments/{environmentIdentifier}/subscription-targets/{identifier}") + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/subscription-requests/{identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7549,7 +7770,7 @@ func (m *awsRestjson1_serializeOpGetSubscriptionTarget) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionTargetInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionRequestDetailsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7562,7 +7783,7 @@ func (m *awsRestjson1_serializeOpGetSubscriptionTarget) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetSubscriptionTargetInput(v *GetSubscriptionTargetInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSubscriptionRequestDetailsInput(v *GetSubscriptionRequestDetailsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7576,15 +7797,6 @@ func awsRestjson1_serializeOpHttpBindingsGetSubscriptionTargetInput(v *GetSubscr } } - if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member environmentIdentifier must not be empty")} - } - if v.EnvironmentIdentifier != nil { - if err := encoder.SetURI("environmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { - return err - } - } - if v.Identifier == nil || len(*v.Identifier) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} } @@ -7597,7 +7809,96 @@ func awsRestjson1_serializeOpHttpBindingsGetSubscriptionTargetInput(v *GetSubscr return nil } -type awsRestjson1_serializeOpGetTimeSeriesDataPoint struct { +type awsRestjson1_serializeOpGetSubscriptionTarget struct { +} + +func (*awsRestjson1_serializeOpGetSubscriptionTarget) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetSubscriptionTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetSubscriptionTargetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/environments/{environmentIdentifier}/subscription-targets/{identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetSubscriptionTargetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetSubscriptionTargetInput(v *GetSubscriptionTargetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("environmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetTimeSeriesDataPoint struct { } func (*awsRestjson1_serializeOpGetTimeSeriesDataPoint) ID() string { @@ -9632,6 +9933,131 @@ func awsRestjson1_serializeOpHttpBindingsListProjectsInput(v *ListProjectsInput, return nil } +type awsRestjson1_serializeOpListRules struct { +} + +func (*awsRestjson1_serializeOpListRules) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListRulesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/list-rules/{targetType}/{targetIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListRulesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListRulesInput(v *ListRulesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.Action) > 0 { + encoder.SetQuery("ruleAction").String(string(v.Action)) + } + + if v.AssetTypes != nil { + for i := range v.AssetTypes { + encoder.AddQuery("assetTypes").String(v.AssetTypes[i]) + } + } + + if v.DataProduct != nil { + encoder.SetQuery("dataProduct").Boolean(*v.DataProduct) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.IncludeCascaded != nil { + encoder.SetQuery("includeCascaded").Boolean(*v.IncludeCascaded) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.ProjectIds != nil { + for i := range v.ProjectIds { + encoder.AddQuery("projectIds").String(v.ProjectIds[i]) + } + } + + if len(v.RuleType) > 0 { + encoder.SetQuery("ruleType").String(string(v.RuleType)) + } + + if v.TargetIdentifier == nil || len(*v.TargetIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member targetIdentifier must not be empty")} + } + if v.TargetIdentifier != nil { + if err := encoder.SetURI("targetIdentifier").String(*v.TargetIdentifier); err != nil { + return err + } + } + + if len(v.TargetType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member targetType must not be empty")} + } + if len(v.TargetType) > 0 { + if err := encoder.SetURI("targetType").String(string(v.TargetType)); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListSubscriptionGrants struct { } @@ -13472,6 +13898,133 @@ func awsRestjson1_serializeOpDocumentUpdateProjectInput(v *UpdateProjectInput, v return nil } +type awsRestjson1_serializeOpUpdateRule struct { +} + +func (*awsRestjson1_serializeOpUpdateRule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/domains/{domainIdentifier}/rules/{identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateRuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateRuleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateRuleInput(v *UpdateRuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainIdentifier == nil || len(*v.DomainIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainIdentifier must not be empty")} + } + if v.DomainIdentifier != nil { + if err := encoder.SetURI("domainIdentifier").String(*v.DomainIdentifier); err != nil { + return err + } + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateRuleInput(v *UpdateRuleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Detail != nil { + ok := object.Key("detail") + if err := awsRestjson1_serializeDocumentRuleDetail(v.Detail, ok); err != nil { + return err + } + } + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Scope != nil { + ok := object.Key("scope") + if err := awsRestjson1_serializeDocumentRuleScope(v.Scope, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateSubscriptionGrantStatus struct { } @@ -14156,6 +14709,25 @@ func awsRestjson1_serializeDocumentAssetTargetNames(v []types.AssetTargetNameMap return nil } +func awsRestjson1_serializeDocumentAssetTypesForRule(v *types.AssetTypesForRule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SelectionMode) > 0 { + ok := object.Key("selectionMode") + ok.String(string(v.SelectionMode)) + } + + if v.SpecificAssetTypes != nil { + ok := object.Key("specificAssetTypes") + if err := awsRestjson1_serializeDocumentRuleAssetTypeList(v.SpecificAssetTypes, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAuthorizedPrincipalIdentifiers(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -14413,6 +14985,23 @@ func awsRestjson1_serializeDocumentDomainUnitPolicyGrantPrincipal(v *types.Domai return nil } +func awsRestjson1_serializeDocumentDomainUnitTarget(v *types.DomainUnitTarget, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DomainUnitId != nil { + ok := object.Key("domainUnitId") + ok.String(*v.DomainUnitId) + } + + if v.IncludeChildDomainUnits != nil { + ok := object.Key("includeChildDomainUnits") + ok.Boolean(*v.IncludeChildDomainUnits) + } + + return nil +} + func awsRestjson1_serializeDocumentEnabledRegionList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -14927,6 +15516,50 @@ func awsRestjson1_serializeDocumentMember(v types.Member, value smithyjson.Value return nil } +func awsRestjson1_serializeDocumentMetadataFormEnforcementDetail(v *types.MetadataFormEnforcementDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RequiredMetadataForms != nil { + ok := object.Key("requiredMetadataForms") + if err := awsRestjson1_serializeDocumentRequiredMetadataFormList(v.RequiredMetadataForms, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentMetadataFormInputs(v []types.FormInput, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFormInput(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMetadataFormReference(v *types.MetadataFormReference, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TypeIdentifier != nil { + ok := object.Key("typeIdentifier") + ok.String(*v.TypeIdentifier) + } + + if v.TypeRevision != nil { + ok := object.Key("typeRevision") + ok.String(*v.TypeRevision) + } + + return nil +} + func awsRestjson1_serializeDocumentMetadataGenerationRunTarget(v *types.MetadataGenerationRunTarget, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -15271,6 +15904,25 @@ func awsRestjson1_serializeDocumentProjectPolicyGrantPrincipal(v *types.ProjectP return nil } +func awsRestjson1_serializeDocumentProjectsForRule(v *types.ProjectsForRule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SelectionMode) > 0 { + ok := object.Key("selectionMode") + ok.String(string(v.SelectionMode)) + } + + if v.SpecificProjects != nil { + ok := object.Key("specificProjects") + if err := awsRestjson1_serializeDocumentRuleProjectIdentifierList(v.SpecificProjects, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentProvisioningConfiguration(v types.ProvisioningConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -15536,6 +16188,19 @@ func awsRestjson1_serializeDocumentRelationalFilterConfigurations(v []types.Rela return nil } +func awsRestjson1_serializeDocumentRequiredMetadataFormList(v []types.MetadataFormReference, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMetadataFormReference(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentRowFilter(v types.RowFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -15685,6 +16350,90 @@ func awsRestjson1_serializeDocumentRowFilterList(v []types.RowFilter, value smit return nil } +func awsRestjson1_serializeDocumentRuleAssetTypeList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentRuleDetail(v types.RuleDetail, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.RuleDetailMemberMetadataFormEnforcementDetail: + av := object.Key("metadataFormEnforcementDetail") + if err := awsRestjson1_serializeDocumentMetadataFormEnforcementDetail(&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 awsRestjson1_serializeDocumentRuleProjectIdentifierList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentRuleScope(v *types.RuleScope, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssetType != nil { + ok := object.Key("assetType") + if err := awsRestjson1_serializeDocumentAssetTypesForRule(v.AssetType, ok); err != nil { + return err + } + } + + if v.DataProduct != nil { + ok := object.Key("dataProduct") + ok.Boolean(*v.DataProduct) + } + + if v.Project != nil { + ok := object.Key("project") + if err := awsRestjson1_serializeDocumentProjectsForRule(v.Project, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRuleTarget(v types.RuleTarget, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.RuleTargetMemberDomainUnitTarget: + av := object.Key("domainUnitTarget") + if err := awsRestjson1_serializeDocumentDomainUnitTarget(&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 awsRestjson1_serializeDocumentS3LocationList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/datazone/snapshot/api_op_CreateRule.go.snap b/service/datazone/snapshot/api_op_CreateRule.go.snap new file mode 100644 index 00000000000..f8313fb9b39 --- /dev/null +++ b/service/datazone/snapshot/api_op_CreateRule.go.snap @@ -0,0 +1,42 @@ +CreateRule + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_DeleteRule.go.snap b/service/datazone/snapshot/api_op_DeleteRule.go.snap new file mode 100644 index 00000000000..f1b43d068da --- /dev/null +++ b/service/datazone/snapshot/api_op_DeleteRule.go.snap @@ -0,0 +1,41 @@ +DeleteRule + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_GetRule.go.snap b/service/datazone/snapshot/api_op_GetRule.go.snap new file mode 100644 index 00000000000..d9d32ce7bb9 --- /dev/null +++ b/service/datazone/snapshot/api_op_GetRule.go.snap @@ -0,0 +1,41 @@ +GetRule + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_ListRules.go.snap b/service/datazone/snapshot/api_op_ListRules.go.snap new file mode 100644 index 00000000000..f618e340aa4 --- /dev/null +++ b/service/datazone/snapshot/api_op_ListRules.go.snap @@ -0,0 +1,41 @@ +ListRules + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot/api_op_UpdateRule.go.snap b/service/datazone/snapshot/api_op_UpdateRule.go.snap new file mode 100644 index 00000000000..902b6583364 --- /dev/null +++ b/service/datazone/snapshot/api_op_UpdateRule.go.snap @@ -0,0 +1,41 @@ +UpdateRule + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/datazone/snapshot_test.go b/service/datazone/snapshot_test.go index f5ea0939139..48408627ae7 100644 --- a/service/datazone/snapshot_test.go +++ b/service/datazone/snapshot_test.go @@ -374,6 +374,18 @@ func TestCheckSnapshot_CreateProjectMembership(t *testing.T) { } } +func TestCheckSnapshot_CreateRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateSubscriptionGrant(t *testing.T) { svc := New(Options{}) _, err := svc.CreateSubscriptionGrant(context.Background(), nil, func(o *Options) { @@ -626,6 +638,18 @@ func TestCheckSnapshot_DeleteProjectMembership(t *testing.T) { } } +func TestCheckSnapshot_DeleteRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteSubscriptionGrant(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteSubscriptionGrant(context.Background(), nil, func(o *Options) { @@ -962,6 +986,18 @@ func TestCheckSnapshot_GetProject(t *testing.T) { } } +func TestCheckSnapshot_GetRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetSubscription(t *testing.T) { svc := New(Options{}) _, err := svc.GetSubscription(context.Background(), nil, func(o *Options) { @@ -1274,6 +1310,18 @@ func TestCheckSnapshot_ListProjects(t *testing.T) { } } +func TestCheckSnapshot_ListRules(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRules(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListRules") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListSubscriptionGrants(t *testing.T) { svc := New(Options{}) _, err := svc.ListSubscriptionGrants(context.Background(), nil, func(o *Options) { @@ -1682,6 +1730,18 @@ func TestCheckSnapshot_UpdateProject(t *testing.T) { } } +func TestCheckSnapshot_UpdateRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateSubscriptionGrantStatus(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateSubscriptionGrantStatus(context.Background(), nil, func(o *Options) { @@ -2041,6 +2101,18 @@ func TestUpdateSnapshot_CreateProjectMembership(t *testing.T) { } } +func TestUpdateSnapshot_CreateRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateSubscriptionGrant(t *testing.T) { svc := New(Options{}) _, err := svc.CreateSubscriptionGrant(context.Background(), nil, func(o *Options) { @@ -2293,6 +2365,18 @@ func TestUpdateSnapshot_DeleteProjectMembership(t *testing.T) { } } +func TestUpdateSnapshot_DeleteRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteSubscriptionGrant(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteSubscriptionGrant(context.Background(), nil, func(o *Options) { @@ -2629,6 +2713,18 @@ func TestUpdateSnapshot_GetProject(t *testing.T) { } } +func TestUpdateSnapshot_GetRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetSubscription(t *testing.T) { svc := New(Options{}) _, err := svc.GetSubscription(context.Background(), nil, func(o *Options) { @@ -2941,6 +3037,18 @@ func TestUpdateSnapshot_ListProjects(t *testing.T) { } } +func TestUpdateSnapshot_ListRules(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRules(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListRules") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListSubscriptionGrants(t *testing.T) { svc := New(Options{}) _, err := svc.ListSubscriptionGrants(context.Background(), nil, func(o *Options) { @@ -3349,6 +3457,18 @@ func TestUpdateSnapshot_UpdateProject(t *testing.T) { } } +func TestUpdateSnapshot_UpdateRule(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateRule(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateRule") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateSubscriptionGrantStatus(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateSubscriptionGrantStatus(context.Background(), nil, func(o *Options) { diff --git a/service/datazone/types/enums.go b/service/datazone/types/enums.go index e83acb314ae..f9450d9fca4 100644 --- a/service/datazone/types/enums.go +++ b/service/datazone/types/enums.go @@ -851,6 +851,76 @@ func (RejectRuleBehavior) Values() []RejectRuleBehavior { } } +type RuleAction string + +// Enum values for RuleAction +const ( + RuleActionCreateSubscriptionRequest RuleAction = "CREATE_SUBSCRIPTION_REQUEST" +) + +// Values returns all known values for RuleAction. 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 (RuleAction) Values() []RuleAction { + return []RuleAction{ + "CREATE_SUBSCRIPTION_REQUEST", + } +} + +type RuleScopeSelectionMode string + +// Enum values for RuleScopeSelectionMode +const ( + RuleScopeSelectionModeAll RuleScopeSelectionMode = "ALL" + RuleScopeSelectionModeSpecific RuleScopeSelectionMode = "SPECIFIC" +) + +// Values returns all known values for RuleScopeSelectionMode. 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 (RuleScopeSelectionMode) Values() []RuleScopeSelectionMode { + return []RuleScopeSelectionMode{ + "ALL", + "SPECIFIC", + } +} + +type RuleTargetType string + +// Enum values for RuleTargetType +const ( + RuleTargetTypeDomainUnit RuleTargetType = "DOMAIN_UNIT" +) + +// Values returns all known values for RuleTargetType. 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 (RuleTargetType) Values() []RuleTargetType { + return []RuleTargetType{ + "DOMAIN_UNIT", + } +} + +type RuleType string + +// Enum values for RuleType +const ( + RuleTypeMetadataFormEnforcement RuleType = "METADATA_FORM_ENFORCEMENT" +) + +// Values returns all known values for RuleType. 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 (RuleType) Values() []RuleType { + return []RuleType{ + "METADATA_FORM_ENFORCEMENT", + } +} + type SearchOutputAdditionalAttribute string // Enum values for SearchOutputAdditionalAttribute diff --git a/service/datazone/types/types.go b/service/datazone/types/types.go index f745e92d321..ca4e7630e57 100644 --- a/service/datazone/types/types.go +++ b/service/datazone/types/types.go @@ -482,6 +482,20 @@ type AssetTypeItem struct { noSmithyDocumentSerde } +// The asset type for the rule details. +type AssetTypesForRule struct { + + // The selection mode for the rule. + // + // This member is required. + SelectionMode RuleScopeSelectionMode + + // The specific asset types that are included in the rule. + SpecificAssetTypes []string + + noSmithyDocumentSerde +} + // The parameters of the console link specified as part of the environment action. type AwsConsoleLinkParameters struct { @@ -1239,6 +1253,20 @@ type DomainUnitSummary struct { noSmithyDocumentSerde } +// The target for the domain unit. +type DomainUnitTarget struct { + + // The ID of the domain unit. + // + // This member is required. + DomainUnitId *string + + // Specifies whether to apply a rule to the child domain units. + IncludeChildDomainUnits *bool + + noSmithyDocumentSerde +} + // The properties of the domain unit user. type DomainUnitUserProperties struct { @@ -2362,6 +2390,50 @@ type MemberDetailsMemberUser struct { func (*MemberDetailsMemberUser) isMemberDetails() {} +// The enforcement details of a metadata form. +type MetadataFormEnforcementDetail struct { + + // The required metadata forms. + RequiredMetadataForms []MetadataFormReference + + noSmithyDocumentSerde +} + +// The reference of a metadata form. +type MetadataFormReference struct { + + // The type ID of the metadata form reference. + // + // This member is required. + TypeIdentifier *string + + // The type revision of the metadata form reference. + // + // This member is required. + TypeRevision *string + + noSmithyDocumentSerde +} + +// The summary of the metadata form. +type MetadataFormSummary struct { + + // The type name of the metadata form. + // + // This member is required. + TypeName *string + + // The type revision of the metadata form. + // + // This member is required. + TypeRevision *string + + // The form name of the metadata form. + FormName *string + + noSmithyDocumentSerde +} + // The metadata generation run. type MetadataGenerationRunItem struct { @@ -2932,6 +3004,20 @@ type ProjectPolicyGrantPrincipal struct { noSmithyDocumentSerde } +// Specifies projects in which the rule is created. +type ProjectsForRule struct { + + // The selection mode of the rule. + // + // This member is required. + SelectionMode RuleScopeSelectionMode + + // The specific projects in which the rule is created. + SpecificProjects []string + + noSmithyDocumentSerde +} + // The details of a Amazon DataZone project. type ProjectSummary struct { @@ -3410,6 +3496,93 @@ type RowFilterExpressionMemberNotLike struct { func (*RowFilterExpressionMemberNotLike) isRowFilterExpression() {} +// The details of a rule. +// +// The following types satisfy this interface: +// +// RuleDetailMemberMetadataFormEnforcementDetail +type RuleDetail interface { + isRuleDetail() +} + +// The enforcement detail of the metadata form. +type RuleDetailMemberMetadataFormEnforcementDetail struct { + Value MetadataFormEnforcementDetail + + noSmithyDocumentSerde +} + +func (*RuleDetailMemberMetadataFormEnforcementDetail) isRuleDetail() {} + +// The scope of a rule. +type RuleScope struct { + + // The asset type included in the rule scope. + AssetType *AssetTypesForRule + + // The data product included in the rule scope. + DataProduct *bool + + // The project included in the rule scope. + Project *ProjectsForRule + + noSmithyDocumentSerde +} + +// The summary of the rule. +type RuleSummary struct { + + // The action of the rule. + Action RuleAction + + // The ID of the rule. + Identifier *string + + // The timestamp at which the rule was last updated. + LastUpdatedBy *string + + // The name of the rule. + Name *string + + // The revision of the rule. + Revision *string + + // The type of the rule. + RuleType RuleType + + // The scope of the rule. + Scope *RuleScope + + // The target of the rule. + Target RuleTarget + + // The target type of the rule. + TargetType RuleTargetType + + // The timestamp at which the rule was last updated. + UpdatedAt *time.Time + + noSmithyDocumentSerde +} + +// The target of the rule. +// +// The following types satisfy this interface: +// +// RuleTargetMemberDomainUnitTarget +type RuleTarget interface { + isRuleTarget() +} + +// The ID of the domain unit. +type RuleTargetMemberDomainUnitTarget struct { + Value DomainUnitTarget + + noSmithyDocumentSerde +} + +func (*RuleTargetMemberDomainUnitTarget) isRuleTarget() {} + // The asset statistics from the data source run. type RunStatisticsForAssets struct { @@ -3996,6 +4169,12 @@ type SubscriptionRequestSummary struct { // The decision comment of the subscription request. DecisionComment *string + // The ID of the existing subscription. + ExistingSubscriptionId *string + + // The summary of the metadata forms. + MetadataFormsSummary []MetadataFormSummary + // The identifier of the subscription request reviewer. ReviewerId *string @@ -4402,6 +4581,8 @@ func (*UnknownUnionMember) isProvisioningProperties() {} func (*UnknownUnionMember) isRedshiftStorage() {} func (*UnknownUnionMember) isRowFilter() {} func (*UnknownUnionMember) isRowFilterExpression() {} +func (*UnknownUnionMember) isRuleDetail() {} +func (*UnknownUnionMember) isRuleTarget() {} func (*UnknownUnionMember) isSearchInventoryResultItem() {} func (*UnknownUnionMember) isSearchResultItem() {} func (*UnknownUnionMember) isSearchTypesResultItem() {} diff --git a/service/datazone/types/types_exported_test.go b/service/datazone/types/types_exported_test.go index d14ce15180c..7ee2963555d 100644 --- a/service/datazone/types/types_exported_test.go +++ b/service/datazone/types/types_exported_test.go @@ -587,6 +587,42 @@ var _ *types.NotInExpression var _ *types.InExpression var _ *types.EqualToExpression +func ExampleRuleDetail_outputUsage() { + var union types.RuleDetail + // type switches can be used to check the union value + switch v := union.(type) { + case *types.RuleDetailMemberMetadataFormEnforcementDetail: + _ = v.Value // Value is types.MetadataFormEnforcementDetail + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.MetadataFormEnforcementDetail + +func ExampleRuleTarget_outputUsage() { + var union types.RuleTarget + // type switches can be used to check the union value + switch v := union.(type) { + case *types.RuleTargetMemberDomainUnitTarget: + _ = v.Value // Value is types.DomainUnitTarget + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.DomainUnitTarget + func ExampleSearchInventoryResultItem_outputUsage() { var union types.SearchInventoryResultItem // type switches can be used to check the union value diff --git a/service/datazone/validators.go b/service/datazone/validators.go index a4c00a92036..144f5a9ff19 100644 --- a/service/datazone/validators.go +++ b/service/datazone/validators.go @@ -530,6 +530,26 @@ func (m *validateOpCreateProjectMembership) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpCreateRule struct { +} + +func (*validateOpCreateRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateSubscriptionGrant struct { } @@ -950,6 +970,26 @@ func (m *validateOpDeleteProjectMembership) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDeleteRule struct { +} + +func (*validateOpDeleteRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteSubscriptionGrant struct { } @@ -1510,6 +1550,26 @@ func (m *validateOpGetProject) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpGetRule struct { +} + +func (*validateOpGetRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSubscriptionGrant struct { } @@ -2010,6 +2070,26 @@ func (m *validateOpListProjects) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpListRules struct { +} + +func (*validateOpListRules) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRulesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRulesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListSubscriptionGrants struct { } @@ -2690,6 +2770,26 @@ func (m *validateOpUpdateProject) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateRule struct { +} + +func (*validateOpUpdateRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateSubscriptionGrantStatus struct { } @@ -2874,6 +2974,10 @@ func addOpCreateProjectMembershipValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpCreateProjectMembership{}, middleware.After) } +func addOpCreateRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRule{}, middleware.After) +} + func addOpCreateSubscriptionGrantValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateSubscriptionGrant{}, middleware.After) } @@ -2958,6 +3062,10 @@ func addOpDeleteProjectMembershipValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDeleteProjectMembership{}, middleware.After) } +func addOpDeleteRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRule{}, middleware.After) +} + func addOpDeleteSubscriptionGrantValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSubscriptionGrant{}, middleware.After) } @@ -3070,6 +3178,10 @@ func addOpGetProjectValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetProject{}, middleware.After) } +func addOpGetRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRule{}, middleware.After) +} + func addOpGetSubscriptionGrantValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSubscriptionGrant{}, middleware.After) } @@ -3170,6 +3282,10 @@ func addOpListProjectsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListProjects{}, middleware.After) } +func addOpListRulesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRules{}, middleware.After) +} + func addOpListSubscriptionGrantsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListSubscriptionGrants{}, middleware.After) } @@ -3306,6 +3422,10 @@ func addOpUpdateProjectValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateProject{}, middleware.After) } +func addOpUpdateRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRule{}, middleware.After) +} + func addOpUpdateSubscriptionGrantStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSubscriptionGrantStatus{}, middleware.After) } @@ -3443,6 +3563,21 @@ func validateAssetTargetNames(v []types.AssetTargetNameMap) error { } } +func validateAssetTypesForRule(v *types.AssetTypesForRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssetTypesForRule"} + if len(v.SelectionMode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SelectionMode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDataProductItem(v *types.DataProductItem) error { if v == nil { return nil @@ -3532,6 +3667,21 @@ func validateDomainUnitPolicyGrantPrincipal(v *types.DomainUnitPolicyGrantPrinci } } +func validateDomainUnitTarget(v *types.DomainUnitTarget) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DomainUnitTarget"} + if v.DomainUnitId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainUnitId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEqualToExpression(v *types.EqualToExpression) error { if v == nil { return nil @@ -3911,6 +4061,58 @@ func validateListingRevisionInput(v *types.ListingRevisionInput) error { } } +func validateMetadataFormEnforcementDetail(v *types.MetadataFormEnforcementDetail) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetadataFormEnforcementDetail"} + if v.RequiredMetadataForms != nil { + if err := validateRequiredMetadataFormList(v.RequiredMetadataForms); err != nil { + invalidParams.AddNested("RequiredMetadataForms", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetadataFormInputs(v []types.FormInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetadataFormInputs"} + for i := range v { + if err := validateFormInput(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetadataFormReference(v *types.MetadataFormReference) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetadataFormReference"} + if v.TypeIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeIdentifier")) + } + if v.TypeRevision == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeRevision")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMetadataGenerationRunTarget(v *types.MetadataGenerationRunTarget) error { if v == nil { return nil @@ -4100,6 +4302,21 @@ func validateProjectPolicyGrantPrincipal(v *types.ProjectPolicyGrantPrincipal) e } } +func validateProjectsForRule(v *types.ProjectsForRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectsForRule"} + if len(v.SelectionMode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SelectionMode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRedshiftClusterStorage(v *types.RedshiftClusterStorage) error { if v == nil { return nil @@ -4271,6 +4488,23 @@ func validateRelationalFilterConfigurations(v []types.RelationalFilterConfigurat } } +func validateRequiredMetadataFormList(v []types.MetadataFormReference) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RequiredMetadataFormList"} + for i := range v { + if err := validateMetadataFormReference(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRowFilter(v types.RowFilter) error { if v == nil { return nil @@ -4410,6 +4644,66 @@ func validateRowFilterList(v []types.RowFilter) error { } } +func validateRuleDetail(v types.RuleDetail) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleDetail"} + switch uv := v.(type) { + case *types.RuleDetailMemberMetadataFormEnforcementDetail: + if err := validateMetadataFormEnforcementDetail(&uv.Value); err != nil { + invalidParams.AddNested("[metadataFormEnforcementDetail]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRuleScope(v *types.RuleScope) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleScope"} + if v.AssetType != nil { + if err := validateAssetTypesForRule(v.AssetType); err != nil { + invalidParams.AddNested("AssetType", err.(smithy.InvalidParamsError)) + } + } + if v.Project != nil { + if err := validateProjectsForRule(v.Project); err != nil { + invalidParams.AddNested("Project", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRuleTarget(v types.RuleTarget) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleTarget"} + switch uv := v.(type) { + case *types.RuleTargetMemberDomainUnitTarget: + if err := validateDomainUnitTarget(&uv.Value); err != nil { + invalidParams.AddNested("[domainUnitTarget]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSearchInItem(v *types.SearchInItem) error { if v == nil { return nil @@ -5198,6 +5492,48 @@ func validateOpCreateProjectMembershipInput(v *CreateProjectMembershipInput) err } } +func validateOpCreateRuleInput(v *CreateRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRuleInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Target == nil { + invalidParams.Add(smithy.NewErrParamRequired("Target")) + } else if v.Target != nil { + if err := validateRuleTarget(v.Target); err != nil { + invalidParams.AddNested("Target", err.(smithy.InvalidParamsError)) + } + } + if len(v.Action) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if v.Scope == nil { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } else if v.Scope != nil { + if err := validateRuleScope(v.Scope); err != nil { + invalidParams.AddNested("Scope", err.(smithy.InvalidParamsError)) + } + } + if v.Detail == nil { + invalidParams.Add(smithy.NewErrParamRequired("Detail")) + } else if v.Detail != nil { + if err := validateRuleDetail(v.Detail); err != nil { + invalidParams.AddNested("Detail", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateSubscriptionGrantInput(v *CreateSubscriptionGrantInput) error { if v == nil { return nil @@ -5252,6 +5588,11 @@ func validateOpCreateSubscriptionRequestInput(v *CreateSubscriptionRequestInput) if v.RequestReason == nil { invalidParams.Add(smithy.NewErrParamRequired("RequestReason")) } + if v.MetadataForms != nil { + if err := validateMetadataFormInputs(v.MetadataForms); err != nil { + invalidParams.AddNested("MetadataForms", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -5629,6 +5970,24 @@ func validateOpDeleteProjectMembershipInput(v *DeleteProjectMembershipInput) err } } +func validateOpDeleteRuleInput(v *DeleteRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRuleInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteSubscriptionGrantInput(v *DeleteSubscriptionGrantInput) error { if v == nil { return nil @@ -6145,6 +6504,24 @@ func validateOpGetProjectInput(v *GetProjectInput) error { } } +func validateOpGetRuleInput(v *GetRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRuleInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSubscriptionGrantInput(v *GetSubscriptionGrantInput) error { if v == nil { return nil @@ -6601,6 +6978,27 @@ func validateOpListProjectsInput(v *ListProjectsInput) error { } } +func validateOpListRulesInput(v *ListRulesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRulesInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if len(v.TargetType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TargetType")) + } + if v.TargetIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListSubscriptionGrantsInput(v *ListSubscriptionGrantsInput) error { if v == nil { return nil @@ -7324,6 +7722,34 @@ func validateOpUpdateProjectInput(v *UpdateProjectInput) error { } } +func validateOpUpdateRuleInput(v *UpdateRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRuleInput"} + if v.DomainIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainIdentifier")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.Scope != nil { + if err := validateRuleScope(v.Scope); err != nil { + invalidParams.AddNested("Scope", err.(smithy.InvalidParamsError)) + } + } + if v.Detail != nil { + if err := validateRuleDetail(v.Detail); err != nil { + invalidParams.AddNested("Detail", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateSubscriptionGrantStatusInput(v *UpdateSubscriptionGrantStatusInput) error { if v == nil { return nil diff --git a/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go b/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go index 0ad3f51bb1d..03b0dd7a131 100644 --- a/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go +++ b/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go @@ -13,8 +13,8 @@ import ( // Modifies the Capacity Reservation settings for a stopped instance. Use this // action to configure an instance to target a specific Capacity Reservation, run -// in any open Capacity Reservation with matching attributes, or run On-Demand -// Instance capacity. +// in any open Capacity Reservation with matching attributes, run in On-Demand +// Instance capacity, or only run in a Capacity Reservation. func (c *Client) ModifyInstanceCapacityReservationAttributes(ctx context.Context, params *ModifyInstanceCapacityReservationAttributesInput, optFns ...func(*Options)) (*ModifyInstanceCapacityReservationAttributesOutput, error) { if params == nil { params = &ModifyInstanceCapacityReservationAttributesInput{} diff --git a/service/ec2/api_op_RunInstances.go b/service/ec2/api_op_RunInstances.go index f44bed186d2..2d32bf2037a 100644 --- a/service/ec2/api_op_RunInstances.go +++ b/service/ec2/api_op_RunInstances.go @@ -118,7 +118,7 @@ type RunInstancesInput struct { // Information about the Capacity Reservation targeting option. If you do not // specify this parameter, the instance's Capacity Reservation preference defaults // to open , which enables it to run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). + // matching attributes (instance type, platform, Availability Zone, and tenancy). CapacityReservationSpecification *types.CapacityReservationSpecification // Unique, case-sensitive identifier you provide to ensure the idempotency of the diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index 3bdeda6004a..c284b408b07 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -64747,6 +64747,48 @@ func awsEc2query_deserializeDocumentBaselineEbsBandwidthMbps(v **types.BaselineE return nil } +func awsEc2query_deserializeDocumentBaselinePerformanceFactors(v **types.BaselinePerformanceFactors, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.BaselinePerformanceFactors + if *v == nil { + sv = &types.BaselinePerformanceFactors{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("cpu", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentCpuPerformanceFactor(&sv.Cpu, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentBlockDeviceMapping(v **types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -71596,6 +71638,48 @@ func awsEc2query_deserializeDocumentCpuOptions(v **types.CpuOptions, decoder smi return nil } +func awsEc2query_deserializeDocumentCpuPerformanceFactor(v **types.CpuPerformanceFactor, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CpuPerformanceFactor + if *v == nil { + sv = &types.CpuPerformanceFactor{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("referenceSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPerformanceFactorReferenceSet(&sv.References, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentCreateFleetError(v **types.CreateFleetError, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -91610,6 +91694,12 @@ func awsEc2query_deserializeDocumentInstanceRequirements(v **types.InstanceRequi return err } + case strings.EqualFold("baselinePerformanceFactors", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentBaselinePerformanceFactors(&sv.BaselinePerformanceFactors, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("burstablePerformance", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -112612,6 +112702,123 @@ func awsEc2query_deserializeDocumentPeeringTgwInfo(v **types.PeeringTgwInfo, dec return nil } +func awsEc2query_deserializeDocumentPerformanceFactorReference(v **types.PerformanceFactorReference, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PerformanceFactorReference + if *v == nil { + sv = &types.PerformanceFactorReference{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("instanceFamily", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceFamily = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentPerformanceFactorReferenceSet(v *[]types.PerformanceFactorReference, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PerformanceFactorReference + if *v == nil { + sv = make([]types.PerformanceFactorReference, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.PerformanceFactorReference + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentPerformanceFactorReference(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentPerformanceFactorReferenceSetUnwrapped(v *[]types.PerformanceFactorReference, decoder smithyxml.NodeDecoder) error { + var sv []types.PerformanceFactorReference + if *v == nil { + sv = make([]types.PerformanceFactorReference, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PerformanceFactorReference + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentPerformanceFactorReference(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentPhase1DHGroupNumbersList(v *[]types.Phase1DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index ef16707141b..9c3c4502d2e 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -45470,6 +45470,34 @@ func awsEc2query_serializeDocumentBaselineEbsBandwidthMbpsRequest(v *types.Basel return nil } +func awsEc2query_serializeDocumentBaselinePerformanceFactors(v *types.BaselinePerformanceFactors, value query.Value) error { + object := value.Object() + _ = object + + if v.Cpu != nil { + objectKey := object.Key("Cpu") + if err := awsEc2query_serializeDocumentCpuPerformanceFactor(v.Cpu, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsEc2query_serializeDocumentBaselinePerformanceFactorsRequest(v *types.BaselinePerformanceFactorsRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.Cpu != nil { + objectKey := object.Key("Cpu") + if err := awsEc2query_serializeDocumentCpuPerformanceFactorRequest(v.Cpu, objectKey); err != nil { + return err + } + } + + return nil +} + func awsEc2query_serializeDocumentBillingProductList(v []string, value query.Value) error { if len(v) == 0 { return nil @@ -46012,6 +46040,34 @@ func awsEc2query_serializeDocumentCpuOptionsRequest(v *types.CpuOptionsRequest, return nil } +func awsEc2query_serializeDocumentCpuPerformanceFactor(v *types.CpuPerformanceFactor, value query.Value) error { + object := value.Object() + _ = object + + if v.References != nil { + objectKey := object.FlatKey("ReferenceSet") + if err := awsEc2query_serializeDocumentPerformanceFactorReferenceSet(v.References, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsEc2query_serializeDocumentCpuPerformanceFactorRequest(v *types.CpuPerformanceFactorRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.References != nil { + objectKey := object.FlatKey("Reference") + if err := awsEc2query_serializeDocumentPerformanceFactorReferenceSetRequest(v.References, objectKey); err != nil { + return err + } + } + + return nil +} + func awsEc2query_serializeDocumentCreateTransitGatewayConnectRequestOptions(v *types.CreateTransitGatewayConnectRequestOptions, value query.Value) error { object := value.Object() _ = object @@ -48190,6 +48246,13 @@ func awsEc2query_serializeDocumentInstanceRequirements(v *types.InstanceRequirem } } + if v.BaselinePerformanceFactors != nil { + objectKey := object.Key("BaselinePerformanceFactors") + if err := awsEc2query_serializeDocumentBaselinePerformanceFactors(v.BaselinePerformanceFactors, objectKey); err != nil { + return err + } + } + if len(v.BurstablePerformance) > 0 { objectKey := object.Key("BurstablePerformance") objectKey.String(string(v.BurstablePerformance)) @@ -48351,6 +48414,13 @@ func awsEc2query_serializeDocumentInstanceRequirementsRequest(v *types.InstanceR } } + if v.BaselinePerformanceFactors != nil { + objectKey := object.Key("BaselinePerformanceFactors") + if err := awsEc2query_serializeDocumentBaselinePerformanceFactorsRequest(v.BaselinePerformanceFactors, objectKey); err != nil { + return err + } + } + if len(v.BurstablePerformance) > 0 { objectKey := object.Key("BurstablePerformance") objectKey.String(string(v.BurstablePerformance)) @@ -50887,6 +50957,60 @@ func awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v *types.Peeri return nil } +func awsEc2query_serializeDocumentPerformanceFactorReference(v *types.PerformanceFactorReference, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceFamily != nil { + objectKey := object.Key("InstanceFamily") + objectKey.String(*v.InstanceFamily) + } + + return nil +} + +func awsEc2query_serializeDocumentPerformanceFactorReferenceRequest(v *types.PerformanceFactorReferenceRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceFamily != nil { + objectKey := object.Key("InstanceFamily") + objectKey.String(*v.InstanceFamily) + } + + return nil +} + +func awsEc2query_serializeDocumentPerformanceFactorReferenceSet(v []types.PerformanceFactorReference, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("Item") + + for i := range v { + av := array.Value() + if err := awsEc2query_serializeDocumentPerformanceFactorReference(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsEc2query_serializeDocumentPerformanceFactorReferenceSetRequest(v []types.PerformanceFactorReferenceRequest, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("Item") + + for i := range v { + av := array.Value() + if err := awsEc2query_serializeDocumentPerformanceFactorReferenceRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v []types.Phase1DHGroupNumbersRequestListValue, value query.Value) error { if len(v) == 0 { return nil diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 3a8826a4762..51930fa6a91 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -1023,8 +1023,9 @@ type CapacityReservationPreference string // Enum values for CapacityReservationPreference const ( - CapacityReservationPreferenceOpen CapacityReservationPreference = "open" - CapacityReservationPreferenceNone CapacityReservationPreference = "none" + CapacityReservationPreferenceCapacityReservationsOnly CapacityReservationPreference = "capacity-reservations-only" + CapacityReservationPreferenceOpen CapacityReservationPreference = "open" + CapacityReservationPreferenceNone CapacityReservationPreference = "none" ) // Values returns all known values for CapacityReservationPreference. Note that @@ -1034,6 +1035,7 @@ const ( // The ordering of this slice is not guaranteed to be stable across updates. func (CapacityReservationPreference) Values() []CapacityReservationPreference { return []CapacityReservationPreference{ + "capacity-reservations-only", "open", "none", } @@ -1405,6 +1407,7 @@ const ( CpuManufacturerIntel CpuManufacturer = "intel" CpuManufacturerAmd CpuManufacturer = "amd" CpuManufacturerAmazonWebServices CpuManufacturer = "amazon-web-services" + CpuManufacturerApple CpuManufacturer = "apple" ) // Values returns all known values for CpuManufacturer. Note that this can be @@ -1416,6 +1419,7 @@ func (CpuManufacturer) Values() []CpuManufacturer { "intel", "amd", "amazon-web-services", + "apple", } } diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 4de16e994e3..1976730985f 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -858,6 +858,42 @@ type BaselineEbsBandwidthMbpsRequest struct { noSmithyDocumentSerde } +// The baseline performance to consider, using an instance family as a baseline +// reference. The instance family establishes the lowest acceptable level of +// performance. Amazon EC2 uses this baseline to guide instance type selection, but +// there is no guarantee that the selected instance types will always exceed the +// baseline for every application. +// +// Currently, this parameter only supports CPU performance as a baseline +// performance factor. For example, specifying c6i would use the CPU performance +// of the c6i family as the baseline reference. +type BaselinePerformanceFactors struct { + + // The CPU performance to consider, using an instance family as the baseline + // reference. + Cpu *CpuPerformanceFactor + + noSmithyDocumentSerde +} + +// The baseline performance to consider, using an instance family as a baseline +// reference. The instance family establishes the lowest acceptable level of +// performance. Amazon EC2 uses this baseline to guide instance type selection, but +// there is no guarantee that the selected instance types will always exceed the +// baseline for every application. +// +// Currently, this parameter only supports CPU performance as a baseline +// performance factor. For example, specifying c6i would use the CPU performance +// of the c6i family as the baseline reference. +type BaselinePerformanceFactorsRequest struct { + + // The CPU performance to consider, using an instance family as the baseline + // reference. + Cpu *CpuPerformanceFactorRequest + + noSmithyDocumentSerde +} + type BlobAttributeValue struct { Value []byte @@ -1530,24 +1566,30 @@ type CapacityReservationOptionsRequest struct { noSmithyDocumentSerde } -// Describes an instance's Capacity Reservation targeting option. You can specify -// only one parameter at a time. If you specify CapacityReservationPreference and -// CapacityReservationTarget , the request fails. +// Describes an instance's Capacity Reservation targeting option. // // Use the CapacityReservationPreference parameter to configure the instance to -// run as an On-Demand Instance or to run in any open Capacity Reservation that -// has matching attributes (instance type, platform, Availability Zone). Use the -// CapacityReservationTarget parameter to explicitly target a specific Capacity -// Reservation or a Capacity Reservation group. +// run as an On-Demand Instance, to run in any open Capacity Reservation that has +// matching attributes, or to run only in a Capacity Reservation or Capacity +// Reservation group. Use the CapacityReservationTarget parameter to explicitly +// target a specific Capacity Reservation or a Capacity Reservation group. +// +// You can only specify CapacityReservationPreference and CapacityReservationTarget +// if the CapacityReservationPreference is capacity-reservations-only . type CapacityReservationSpecification struct { // Indicates the instance's Capacity Reservation preferences. Possible preferences // include: // + // - capacity-reservations-only - The instance will only run in a Capacity + // Reservation or Capacity Reservation group. If capacity isn't available, the + // instance will fail to launch. + // // - open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). + // matching attributes (instance type, platform, Availability Zone, and tenancy). + // If capacity isn't available, the instance runs as an On-Demand Instance. // - // - none - The instance avoids running in a Capacity Reservation even if one is + // - none - The instance doesn't run in a Capacity Reservation even if one is // available. The instance runs as an On-Demand Instance. CapacityReservationPreference CapacityReservationPreference @@ -2444,6 +2486,36 @@ type CpuOptionsRequest struct { noSmithyDocumentSerde } +// The CPU performance to consider, using an instance family as the baseline +// reference. +type CpuPerformanceFactor struct { + + // Specify an instance family to use as the baseline reference for CPU + // performance. All instance types that match your specified attributes will be + // compared against the CPU performance of the referenced instance family, + // regardless of CPU manufacturer or architecture differences. + // + // Currently, only one instance family can be specified in the list. + References []PerformanceFactorReference + + noSmithyDocumentSerde +} + +// The CPU performance to consider, using an instance family as the baseline +// reference. +type CpuPerformanceFactorRequest struct { + + // Specify an instance family to use as the baseline reference for CPU + // performance. All instance types that match your specified attributes will be + // compared against the CPU performance of the referenced instance family, + // regardless of CPU manufacturer or architecture differences. + // + // Currently, only one instance family can be specified in the list. + References []PerformanceFactorReferenceRequest + + noSmithyDocumentSerde +} + // Describes the instances that could not be launched by the fleet. type CreateFleetError struct { @@ -7483,6 +7555,17 @@ type InstanceRequirements struct { // [Amazon EBS–optimized instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html BaselineEbsBandwidthMbps *BaselineEbsBandwidthMbps + // The baseline performance to consider, using an instance family as a baseline + // reference. The instance family establishes the lowest acceptable level of + // performance. Amazon EC2 uses this baseline to guide instance type selection, but + // there is no guarantee that the selected instance types will always exceed the + // baseline for every application. Currently, this parameter only supports CPU + // performance as a baseline performance factor. For more information, see [Performance protection]in the + // Amazon EC2 User Guide. + // + // [Performance protection]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-abis-performance-protection + BaselinePerformanceFactors *BaselinePerformanceFactors + // Indicates whether burstable performance T instance types are included, // excluded, or required. For more information, see [Burstable performance instances]. // @@ -7839,6 +7922,17 @@ type InstanceRequirementsRequest struct { // [Amazon EBS–optimized instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html BaselineEbsBandwidthMbps *BaselineEbsBandwidthMbpsRequest + // The baseline performance to consider, using an instance family as a baseline + // reference. The instance family establishes the lowest acceptable level of + // performance. Amazon EC2 uses this baseline to guide instance type selection, but + // there is no guarantee that the selected instance types will always exceed the + // baseline for every application. Currently, this parameter only supports CPU + // performance as a baseline performance factor. For more information, see [Performance protection]in the + // Amazon EC2 User Guide. + // + // [Performance protection]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-abis-performance-protection + BaselinePerformanceFactors *BaselinePerformanceFactorsRequest + // Indicates whether burstable performance T instance types are included, // excluded, or required. For more information, see [Burstable performance instances]. // @@ -13087,6 +13181,102 @@ type PeeringTgwInfo struct { noSmithyDocumentSerde } +// Specify an instance family to use as the baseline reference for CPU +// performance. All instance types that match your specified attributes will be +// compared against the CPU performance of the referenced instance family, +// regardless of CPU manufacturer or architecture. +// +// Currently, only one instance family can be specified in the list. +type PerformanceFactorReference struct { + + // The instance family to use as a baseline reference. + // + // Ensure that you specify the correct value for the instance family. The instance + // family is everything before the period ( . ) in the instance type name. For + // example, in the instance type c6i.large , the instance family is c6i , not c6 . + // For more information, see [Amazon EC2 instance type naming conventions]in Amazon EC2 Instance Types. + // + // The following instance families are not supported for performance protection: + // + // - c1 + // + // - g3 | g3s + // + // - hpc7g + // + // - m1 | m2 + // + // - mac1 | mac2 | mac2-m1ultra | mac2-m2 | mac2-m2pro + // + // - p3dn | p4d | p5 + // + // - t1 + // + // - u-12tb1 | u-18tb1 | u-24tb1 | u-3tb1 | u-6tb1 | u-9tb1 | u7i-12tb | + // u7in-16tb | u7in-24tb | u7in-32tb + // + // If you enable performance protection by specifying a supported instance family, + // the returned instance types will exclude the above unsupported instance + // families. + // + // If you specify an unsupported instance family as a value for baseline + // performance, the API returns an empty response for and an exception for , , , + // and . + // + // [Amazon EC2 instance type naming conventions]: https://docs.aws.amazon.com/ec2/latest/instancetypes/instance-type-names.html + InstanceFamily *string + + noSmithyDocumentSerde +} + +// Specify an instance family to use as the baseline reference for CPU +// performance. All instance types that match your specified attributes will be +// compared against the CPU performance of the referenced instance family, +// regardless of CPU manufacturer or architecture. +// +// Currently, only one instance family can be specified in the list. +type PerformanceFactorReferenceRequest struct { + + // The instance family to use as a baseline reference. + // + // Ensure that you specify the correct value for the instance family. The instance + // family is everything before the period ( . ) in the instance type name. For + // example, in the instance type c6i.large , the instance family is c6i , not c6 . + // For more information, see [Amazon EC2 instance type naming conventions]in Amazon EC2 Instance Types. + // + // The following instance families are not supported for performance protection: + // + // - c1 + // + // - g3 | g3s + // + // - hpc7g + // + // - m1 | m2 + // + // - mac1 | mac2 | mac2-m1ultra | mac2-m2 | mac2-m2pro + // + // - p3dn | p4d | p5 + // + // - t1 + // + // - u-12tb1 | u-18tb1 | u-24tb1 | u-3tb1 | u-6tb1 | u-9tb1 | u7i-12tb | + // u7in-16tb | u7in-24tb | u7in-32tb + // + // If you enable performance protection by specifying a supported instance family, + // the returned instance types will exclude the above unsupported instance + // families. + // + // If you specify an unsupported instance family as a value for baseline + // performance, the API returns an empty response for and an exception for , , , + // and . + // + // [Amazon EC2 instance type naming conventions]: https://docs.aws.amazon.com/ec2/latest/instancetypes/instance-type-names.html + InstanceFamily *string + + noSmithyDocumentSerde +} + // The Diffie-Hellmann group number for phase 1 IKE negotiations. type Phase1DHGroupNumbersListValue struct { diff --git a/service/ecs/api_op_CreateService.go b/service/ecs/api_op_CreateService.go index ff3e0267a08..6a6e6b7fe3c 100644 --- a/service/ecs/api_op_CreateService.go +++ b/service/ecs/api_op_CreateService.go @@ -139,6 +139,14 @@ type CreateServiceInput struct { // This member is required. ServiceName *string + // Indicates whether to use Availability Zone rebalancing for the service. + // + // For more information, see [Balancing an Amazon ECS service across Availability Zones] in the Amazon Elastic Container Service Developer + // Guide. + // + // [Balancing an Amazon ECS service across Availability Zones]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html + AvailabilityZoneRebalancing types.AvailabilityZoneRebalancing + // The capacity provider strategy to use for the service. // // If a capacityProviderStrategy is specified, the launchType parameter must be diff --git a/service/ecs/api_op_DeleteCapacityProvider.go b/service/ecs/api_op_DeleteCapacityProvider.go index a8f509e8d49..a31ac785a9a 100644 --- a/service/ecs/api_op_DeleteCapacityProvider.go +++ b/service/ecs/api_op_DeleteCapacityProvider.go @@ -24,11 +24,12 @@ import ( // that any tasks using the Amazon EC2 instance capacity provided by the capacity // provider are transitioned to use the capacity from the remaining capacity // providers. Only capacity providers that aren't associated with a cluster can be -// deleted. To remove a capacity provider from a cluster, you can either use [PutCapacityProviderProviders]or +// deleted. To remove a capacity provider from a cluster, you can either use [PutClusterCapacityProviders]or // delete the cluster. // // [PutCapacityProviderProviders]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutCapacityProviderProviders.html // [UpdateService]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html +// [PutClusterCapacityProviders]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html func (c *Client) DeleteCapacityProvider(ctx context.Context, params *DeleteCapacityProviderInput, optFns ...func(*Options)) (*DeleteCapacityProviderOutput, error) { if params == nil { params = &DeleteCapacityProviderInput{} diff --git a/service/ecs/api_op_UpdateService.go b/service/ecs/api_op_UpdateService.go index b16b2e15194..4d46e2a90a5 100644 --- a/service/ecs/api_op_UpdateService.go +++ b/service/ecs/api_op_UpdateService.go @@ -160,6 +160,14 @@ type UpdateServiceInput struct { // This member is required. Service *string + // Indicates whether to use Availability Zone rebalancing for the service. + // + // For more information, see [Balancing an Amazon ECS service across Availability Zones] in the Amazon Elastic Container Service Developer + // Guide. + // + // [Balancing an Amazon ECS service across Availability Zones]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html + AvailabilityZoneRebalancing types.AvailabilityZoneRebalancing + // The capacity provider strategy to update the service to use. // // if the service uses the default capacity provider strategy for the cluster, the diff --git a/service/ecs/deserializers.go b/service/ecs/deserializers.go index 04bc1a54734..ef70d94b23b 100644 --- a/service/ecs/deserializers.go +++ b/service/ecs/deserializers.go @@ -15273,6 +15273,15 @@ func awsAwsjson11_deserializeDocumentService(v **types.Service, value interface{ for key, value := range shape { switch key { + case "availabilityZoneRebalancing": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneRebalancing to be of type string, got %T instead", value) + } + sv.AvailabilityZoneRebalancing = types.AvailabilityZoneRebalancing(jtv) + } + case "capacityProviderStrategy": if err := awsAwsjson11_deserializeDocumentCapacityProviderStrategy(&sv.CapacityProviderStrategy, value); err != nil { return err diff --git a/service/ecs/serializers.go b/service/ecs/serializers.go index cad69fb8acf..3fd9edcc8d1 100644 --- a/service/ecs/serializers.go +++ b/service/ecs/serializers.go @@ -6629,6 +6629,11 @@ func awsAwsjson11_serializeOpDocumentCreateServiceInput(v *CreateServiceInput, v object := value.Object() defer object.Close() + if len(v.AvailabilityZoneRebalancing) > 0 { + ok := object.Key("availabilityZoneRebalancing") + ok.String(string(v.AvailabilityZoneRebalancing)) + } + if v.CapacityProviderStrategy != nil { ok := object.Key("capacityProviderStrategy") if err := awsAwsjson11_serializeDocumentCapacityProviderStrategy(v.CapacityProviderStrategy, ok); err != nil { @@ -8400,6 +8405,11 @@ func awsAwsjson11_serializeOpDocumentUpdateServiceInput(v *UpdateServiceInput, v object := value.Object() defer object.Close() + if len(v.AvailabilityZoneRebalancing) > 0 { + ok := object.Key("availabilityZoneRebalancing") + ok.String(string(v.AvailabilityZoneRebalancing)) + } + if v.CapacityProviderStrategy != nil { ok := object.Key("capacityProviderStrategy") if err := awsAwsjson11_serializeDocumentCapacityProviderStrategy(v.CapacityProviderStrategy, ok); err != nil { diff --git a/service/ecs/types/enums.go b/service/ecs/types/enums.go index 4797043ccbb..a842b7b728d 100644 --- a/service/ecs/types/enums.go +++ b/service/ecs/types/enums.go @@ -69,6 +69,25 @@ func (AssignPublicIp) Values() []AssignPublicIp { } } +type AvailabilityZoneRebalancing string + +// Enum values for AvailabilityZoneRebalancing +const ( + AvailabilityZoneRebalancingEnabled AvailabilityZoneRebalancing = "ENABLED" + AvailabilityZoneRebalancingDisabled AvailabilityZoneRebalancing = "DISABLED" +) + +// Values returns all known values for AvailabilityZoneRebalancing. 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 (AvailabilityZoneRebalancing) Values() []AvailabilityZoneRebalancing { + return []AvailabilityZoneRebalancing{ + "ENABLED", + "DISABLED", + } +} + type CapacityProviderField string // Enum values for CapacityProviderField diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index f00ded58981..774b25fe300 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -1929,10 +1929,7 @@ type DeploymentConfiguration struct { noSmithyDocumentSerde } -// The deployment controller to use for the service. For more information, see [Amazon ECS deployment types] in -// the Amazon Elastic Container Service Developer Guide. -// -// [Amazon ECS deployment types]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html +// The deployment controller to use for the service. type DeploymentController struct { // The deployment controller type to use. @@ -1945,14 +1942,26 @@ type DeploymentController struct { // is controlled by adjusting the minimum and maximum number of healthy tasks // allowed during a service deployment, as specified in the [DeploymentConfiguration]. // + // For more information about rolling deployments, see [Deploy Amazon ECS services by replacing tasks] in the Amazon Elastic + // Container Service Developer Guide. + // // CODE_DEPLOY The blue/green ( CODE_DEPLOY ) deployment type uses the blue/green // deployment model powered by CodeDeploy, which allows you to verify a new // deployment of a service before sending production traffic to it. // + // For more information about blue/green deployments, see [Validate the state of an Amazon ECS service before deployment] in the Amazon Elastic + // Container Service Developer Guide. + // // EXTERNAL The external ( EXTERNAL ) deployment type enables you to use any // third-party deployment controller for full control over the deployment process // for an Amazon ECS service. // + // For more information about external deployments, see [Deploy Amazon ECS services using a third-party controller] in the Amazon Elastic + // Container Service Developer Guide. + // + // [Validate the state of an Amazon ECS service before deployment]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-bluegreen.html + // [Deploy Amazon ECS services by replacing tasks]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html + // [Deploy Amazon ECS services using a third-party controller]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-external.html // [DeploymentConfiguration]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeploymentConfiguration.html // // This member is required. @@ -3743,6 +3752,14 @@ type Secret struct { // Details on a service within a cluster. type Service struct { + // Indicates whether to use Availability Zone rebalancing for the service. + // + // For more information, see [Balancing an Amazon ECS service across Availability Zones] in the Amazon Elastic Container Service Developer + // Guide. + // + // [Balancing an Amazon ECS service across Availability Zones]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html + AvailabilityZoneRebalancing AvailabilityZoneRebalancing + // The capacity provider strategy the service uses. When using the // DescribeServices API, this field is omitted if the service was created using a // launch type. diff --git a/service/elasticloadbalancingv2/api_op_DescribeCapacityReservation.go b/service/elasticloadbalancingv2/api_op_DescribeCapacityReservation.go new file mode 100644 index 00000000000..8b250014817 --- /dev/null +++ b/service/elasticloadbalancingv2/api_op_DescribeCapacityReservation.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package elasticloadbalancingv2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Describes the capacity reservation status for the specified load balancer. +func (c *Client) DescribeCapacityReservation(ctx context.Context, params *DescribeCapacityReservationInput, optFns ...func(*Options)) (*DescribeCapacityReservationOutput, error) { + if params == nil { + params = &DescribeCapacityReservationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeCapacityReservation", params, optFns, c.addOperationDescribeCapacityReservationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeCapacityReservationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeCapacityReservationInput struct { + + // The Amazon Resource Name (ARN) of the load balancer. + // + // This member is required. + LoadBalancerArn *string + + noSmithyDocumentSerde +} + +type DescribeCapacityReservationOutput struct { + + // The state of the capacity reservation. + CapacityReservationState []types.ZonalCapacityReservationState + + // The amount of daily capacity decreases remaining. + DecreaseRequestsRemaining *int32 + + // The last time the capacity reservation was modified. + LastModifiedTime *time.Time + + // The requested minimum capacity reservation for the load balancer + MinimumLoadBalancerCapacity *types.MinimumLoadBalancerCapacity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeCapacityReservation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeCapacityReservation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCapacityReservation"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDescribeCapacityReservationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapacityReservation(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeCapacityReservation", + } +} diff --git a/service/elasticloadbalancingv2/api_op_ModifyCapacityReservation.go b/service/elasticloadbalancingv2/api_op_ModifyCapacityReservation.go new file mode 100644 index 00000000000..1d828c4bbf3 --- /dev/null +++ b/service/elasticloadbalancingv2/api_op_ModifyCapacityReservation.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package elasticloadbalancingv2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Modifies the capacity reservation of the specified load balancer. +// +// When modifying capacity reservation, you must include at least one +// MinimumLoadBalancerCapacity or ResetCapacityReservation . +func (c *Client) ModifyCapacityReservation(ctx context.Context, params *ModifyCapacityReservationInput, optFns ...func(*Options)) (*ModifyCapacityReservationOutput, error) { + if params == nil { + params = &ModifyCapacityReservationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifyCapacityReservation", params, optFns, c.addOperationModifyCapacityReservationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifyCapacityReservationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifyCapacityReservationInput struct { + + // The Amazon Resource Name (ARN) of the load balancer. + // + // This member is required. + LoadBalancerArn *string + + // The minimum load balancer capacity reserved. + MinimumLoadBalancerCapacity *types.MinimumLoadBalancerCapacity + + // Resets the capacity reservation. + ResetCapacityReservation *bool + + noSmithyDocumentSerde +} + +type ModifyCapacityReservationOutput struct { + + // The state of the capacity reservation. + CapacityReservationState []types.ZonalCapacityReservationState + + // The amount of daily capacity decreases remaining. + DecreaseRequestsRemaining *int32 + + // The last time the capacity reservation was modified. + LastModifiedTime *time.Time + + // The requested minimum capacity reservation for the load balancer + MinimumLoadBalancerCapacity *types.MinimumLoadBalancerCapacity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifyCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyCapacityReservation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyCapacityReservation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyCapacityReservation"); 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 = addSpanRetryLoop(stack, options); 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 = addOpModifyCapacityReservationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCapacityReservation(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opModifyCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ModifyCapacityReservation", + } +} diff --git a/service/elasticloadbalancingv2/deserializers.go b/service/elasticloadbalancingv2/deserializers.go index 558955f6ec0..dc5898d84a9 100644 --- a/service/elasticloadbalancingv2/deserializers.go +++ b/service/elasticloadbalancingv2/deserializers.go @@ -2037,6 +2037,118 @@ func awsAwsquery_deserializeOpErrorDescribeAccountLimits(response *smithyhttp.Re } } +type awsAwsquery_deserializeOpDescribeCapacityReservation struct { +} + +func (*awsAwsquery_deserializeOpDescribeCapacityReservation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDescribeCapacityReservation) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsquery_deserializeOpErrorDescribeCapacityReservation(response, &metadata) + } + output := &DescribeCapacityReservationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("DescribeCapacityReservationResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentDescribeCapacityReservationOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDescribeCapacityReservation(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("LoadBalancerNotFound", errorCode): + return awsAwsquery_deserializeErrorLoadBalancerNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpDescribeListenerAttributes struct { } @@ -3980,6 +4092,139 @@ func awsAwsquery_deserializeOpErrorGetTrustStoreRevocationContent(response *smit } } +type awsAwsquery_deserializeOpModifyCapacityReservation struct { +} + +func (*awsAwsquery_deserializeOpModifyCapacityReservation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpModifyCapacityReservation) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsquery_deserializeOpErrorModifyCapacityReservation(response, &metadata) + } + output := &ModifyCapacityReservationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ModifyCapacityReservationResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentModifyCapacityReservationOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorModifyCapacityReservation(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("CapacityDecreaseRequestLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorCapacityDecreaseRequestsLimitExceededException(response, errorBody) + + case strings.EqualFold("CapacityReservationPending", errorCode): + return awsAwsquery_deserializeErrorCapacityReservationPendingException(response, errorBody) + + case strings.EqualFold("CapacityUnitsLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorCapacityUnitsLimitExceededException(response, errorBody) + + case strings.EqualFold("InsufficientCapacity", errorCode): + return awsAwsquery_deserializeErrorInsufficientCapacityException(response, errorBody) + + case strings.EqualFold("InvalidConfigurationRequest", errorCode): + return awsAwsquery_deserializeErrorInvalidConfigurationRequestException(response, errorBody) + + case strings.EqualFold("LoadBalancerNotFound", errorCode): + return awsAwsquery_deserializeErrorLoadBalancerNotFoundException(response, errorBody) + + case strings.EqualFold("OperationNotPermitted", errorCode): + return awsAwsquery_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsAwsquery_deserializeErrorPriorRequestNotCompleteException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpModifyListener struct { } @@ -5803,6 +6048,9 @@ func awsAwsquery_deserializeOpErrorSetSubnets(response *smithyhttp.Response, met case strings.EqualFold("AvailabilityZoneNotSupported", errorCode): return awsAwsquery_deserializeErrorAvailabilityZoneNotSupportedException(response, errorBody) + case strings.EqualFold("CapacityReservationPending", errorCode): + return awsAwsquery_deserializeErrorCapacityReservationPendingException(response, errorBody) + case strings.EqualFold("InvalidConfigurationRequest", errorCode): return awsAwsquery_deserializeErrorInvalidConfigurationRequestException(response, errorBody) @@ -6001,8 +6249,8 @@ func awsAwsquery_deserializeErrorCaCertificatesBundleNotFoundException(response return output } -func awsAwsquery_deserializeErrorCertificateNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CertificateNotFoundException{} +func awsAwsquery_deserializeErrorCapacityDecreaseRequestsLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CapacityDecreaseRequestsLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -6032,7 +6280,7 @@ func awsAwsquery_deserializeErrorCertificateNotFoundException(response *smithyht } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentCertificateNotFoundException(&output, decoder) + err = awsAwsquery_deserializeDocumentCapacityDecreaseRequestsLimitExceededException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6045,8 +6293,8 @@ func awsAwsquery_deserializeErrorCertificateNotFoundException(response *smithyht return output } -func awsAwsquery_deserializeErrorDeleteAssociationSameAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DeleteAssociationSameAccountException{} +func awsAwsquery_deserializeErrorCapacityReservationPendingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CapacityReservationPendingException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -6076,7 +6324,7 @@ func awsAwsquery_deserializeErrorDeleteAssociationSameAccountException(response } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentDeleteAssociationSameAccountException(&output, decoder) + err = awsAwsquery_deserializeDocumentCapacityReservationPendingException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6089,8 +6337,8 @@ func awsAwsquery_deserializeErrorDeleteAssociationSameAccountException(response return output } -func awsAwsquery_deserializeErrorDuplicateListenerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DuplicateListenerException{} +func awsAwsquery_deserializeErrorCapacityUnitsLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CapacityUnitsLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -6120,7 +6368,7 @@ func awsAwsquery_deserializeErrorDuplicateListenerException(response *smithyhttp } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentDuplicateListenerException(&output, decoder) + err = awsAwsquery_deserializeDocumentCapacityUnitsLimitExceededException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6133,8 +6381,8 @@ func awsAwsquery_deserializeErrorDuplicateListenerException(response *smithyhttp return output } -func awsAwsquery_deserializeErrorDuplicateLoadBalancerNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DuplicateLoadBalancerNameException{} +func awsAwsquery_deserializeErrorCertificateNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CertificateNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -6164,7 +6412,7 @@ func awsAwsquery_deserializeErrorDuplicateLoadBalancerNameException(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentDuplicateLoadBalancerNameException(&output, decoder) + err = awsAwsquery_deserializeDocumentCertificateNotFoundException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6177,8 +6425,8 @@ func awsAwsquery_deserializeErrorDuplicateLoadBalancerNameException(response *sm return output } -func awsAwsquery_deserializeErrorDuplicateTagKeysException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DuplicateTagKeysException{} +func awsAwsquery_deserializeErrorDeleteAssociationSameAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DeleteAssociationSameAccountException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -6208,7 +6456,7 @@ func awsAwsquery_deserializeErrorDuplicateTagKeysException(response *smithyhttp. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentDuplicateTagKeysException(&output, decoder) + err = awsAwsquery_deserializeDocumentDeleteAssociationSameAccountException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6221,8 +6469,8 @@ func awsAwsquery_deserializeErrorDuplicateTagKeysException(response *smithyhttp. return output } -func awsAwsquery_deserializeErrorDuplicateTargetGroupNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DuplicateTargetGroupNameException{} +func awsAwsquery_deserializeErrorDuplicateListenerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateListenerException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -6252,7 +6500,7 @@ func awsAwsquery_deserializeErrorDuplicateTargetGroupNameException(response *smi } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentDuplicateTargetGroupNameException(&output, decoder) + err = awsAwsquery_deserializeDocumentDuplicateListenerException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6265,8 +6513,8 @@ func awsAwsquery_deserializeErrorDuplicateTargetGroupNameException(response *smi return output } -func awsAwsquery_deserializeErrorDuplicateTrustStoreNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DuplicateTrustStoreNameException{} +func awsAwsquery_deserializeErrorDuplicateLoadBalancerNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateLoadBalancerNameException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -6296,7 +6544,7 @@ func awsAwsquery_deserializeErrorDuplicateTrustStoreNameException(response *smit } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentDuplicateTrustStoreNameException(&output, decoder) + err = awsAwsquery_deserializeDocumentDuplicateLoadBalancerNameException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6309,9 +6557,141 @@ func awsAwsquery_deserializeErrorDuplicateTrustStoreNameException(response *smit return output } -func awsAwsquery_deserializeErrorHealthUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HealthUnavailableException{} - var buff [1024]byte +func awsAwsquery_deserializeErrorDuplicateTagKeysException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateTagKeysException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentDuplicateTagKeysException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorDuplicateTargetGroupNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateTargetGroupNameException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentDuplicateTargetGroupNameException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorDuplicateTrustStoreNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateTrustStoreNameException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentDuplicateTrustStoreNameException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorHealthUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HealthUnavailableException{} + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) rootDecoder := xml.NewDecoder(body) @@ -6397,6 +6777,50 @@ func awsAwsquery_deserializeErrorIncompatibleProtocolsException(response *smithy return output } +func awsAwsquery_deserializeErrorInsufficientCapacityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InsufficientCapacityException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentInsufficientCapacityException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorInvalidCaCertificatesBundleException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidCaCertificatesBundleException{} var buff [1024]byte @@ -6925,6 +7349,50 @@ func awsAwsquery_deserializeErrorPriorityInUseException(response *smithyhttp.Res return output } +func awsAwsquery_deserializeErrorPriorRequestNotCompleteException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PriorRequestNotCompleteException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentPriorRequestNotCompleteException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceInUseException{} var buff [1024]byte @@ -9339,13 +9807,13 @@ func awsAwsquery_deserializeDocumentCaCertificatesBundleNotFoundException(v **ty return nil } -func awsAwsquery_deserializeDocumentCertificate(v **types.Certificate, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentCapacityDecreaseRequestsLimitExceededException(v **types.CapacityDecreaseRequestsLimitExceededException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.Certificate + var sv *types.CapacityDecreaseRequestsLimitExceededException if *v == nil { - sv = &types.Certificate{} + sv = &types.CapacityDecreaseRequestsLimitExceededException{} } else { sv = *v } @@ -9361,7 +9829,7 @@ func awsAwsquery_deserializeDocumentCertificate(v **types.Certificate, decoder s originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("CertificateArn", t.Name.Local): + case strings.EqualFold("Message", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -9371,23 +9839,7 @@ func awsAwsquery_deserializeDocumentCertificate(v **types.Certificate, decoder s } { xtv := string(val) - sv.CertificateArn = ptr.String(xtv) - } - - case strings.EqualFold("IsDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Default to be of type *bool, got %T instead", val) - } - sv.IsDefault = ptr.Bool(xtv) + sv.Message = ptr.String(xtv) } default: @@ -9404,18 +9856,17 @@ func awsAwsquery_deserializeDocumentCertificate(v **types.Certificate, decoder s return nil } -func awsAwsquery_deserializeDocumentCertificateList(v *[]types.Certificate, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentCapacityReservationPendingException(v **types.CapacityReservationPendingException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv []types.Certificate + var sv *types.CapacityReservationPendingException if *v == nil { - sv = make([]types.Certificate, 0) + sv = &types.CapacityReservationPendingException{} } else { sv = *v } - originalDecoder := decoder for { t, done, err := decoder.Token() if err != nil { @@ -9424,16 +9875,242 @@ func awsAwsquery_deserializeDocumentCertificateList(v *[]types.Certificate, deco if done { break } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("member", t.Name.Local): - var col types.Certificate - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsAwsquery_deserializeDocumentCertificate(&destAddr, nodeDecoder); err != nil { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { return err } - col = *destAddr - sv = append(sv, col) + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCapacityReservationStatus(v **types.CapacityReservationStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CapacityReservationStatus + if *v == nil { + sv = &types.CapacityReservationStatus{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Code", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Code = types.CapacityReservationStateEnum(xtv) + } + + case strings.EqualFold("Reason", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Reason = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCapacityUnitsLimitExceededException(v **types.CapacityUnitsLimitExceededException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CapacityUnitsLimitExceededException + if *v == nil { + sv = &types.CapacityUnitsLimitExceededException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCertificate(v **types.Certificate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Certificate + if *v == nil { + sv = &types.Certificate{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CertificateArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CertificateArn = ptr.String(xtv) + } + + case strings.EqualFold("IsDefault", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Default to be of type *bool, got %T instead", val) + } + sv.IsDefault = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCertificateList(v *[]types.Certificate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Certificate + if *v == nil { + sv = make([]types.Certificate, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.Certificate + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentCertificate(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) default: err = decoder.Decoder.Skip() @@ -10473,6 +11150,55 @@ func awsAwsquery_deserializeDocumentIncompatibleProtocolsException(v **types.Inc return nil } +func awsAwsquery_deserializeDocumentInsufficientCapacityException(v **types.InsufficientCapacityException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InsufficientCapacityException + if *v == nil { + sv = &types.InsufficientCapacityException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentInvalidCaCertificatesBundleException(v **types.InvalidCaCertificatesBundleException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12272,6 +12998,59 @@ func awsAwsquery_deserializeDocumentMatcher(v **types.Matcher, decoder smithyxml return nil } +func awsAwsquery_deserializeDocumentMinimumLoadBalancerCapacity(v **types.MinimumLoadBalancerCapacity, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MinimumLoadBalancerCapacity + if *v == nil { + sv = &types.MinimumLoadBalancerCapacity{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CapacityUnits", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.CapacityUnits = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentMutualAuthenticationAttributes(v **types.MutualAuthenticationAttributes, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12503,6 +13282,55 @@ func awsAwsquery_deserializeDocumentPriorityInUseException(v **types.PriorityInU return nil } +func awsAwsquery_deserializeDocumentPriorRequestNotCompleteException(v **types.PriorRequestNotCompleteException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PriorRequestNotCompleteException + if *v == nil { + sv = &types.PriorRequestNotCompleteException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentQueryStringConditionConfig(v **types.QueryStringConditionConfig, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16309,27 +17137,240 @@ func awsAwsquery_deserializeDocumentTrustStoreRevocations(v *[]types.TrustStoreR sv = *v } - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("member", t.Name.Local): - var col types.TrustStoreRevocation + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.TrustStoreRevocation + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentTrustStoreRevocation(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentTrustStoreRevocationsUnwrapped(v *[]types.TrustStoreRevocation, decoder smithyxml.NodeDecoder) error { + var sv []types.TrustStoreRevocation + if *v == nil { + sv = make([]types.TrustStoreRevocation, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.TrustStoreRevocation + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentTrustStoreRevocation(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentTrustStores(v *[]types.TrustStore, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.TrustStore + if *v == nil { + sv = make([]types.TrustStore, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.TrustStore + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentTrustStore(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentTrustStoresUnwrapped(v *[]types.TrustStore, decoder smithyxml.NodeDecoder) error { + var sv []types.TrustStore + if *v == nil { + sv = make([]types.TrustStore, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.TrustStore + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentTrustStore(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentUnsupportedProtocolException(v **types.UnsupportedProtocolException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.UnsupportedProtocolException + if *v == nil { + sv = &types.UnsupportedProtocolException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentZonalCapacityReservationState(v **types.ZonalCapacityReservationState, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ZonalCapacityReservationState + if *v == nil { + sv = &types.ZonalCapacityReservationState{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AvailabilityZone", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AvailabilityZone = ptr.String(xtv) + } + + case strings.EqualFold("EffectiveCapacityUnits", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + f64, err := strconv.ParseFloat(xtv, 64) + if err != nil { + return err + } + sv.EffectiveCapacityUnits = ptr.Float64(f64) + } + + case strings.EqualFold("State", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsAwsquery_deserializeDocumentTrustStoreRevocation(&destAddr, nodeDecoder); err != nil { + if err := awsAwsquery_deserializeDocumentCapacityReservationStatus(&sv.State, nodeDecoder); err != nil { return err } - col = *destAddr - sv = append(sv, col) default: + // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() if err != nil { return err @@ -16342,37 +17383,13 @@ func awsAwsquery_deserializeDocumentTrustStoreRevocations(v *[]types.TrustStoreR return nil } -func awsAwsquery_deserializeDocumentTrustStoreRevocationsUnwrapped(v *[]types.TrustStoreRevocation, decoder smithyxml.NodeDecoder) error { - var sv []types.TrustStoreRevocation - if *v == nil { - sv = make([]types.TrustStoreRevocation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrustStoreRevocation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsAwsquery_deserializeDocumentTrustStoreRevocation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsAwsquery_deserializeDocumentTrustStores(v *[]types.TrustStore, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentZonalCapacityReservationStates(v *[]types.ZonalCapacityReservationState, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv []types.TrustStore + var sv []types.ZonalCapacityReservationState if *v == nil { - sv = make([]types.TrustStore, 0) + sv = make([]types.ZonalCapacityReservationState, 0) } else { sv = *v } @@ -16388,10 +17405,10 @@ func awsAwsquery_deserializeDocumentTrustStores(v *[]types.TrustStore, decoder s } switch { case strings.EqualFold("member", t.Name.Local): - var col types.TrustStore + var col types.ZonalCapacityReservationState nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) destAddr := &col - if err := awsAwsquery_deserializeDocumentTrustStore(&destAddr, nodeDecoder); err != nil { + if err := awsAwsquery_deserializeDocumentZonalCapacityReservationState(&destAddr, nodeDecoder); err != nil { return err } col = *destAddr @@ -16410,22 +17427,22 @@ func awsAwsquery_deserializeDocumentTrustStores(v *[]types.TrustStore, decoder s return nil } -func awsAwsquery_deserializeDocumentTrustStoresUnwrapped(v *[]types.TrustStore, decoder smithyxml.NodeDecoder) error { - var sv []types.TrustStore +func awsAwsquery_deserializeDocumentZonalCapacityReservationStatesUnwrapped(v *[]types.ZonalCapacityReservationState, decoder smithyxml.NodeDecoder) error { + var sv []types.ZonalCapacityReservationState if *v == nil { - sv = make([]types.TrustStore, 0) + sv = make([]types.ZonalCapacityReservationState, 0) } else { sv = *v } switch { default: - var mv types.TrustStore + var mv types.ZonalCapacityReservationState t := decoder.StartEl _ = t nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) destAddr := &mv - if err := awsAwsquery_deserializeDocumentTrustStore(&destAddr, nodeDecoder); err != nil { + if err := awsAwsquery_deserializeDocumentZonalCapacityReservationState(&destAddr, nodeDecoder); err != nil { return err } mv = *destAddr @@ -16434,55 +17451,6 @@ func awsAwsquery_deserializeDocumentTrustStoresUnwrapped(v *[]types.TrustStore, *v = sv return nil } -func awsAwsquery_deserializeDocumentUnsupportedProtocolException(v **types.UnsupportedProtocolException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UnsupportedProtocolException - if *v == nil { - sv = &types.UnsupportedProtocolException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - func awsAwsquery_deserializeOpDocumentAddListenerCertificatesOutput(v **AddListenerCertificatesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17120,6 +18088,88 @@ func awsAwsquery_deserializeOpDocumentDescribeAccountLimitsOutput(v **DescribeAc return nil } +func awsAwsquery_deserializeOpDocumentDescribeCapacityReservationOutput(v **DescribeCapacityReservationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeCapacityReservationOutput + if *v == nil { + sv = &DescribeCapacityReservationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CapacityReservationState", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentZonalCapacityReservationStates(&sv.CapacityReservationState, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DecreaseRequestsRemaining", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.DecreaseRequestsRemaining = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("MinimumLoadBalancerCapacity", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMinimumLoadBalancerCapacity(&sv.MinimumLoadBalancerCapacity, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentDescribeListenerAttributesOutput(v **DescribeListenerAttributesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17972,6 +19022,88 @@ func awsAwsquery_deserializeOpDocumentGetTrustStoreRevocationContentOutput(v **G return nil } +func awsAwsquery_deserializeOpDocumentModifyCapacityReservationOutput(v **ModifyCapacityReservationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ModifyCapacityReservationOutput + if *v == nil { + sv = &ModifyCapacityReservationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CapacityReservationState", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentZonalCapacityReservationStates(&sv.CapacityReservationState, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DecreaseRequestsRemaining", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.DecreaseRequestsRemaining = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("MinimumLoadBalancerCapacity", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMinimumLoadBalancerCapacity(&sv.MinimumLoadBalancerCapacity, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentModifyListenerAttributesOutput(v **ModifyListenerAttributesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/elasticloadbalancingv2/generated.json b/service/elasticloadbalancingv2/generated.json index 703c1bacf79..6f740b74b18 100644 --- a/service/elasticloadbalancingv2/generated.json +++ b/service/elasticloadbalancingv2/generated.json @@ -25,6 +25,7 @@ "api_op_DeleteTrustStore.go", "api_op_DeregisterTargets.go", "api_op_DescribeAccountLimits.go", + "api_op_DescribeCapacityReservation.go", "api_op_DescribeListenerAttributes.go", "api_op_DescribeListenerCertificates.go", "api_op_DescribeListeners.go", @@ -42,6 +43,7 @@ "api_op_GetResourcePolicy.go", "api_op_GetTrustStoreCaCertificatesBundle.go", "api_op_GetTrustStoreRevocationContent.go", + "api_op_ModifyCapacityReservation.go", "api_op_ModifyListener.go", "api_op_ModifyListenerAttributes.go", "api_op_ModifyLoadBalancerAttributes.go", diff --git a/service/elasticloadbalancingv2/serializers.go b/service/elasticloadbalancingv2/serializers.go index b45d7d7b255..69dc4fbf0df 100644 --- a/service/elasticloadbalancingv2/serializers.go +++ b/service/elasticloadbalancingv2/serializers.go @@ -1137,6 +1137,76 @@ func (m *awsAwsquery_serializeOpDescribeAccountLimits) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpDescribeCapacityReservation struct { +} + +func (*awsAwsquery_serializeOpDescribeCapacityReservation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDescribeCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeCapacityReservationInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DescribeCapacityReservation") + body.Key("Version").String("2015-12-01") + + if err := awsAwsquery_serializeOpDocumentDescribeCapacityReservationInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpDescribeListenerAttributes struct { } @@ -2327,6 +2397,76 @@ func (m *awsAwsquery_serializeOpGetTrustStoreRevocationContent) HandleSerialize( return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpModifyCapacityReservation struct { +} + +func (*awsAwsquery_serializeOpModifyCapacityReservation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpModifyCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ModifyCapacityReservationInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ModifyCapacityReservation") + body.Key("Version").String("2015-12-01") + + if err := awsAwsquery_serializeOpDocumentModifyCapacityReservationInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpModifyListener struct { } @@ -3855,6 +3995,18 @@ func awsAwsquery_serializeDocumentMatcher(v *types.Matcher, value query.Value) e return nil } +func awsAwsquery_serializeDocumentMinimumLoadBalancerCapacity(v *types.MinimumLoadBalancerCapacity, value query.Value) error { + object := value.Object() + _ = object + + if v.CapacityUnits != nil { + objectKey := object.Key("CapacityUnits") + objectKey.Integer(*v.CapacityUnits) + } + + return nil +} + func awsAwsquery_serializeDocumentMutualAuthenticationAttributes(v *types.MutualAuthenticationAttributes, value query.Value) error { object := value.Object() _ = object @@ -4890,6 +5042,18 @@ func awsAwsquery_serializeOpDocumentDescribeAccountLimitsInput(v *DescribeAccoun return nil } +func awsAwsquery_serializeOpDocumentDescribeCapacityReservationInput(v *DescribeCapacityReservationInput, value query.Value) error { + object := value.Object() + _ = object + + if v.LoadBalancerArn != nil { + objectKey := object.Key("LoadBalancerArn") + objectKey.String(*v.LoadBalancerArn) + } + + return nil +} + func awsAwsquery_serializeOpDocumentDescribeListenerAttributesInput(v *DescribeListenerAttributesInput, value query.Value) error { object := value.Object() _ = object @@ -5265,6 +5429,30 @@ func awsAwsquery_serializeOpDocumentGetTrustStoreRevocationContentInput(v *GetTr return nil } +func awsAwsquery_serializeOpDocumentModifyCapacityReservationInput(v *ModifyCapacityReservationInput, value query.Value) error { + object := value.Object() + _ = object + + if v.LoadBalancerArn != nil { + objectKey := object.Key("LoadBalancerArn") + objectKey.String(*v.LoadBalancerArn) + } + + if v.MinimumLoadBalancerCapacity != nil { + objectKey := object.Key("MinimumLoadBalancerCapacity") + if err := awsAwsquery_serializeDocumentMinimumLoadBalancerCapacity(v.MinimumLoadBalancerCapacity, objectKey); err != nil { + return err + } + } + + if v.ResetCapacityReservation != nil { + objectKey := object.Key("ResetCapacityReservation") + objectKey.Boolean(*v.ResetCapacityReservation) + } + + return nil +} + func awsAwsquery_serializeOpDocumentModifyListenerAttributesInput(v *ModifyListenerAttributesInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/elasticloadbalancingv2/snapshot/api_op_DescribeCapacityReservation.go.snap b/service/elasticloadbalancingv2/snapshot/api_op_DescribeCapacityReservation.go.snap new file mode 100644 index 00000000000..d4e05f44e59 --- /dev/null +++ b/service/elasticloadbalancingv2/snapshot/api_op_DescribeCapacityReservation.go.snap @@ -0,0 +1,41 @@ +DescribeCapacityReservation + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/elasticloadbalancingv2/snapshot/api_op_ModifyCapacityReservation.go.snap b/service/elasticloadbalancingv2/snapshot/api_op_ModifyCapacityReservation.go.snap new file mode 100644 index 00000000000..880bce06606 --- /dev/null +++ b/service/elasticloadbalancingv2/snapshot/api_op_ModifyCapacityReservation.go.snap @@ -0,0 +1,41 @@ +ModifyCapacityReservation + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/elasticloadbalancingv2/snapshot_test.go b/service/elasticloadbalancingv2/snapshot_test.go index f45b7f32fd5..2c1bc81b6a1 100644 --- a/service/elasticloadbalancingv2/snapshot_test.go +++ b/service/elasticloadbalancingv2/snapshot_test.go @@ -254,6 +254,18 @@ func TestCheckSnapshot_DescribeAccountLimits(t *testing.T) { } } +func TestCheckSnapshot_DescribeCapacityReservation(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeCapacityReservation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeCapacityReservation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeListenerAttributes(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeListenerAttributes(context.Background(), nil, func(o *Options) { @@ -458,6 +470,18 @@ func TestCheckSnapshot_GetTrustStoreRevocationContent(t *testing.T) { } } +func TestCheckSnapshot_ModifyCapacityReservation(t *testing.T) { + svc := New(Options{}) + _, err := svc.ModifyCapacityReservation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ModifyCapacityReservation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ModifyListener(t *testing.T) { svc := New(Options{}) _, err := svc.ModifyListener(context.Background(), nil, func(o *Options) { @@ -829,6 +853,18 @@ func TestUpdateSnapshot_DescribeAccountLimits(t *testing.T) { } } +func TestUpdateSnapshot_DescribeCapacityReservation(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeCapacityReservation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeCapacityReservation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeListenerAttributes(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeListenerAttributes(context.Background(), nil, func(o *Options) { @@ -1033,6 +1069,18 @@ func TestUpdateSnapshot_GetTrustStoreRevocationContent(t *testing.T) { } } +func TestUpdateSnapshot_ModifyCapacityReservation(t *testing.T) { + svc := New(Options{}) + _, err := svc.ModifyCapacityReservation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ModifyCapacityReservation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ModifyListener(t *testing.T) { svc := New(Options{}) _, err := svc.ModifyListener(context.Background(), nil, func(o *Options) { diff --git a/service/elasticloadbalancingv2/types/enums.go b/service/elasticloadbalancingv2/types/enums.go index 8979bffacd7..a95adb8a09c 100644 --- a/service/elasticloadbalancingv2/types/enums.go +++ b/service/elasticloadbalancingv2/types/enums.go @@ -90,6 +90,30 @@ func (AuthenticateOidcActionConditionalBehaviorEnum) Values() []AuthenticateOidc } } +type CapacityReservationStateEnum string + +// Enum values for CapacityReservationStateEnum +const ( + CapacityReservationStateEnumProvisioned CapacityReservationStateEnum = "provisioned" + CapacityReservationStateEnumPending CapacityReservationStateEnum = "pending" + CapacityReservationStateEnumRebalancing CapacityReservationStateEnum = "rebalancing" + CapacityReservationStateEnumFailed CapacityReservationStateEnum = "failed" +) + +// Values returns all known values for CapacityReservationStateEnum. 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 (CapacityReservationStateEnum) Values() []CapacityReservationStateEnum { + return []CapacityReservationStateEnum{ + "provisioned", + "pending", + "rebalancing", + "failed", + } +} + type DescribeTargetHealthInputIncludeEnum string // Enum values for DescribeTargetHealthInputIncludeEnum diff --git a/service/elasticloadbalancingv2/types/errors.go b/service/elasticloadbalancingv2/types/errors.go index d41bdc6f7b8..20dd36717f5 100644 --- a/service/elasticloadbalancingv2/types/errors.go +++ b/service/elasticloadbalancingv2/types/errors.go @@ -115,6 +115,90 @@ func (e *CaCertificatesBundleNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// You've exceeded the daily capacity decrease limit for this reservation. +type CapacityDecreaseRequestsLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CapacityDecreaseRequestsLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CapacityDecreaseRequestsLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CapacityDecreaseRequestsLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CapacityDecreaseRequestLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *CapacityDecreaseRequestsLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// There is a pending capacity reservation. +type CapacityReservationPendingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CapacityReservationPendingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CapacityReservationPendingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CapacityReservationPendingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CapacityReservationPending" + } + return *e.ErrorCodeOverride +} +func (e *CapacityReservationPendingException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You've exceeded the capacity units limit. +type CapacityUnitsLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CapacityUnitsLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CapacityUnitsLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CapacityUnitsLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CapacityUnitsLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *CapacityUnitsLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The specified certificate does not exist. type CertificateNotFoundException struct { Message *string @@ -354,6 +438,32 @@ func (e *IncompatibleProtocolsException) ErrorCode() string { } func (e *IncompatibleProtocolsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// There is insufficient capacity to reserve. +type InsufficientCapacityException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InsufficientCapacityException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InsufficientCapacityException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InsufficientCapacityException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InsufficientCapacity" + } + return *e.ErrorCodeOverride +} +func (e *InsufficientCapacityException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + // The specified ca certificate bundle is in an invalid format, or corrupt. type InvalidCaCertificatesBundleException struct { Message *string @@ -674,6 +784,32 @@ func (e *PriorityInUseException) ErrorCode() string { } func (e *PriorityInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This operation is not allowed while a prior request has not been completed. +type PriorRequestNotCompleteException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PriorRequestNotCompleteException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PriorRequestNotCompleteException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PriorRequestNotCompleteException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PriorRequestNotComplete" + } + return *e.ErrorCodeOverride +} +func (e *PriorRequestNotCompleteException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // A specified resource is in use. type ResourceInUseException struct { Message *string diff --git a/service/elasticloadbalancingv2/types/types.go b/service/elasticloadbalancingv2/types/types.go index 529c48d2dae..00b547620fe 100644 --- a/service/elasticloadbalancingv2/types/types.go +++ b/service/elasticloadbalancingv2/types/types.go @@ -233,6 +233,18 @@ type AvailabilityZone struct { noSmithyDocumentSerde } +// The status of a capacity reservation. +type CapacityReservationStatus struct { + + // The status code. + Code CapacityReservationStateEnum + + // The reason code for the status. + Reason *string + + noSmithyDocumentSerde +} + // Information about an SSL server certificate. type Certificate struct { @@ -747,6 +759,15 @@ type Matcher struct { noSmithyDocumentSerde } +// The minimum capacity for a load balancer. +type MinimumLoadBalancerCapacity struct { + + // The number of capacity units. + CapacityUnits *int32 + + noSmithyDocumentSerde +} + // Information about the mutual authentication attributes of a listener. type MutualAuthenticationAttributes struct { @@ -1536,4 +1557,19 @@ type TrustStoreRevocation struct { noSmithyDocumentSerde } +// The capacity reservation status for each availability zone. +type ZonalCapacityReservationState struct { + + // Information about the availability zone. + AvailabilityZone *string + + // The number of effective capacity units. + EffectiveCapacityUnits *float64 + + // The state of the capacity reservation. + State *CapacityReservationStatus + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/elasticloadbalancingv2/validators.go b/service/elasticloadbalancingv2/validators.go index 79a5f0ab0cd..8cccded86e8 100644 --- a/service/elasticloadbalancingv2/validators.go +++ b/service/elasticloadbalancingv2/validators.go @@ -310,6 +310,26 @@ func (m *validateOpDeregisterTargets) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpDescribeCapacityReservation struct { +} + +func (*validateOpDescribeCapacityReservation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeCapacityReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeCapacityReservationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeCapacityReservationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeListenerAttributes struct { } @@ -530,6 +550,26 @@ func (m *validateOpGetTrustStoreRevocationContent) HandleInitialize(ctx context. return next.HandleInitialize(ctx, in) } +type validateOpModifyCapacityReservation struct { +} + +func (*validateOpModifyCapacityReservation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpModifyCapacityReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ModifyCapacityReservationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpModifyCapacityReservationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpModifyListenerAttributes struct { } @@ -890,6 +930,10 @@ func addOpDeregisterTargetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterTargets{}, middleware.After) } +func addOpDescribeCapacityReservationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeCapacityReservation{}, middleware.After) +} + func addOpDescribeListenerAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeListenerAttributes{}, middleware.After) } @@ -934,6 +978,10 @@ func addOpGetTrustStoreRevocationContentValidationMiddleware(stack *middleware.S return stack.Initialize.Add(&validateOpGetTrustStoreRevocationContent{}, middleware.After) } +func addOpModifyCapacityReservationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpModifyCapacityReservation{}, middleware.After) +} + func addOpModifyListenerAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyListenerAttributes{}, middleware.After) } @@ -1484,6 +1532,21 @@ func validateOpDeregisterTargetsInput(v *DeregisterTargetsInput) error { } } +func validateOpDescribeCapacityReservationInput(v *DescribeCapacityReservationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeCapacityReservationInput"} + if v.LoadBalancerArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeListenerAttributesInput(v *DescribeListenerAttributesInput) error { if v == nil { return nil @@ -1657,6 +1720,21 @@ func validateOpGetTrustStoreRevocationContentInput(v *GetTrustStoreRevocationCon } } +func validateOpModifyCapacityReservationInput(v *ModifyCapacityReservationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModifyCapacityReservationInput"} + if v.LoadBalancerArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpModifyListenerAttributesInput(v *ModifyListenerAttributesInput) error { if v == nil { return nil diff --git a/service/lambda/types/enums.go b/service/lambda/types/enums.go index 0541d3be93e..a0df67f42b2 100644 --- a/service/lambda/types/enums.go +++ b/service/lambda/types/enums.go @@ -456,6 +456,7 @@ const ( RuntimePython312 Runtime = "python3.12" RuntimeJava21 Runtime = "java21" RuntimePython313 Runtime = "python3.13" + RuntimeNodejs22x Runtime = "nodejs22.x" ) // Values returns all known values for Runtime. Note that this can be expanded in @@ -503,6 +504,7 @@ func (Runtime) Values() []Runtime { "python3.12", "java21", "python3.13", + "nodejs22.x", } } diff --git a/service/mediaconvert/api_op_CreateQueue.go b/service/mediaconvert/api_op_CreateQueue.go index 4d142fa626a..d082d66a99e 100644 --- a/service/mediaconvert/api_op_CreateQueue.go +++ b/service/mediaconvert/api_op_CreateQueue.go @@ -36,6 +36,13 @@ type CreateQueueInput struct { // This member is required. Name *string + // Specify the maximum number of jobs your queue can process concurrently. For + // on-demand queues, the value you enter is constrained by your service quotas for + // Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per + // account. For reserved queues, specify the number of jobs you can process + // concurrently in your reservation plan instead. + ConcurrentJobs *int32 + // Optional. A description of the queue that you are creating. Description *string diff --git a/service/mediaconvert/api_op_ListQueues.go b/service/mediaconvert/api_op_ListQueues.go index 0b4f88a1841..2e1af269451 100644 --- a/service/mediaconvert/api_op_ListQueues.go +++ b/service/mediaconvert/api_op_ListQueues.go @@ -58,6 +58,15 @@ type ListQueuesOutput struct { // List of queues. Queues []types.Queue + // The maximum number of jobs that MediaConvert can process at one time, across + // all of your on-demand queues in the current AWS Region. + TotalConcurrentJobs *int32 + + // The remaining number of concurrent jobs that are not associated with a queue + // and are available to allocate to a queue. You can allocate these jobs when you + // create or update a queue. + UnallocatedConcurrentJobs *int32 + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/mediaconvert/api_op_UpdateQueue.go b/service/mediaconvert/api_op_UpdateQueue.go index 45cf5860c1b..e53cc83c005 100644 --- a/service/mediaconvert/api_op_UpdateQueue.go +++ b/service/mediaconvert/api_op_UpdateQueue.go @@ -34,6 +34,13 @@ type UpdateQueueInput struct { // This member is required. Name *string + // Specify the maximum number of jobs your queue can process concurrently. For + // on-demand queues, the value you enter is constrained by your service quotas for + // Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per + // account. For reserved queues, update your reservation plan instead in order to + // increase your yearly commitment. + ConcurrentJobs *int32 + // The new description for the queue, if you are changing it. Description *string diff --git a/service/mediaconvert/deserializers.go b/service/mediaconvert/deserializers.go index 0c85f25d9ad..f40521b47c9 100644 --- a/service/mediaconvert/deserializers.go +++ b/service/mediaconvert/deserializers.go @@ -3125,6 +3125,32 @@ func awsRestjson1_deserializeOpDocumentListQueuesOutput(v **ListQueuesOutput, va return err } + case "totalConcurrentJobs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalConcurrentJobs = ptr.Int32(int32(i64)) + } + + case "unallocatedConcurrentJobs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UnallocatedConcurrentJobs = ptr.Int32(int32(i64)) + } + default: _, _ = key, value @@ -6196,6 +6222,40 @@ func awsRestjson1_deserializeDocument__listOfQueueTransition(v *[]types.QueueTra return nil } +func awsRestjson1_deserializeDocument__listOfServiceOverride(v *[]types.ServiceOverride, 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.ServiceOverride + if *v == nil { + cv = []types.ServiceOverride{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ServiceOverride + destAddr := &col + if err := awsRestjson1_deserializeDocumentServiceOverride(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfTeletextPageType(v *[]types.TeletextPageType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -20930,6 +20990,19 @@ func awsRestjson1_deserializeDocumentQueue(v **types.Queue, value interface{}) e sv.Arn = ptr.String(jtv) } + case "concurrentJobs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ConcurrentJobs = ptr.Int32(int32(i64)) + } + case "createdAt": if value != nil { switch jtv := value.(type) { @@ -21007,6 +21080,11 @@ func awsRestjson1_deserializeDocumentQueue(v **types.Queue, value interface{}) e return err } + case "serviceOverrides": + if err := awsRestjson1_deserializeDocument__listOfServiceOverride(&sv.ServiceOverrides, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) @@ -21619,6 +21697,73 @@ func awsRestjson1_deserializeDocumentSccDestinationSettings(v **types.SccDestina return nil } +func awsRestjson1_deserializeDocumentServiceOverride(v **types.ServiceOverride, 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.ServiceOverride + if *v == nil { + sv = &types.ServiceOverride{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "overrideValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OverrideValue = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSpekeKeyProvider(v **types.SpekeKeyProvider, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/mediaconvert/serializers.go b/service/mediaconvert/serializers.go index ea6610393e2..3098fff2b7a 100644 --- a/service/mediaconvert/serializers.go +++ b/service/mediaconvert/serializers.go @@ -636,6 +636,11 @@ func awsRestjson1_serializeOpDocumentCreateQueueInput(v *CreateQueueInput, value object := value.Object() defer object.Close() + if v.ConcurrentJobs != nil { + ok := object.Key("concurrentJobs") + ok.Integer(*v.ConcurrentJobs) + } + if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) @@ -2593,6 +2598,11 @@ func awsRestjson1_serializeOpDocumentUpdateQueueInput(v *UpdateQueueInput, value object := value.Object() defer object.Close() + if v.ConcurrentJobs != nil { + ok := object.Key("concurrentJobs") + ok.Integer(*v.ConcurrentJobs) + } + if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) diff --git a/service/mediaconvert/types/types.go b/service/mediaconvert/types/types.go index 83b63a36346..e0f17bb6bb4 100644 --- a/service/mediaconvert/types/types.go +++ b/service/mediaconvert/types/types.go @@ -7221,6 +7221,9 @@ type Queue struct { // An identifier for this resource that is unique within all of AWS. Arn *string + // The maximum number of jobs your queue can process concurrently. + ConcurrentJobs *int32 + // The timestamp in epoch seconds for when you created the queue. CreatedAt *time.Time @@ -7243,6 +7246,11 @@ type Queue struct { // queues and not applicable to on-demand queues. ReservationPlan *ReservationPlan + // A list of any service overrides applied by MediaConvert to the settings that + // you have configured. If you see any overrides, we recommend that you contact AWS + // Support. + ServiceOverrides []ServiceOverride + // Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin // processing jobs in that queue. Jobs that are running when you pause the queue // continue to run until they finish or result in an error. @@ -7511,6 +7519,26 @@ type SccDestinationSettings struct { noSmithyDocumentSerde } +// A service override applied by MediaConvert to the settings that you have +// configured. If you see any overrides, we recommend that you contact AWS Support. +type ServiceOverride struct { + + // Details about the service override that MediaConvert has applied. + Message *string + + // The name of the setting that MediaConvert has applied an override to. + Name *string + + // The current value of the service override that MediaConvert has applied. + OverrideValue *string + + // The value of the setting that you configured, prior to any overrides that + // MediaConvert has applied. + Value *string + + noSmithyDocumentSerde +} + // If your output group type is HLS, DASH, or Microsoft Smooth, use these settings // when doing DRM encryption with a SPEKE-compliant key provider. If your output // group type is CMAF, use the SpekeKeyProviderCmaf settings instead. diff --git a/service/mediapackagev2/api_op_CreateChannel.go b/service/mediapackagev2/api_op_CreateChannel.go index 1edbc524220..94bc3d4670c 100644 --- a/service/mediapackagev2/api_op_CreateChannel.go +++ b/service/mediapackagev2/api_op_CreateChannel.go @@ -57,6 +57,11 @@ type CreateChannelInput struct { // Enter any descriptive text that helps you to identify the channel. Description *string + // The configuration for input switching based on the media quality confidence + // score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid + // only when InputType is CMAF . + InputSwitchConfiguration *types.InputSwitchConfiguration + // The input type will be an immutable field which will be used to define whether // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default // to HLS to preserve current behavior. @@ -70,6 +75,11 @@ type CreateChannelInput struct { // with optional DASH manifests). InputType types.InputType + // The settings for what common media server data (CMSD) headers AWS Elemental + // MediaPackage includes in responses to the CDN. This setting is valid only when + // InputType is CMAF . + OutputHeaderConfiguration *types.OutputHeaderConfiguration + // A comma-separated list of tag key:value pairs that you define. For example: // // "Key1": "Value1", @@ -120,6 +130,11 @@ type CreateChannelOutput struct { // The list of ingest endpoints. IngestEndpoints []types.IngestEndpoint + // The configuration for input switching based on the media quality confidence + // score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid + // only when InputType is CMAF . + InputSwitchConfiguration *types.InputSwitchConfiguration + // The input type will be an immutable field which will be used to define whether // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default // to HLS to preserve current behavior. @@ -133,6 +148,11 @@ type CreateChannelOutput struct { // with optional DASH manifests). InputType types.InputType + // The settings for what common media server data (CMSD) headers AWS Elemental + // MediaPackage includes in responses to the CDN. This setting is valid only when + // InputType is CMAF . + OutputHeaderConfiguration *types.OutputHeaderConfiguration + // The comma-separated list of tag key:value pairs assigned to the channel. Tags map[string]string diff --git a/service/mediapackagev2/api_op_GetChannel.go b/service/mediapackagev2/api_op_GetChannel.go index cfc75cb07a2..8d9f45e4840 100644 --- a/service/mediapackagev2/api_op_GetChannel.go +++ b/service/mediapackagev2/api_op_GetChannel.go @@ -87,6 +87,11 @@ type GetChannelOutput struct { // The list of ingest endpoints. IngestEndpoints []types.IngestEndpoint + // The configuration for input switching based on the media quality confidence + // score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid + // only when InputType is CMAF . + InputSwitchConfiguration *types.InputSwitchConfiguration + // The input type will be an immutable field which will be used to define whether // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default // to HLS to preserve current behavior. @@ -100,6 +105,11 @@ type GetChannelOutput struct { // with optional DASH manifests). InputType types.InputType + // The settings for what common media server data (CMSD) headers AWS Elemental + // MediaPackage includes in responses to the CDN. This setting is valid only when + // InputType is CMAF . + OutputHeaderConfiguration *types.OutputHeaderConfiguration + // The comma-separated list of tag key:value pairs assigned to the channel. Tags map[string]string diff --git a/service/mediapackagev2/api_op_UpdateChannel.go b/service/mediapackagev2/api_op_UpdateChannel.go index 05842f9a310..7a33e437671 100644 --- a/service/mediapackagev2/api_op_UpdateChannel.go +++ b/service/mediapackagev2/api_op_UpdateChannel.go @@ -58,6 +58,16 @@ type UpdateChannelInput struct { // rejected. ETag *string + // The configuration for input switching based on the media quality confidence + // score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid + // only when InputType is CMAF . + InputSwitchConfiguration *types.InputSwitchConfiguration + + // The settings for what common media server data (CMSD) headers AWS Elemental + // MediaPackage includes in responses to the CDN. This setting is valid only when + // InputType is CMAF . + OutputHeaderConfiguration *types.OutputHeaderConfiguration + noSmithyDocumentSerde } @@ -101,6 +111,11 @@ type UpdateChannelOutput struct { // The list of ingest endpoints. IngestEndpoints []types.IngestEndpoint + // The configuration for input switching based on the media quality confidence + // score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid + // only when InputType is CMAF . + InputSwitchConfiguration *types.InputSwitchConfiguration + // The input type will be an immutable field which will be used to define whether // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default // to HLS to preserve current behavior. @@ -114,6 +129,11 @@ type UpdateChannelOutput struct { // with optional DASH manifests). InputType types.InputType + // The settings for what common media server data (CMSD) headers AWS Elemental + // MediaPackage includes in responses to the CDN. This setting is valid only when + // InputType is CMAF . + OutputHeaderConfiguration *types.OutputHeaderConfiguration + // The comma-separated list of tag key:value pairs assigned to the channel. Tags map[string]string diff --git a/service/mediapackagev2/deserializers.go b/service/mediapackagev2/deserializers.go index 280a8794a9c..a28d12e7c8e 100644 --- a/service/mediapackagev2/deserializers.go +++ b/service/mediapackagev2/deserializers.go @@ -356,6 +356,11 @@ func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutp return err } + case "InputSwitchConfiguration": + if err := awsRestjson1_deserializeDocumentInputSwitchConfiguration(&sv.InputSwitchConfiguration, value); err != nil { + return err + } + case "InputType": if value != nil { jtv, ok := value.(string) @@ -381,6 +386,11 @@ func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutp } } + case "OutputHeaderConfiguration": + if err := awsRestjson1_deserializeDocumentOutputHeaderConfiguration(&sv.OutputHeaderConfiguration, value); err != nil { + return err + } + case "Tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err @@ -1956,6 +1966,11 @@ func awsRestjson1_deserializeOpDocumentGetChannelOutput(v **GetChannelOutput, va return err } + case "InputSwitchConfiguration": + if err := awsRestjson1_deserializeDocumentInputSwitchConfiguration(&sv.InputSwitchConfiguration, value); err != nil { + return err + } + case "InputType": if value != nil { jtv, ok := value.(string) @@ -1981,6 +1996,11 @@ func awsRestjson1_deserializeOpDocumentGetChannelOutput(v **GetChannelOutput, va } } + case "OutputHeaderConfiguration": + if err := awsRestjson1_deserializeDocumentOutputHeaderConfiguration(&sv.OutputHeaderConfiguration, value); err != nil { + return err + } + case "Tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err @@ -4660,6 +4680,11 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutp return err } + case "InputSwitchConfiguration": + if err := awsRestjson1_deserializeDocumentInputSwitchConfiguration(&sv.InputSwitchConfiguration, value); err != nil { + return err + } + case "InputType": if value != nil { jtv, ok := value.(string) @@ -4685,6 +4710,11 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutp } } + case "OutputHeaderConfiguration": + if err := awsRestjson1_deserializeDocumentOutputHeaderConfiguration(&sv.OutputHeaderConfiguration, value); err != nil { + return err + } + case "tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err @@ -7390,6 +7420,46 @@ func awsRestjson1_deserializeDocumentIngestEndpointList(v *[]types.IngestEndpoin return nil } +func awsRestjson1_deserializeDocumentInputSwitchConfiguration(v **types.InputSwitchConfiguration, 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.InputSwitchConfiguration + if *v == nil { + sv = &types.InputSwitchConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MQCSInputSwitching": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.MQCSInputSwitching = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7868,6 +7938,46 @@ func awsRestjson1_deserializeDocumentOriginEndpointsList(v *[]types.OriginEndpoi return nil } +func awsRestjson1_deserializeDocumentOutputHeaderConfiguration(v **types.OutputHeaderConfiguration, 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.OutputHeaderConfiguration + if *v == nil { + sv = &types.OutputHeaderConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PublishMQCS": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.PublishMQCS = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/mediapackagev2/serializers.go b/service/mediapackagev2/serializers.go index 86adbf441e3..fb0f7a798b8 100644 --- a/service/mediapackagev2/serializers.go +++ b/service/mediapackagev2/serializers.go @@ -221,11 +221,25 @@ func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, v ok.String(*v.Description) } + if v.InputSwitchConfiguration != nil { + ok := object.Key("InputSwitchConfiguration") + if err := awsRestjson1_serializeDocumentInputSwitchConfiguration(v.InputSwitchConfiguration, ok); err != nil { + return err + } + } + if len(v.InputType) > 0 { ok := object.Key("InputType") ok.String(string(v.InputType)) } + if v.OutputHeaderConfiguration != nil { + ok := object.Key("OutputHeaderConfiguration") + if err := awsRestjson1_serializeDocumentOutputHeaderConfiguration(v.OutputHeaderConfiguration, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { @@ -2461,6 +2475,20 @@ func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, v ok.String(*v.Description) } + if v.InputSwitchConfiguration != nil { + ok := object.Key("InputSwitchConfiguration") + if err := awsRestjson1_serializeDocumentInputSwitchConfiguration(v.InputSwitchConfiguration, ok); err != nil { + return err + } + } + + if v.OutputHeaderConfiguration != nil { + ok := object.Key("OutputHeaderConfiguration") + if err := awsRestjson1_serializeDocumentOutputHeaderConfiguration(v.OutputHeaderConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -3225,6 +3253,30 @@ func awsRestjson1_serializeDocumentHarvesterScheduleConfiguration(v *types.Harve return nil } +func awsRestjson1_serializeDocumentInputSwitchConfiguration(v *types.InputSwitchConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MQCSInputSwitching != nil { + ok := object.Key("MQCSInputSwitching") + ok.Boolean(*v.MQCSInputSwitching) + } + + return nil +} + +func awsRestjson1_serializeDocumentOutputHeaderConfiguration(v *types.OutputHeaderConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PublishMQCS != nil { + ok := object.Key("PublishMQCS") + ok.Boolean(*v.PublishMQCS) + } + + return nil +} + func awsRestjson1_serializeDocumentS3DestinationConfig(v *types.S3DestinationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/mediapackagev2/types/enums.go b/service/mediapackagev2/types/enums.go index a732280f228..4af9db530c4 100644 --- a/service/mediapackagev2/types/enums.go +++ b/service/mediapackagev2/types/enums.go @@ -471,6 +471,8 @@ const ( ValidationExceptionTypeHarvestJobCustomerEndpointReadAccessDenied ValidationExceptionType = "HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED" ValidationExceptionTypeClipStartTimeWithStartOrEnd ValidationExceptionType = "CLIP_START_TIME_WITH_START_OR_END" ValidationExceptionTypeStartTagTimeOffsetInvalid ValidationExceptionType = "START_TAG_TIME_OFFSET_INVALID" + ValidationExceptionTypeOnlyCmafInputTypeAllowMqcsInputSwitching ValidationExceptionType = "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_INPUT_SWITCHING" + ValidationExceptionTypeOnlyCmafInputTypeAllowMqcsOutputConfiguration ValidationExceptionType = "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_OUTPUT_CONFIGURATION" ) // Values returns all known values for ValidationExceptionType. Note that this can @@ -536,5 +538,7 @@ func (ValidationExceptionType) Values() []ValidationExceptionType { "HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED", "CLIP_START_TIME_WITH_START_OR_END", "START_TAG_TIME_OFFSET_INVALID", + "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_INPUT_SWITCHING", + "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_OUTPUT_CONFIGURATION", } } diff --git a/service/mediapackagev2/types/types.go b/service/mediapackagev2/types/types.go index ca242bc6a63..95c1ca3ff23 100644 --- a/service/mediapackagev2/types/types.go +++ b/service/mediapackagev2/types/types.go @@ -184,8 +184,6 @@ type CreateHlsManifestConfiguration struct { // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. - // ID3Timed metadata messages generate every 5 seconds whenever the content is - // ingested. // // Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, // it is passed through to the HLS output. @@ -234,8 +232,6 @@ type CreateLowLatencyHlsManifestConfiguration struct { // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. - // ID3Timed metadata messages generate every 5 seconds whenever the content is - // ingested. // // Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, // it is passed through to the HLS output. @@ -555,8 +551,6 @@ type GetHlsManifestConfiguration struct { // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. - // ID3Timed metadata messages generate every 5 seconds whenever the content is - // ingested. // // Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, // it is passed through to the HLS output. @@ -610,8 +604,6 @@ type GetLowLatencyHlsManifestConfiguration struct { // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. - // ID3Timed metadata messages generate every 5 seconds whenever the content is - // ingested. // // Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, // it is passed through to the HLS output. @@ -777,6 +769,17 @@ type IngestEndpoint struct { noSmithyDocumentSerde } +// The configuration for input switching based on the media quality confidence +// score (MQCS) as provided from AWS Elemental MediaLive. +type InputSwitchConfiguration struct { + + // When true, AWS Elemental MediaPackage performs input switching based on the + // MQCS. Default is true. This setting is valid only when InputType is CMAF . + MQCSInputSwitching *bool + + noSmithyDocumentSerde +} + // List the DASH manifest configuration. type ListDashManifestConfiguration struct { @@ -905,6 +908,17 @@ type OriginEndpointListConfiguration struct { noSmithyDocumentSerde } +// The settings for what common media server data (CMSD) headers AWS Elemental +// MediaPackage includes in responses to the CDN. +type OutputHeaderConfiguration struct { + + // When true, AWS Elemental MediaPackage includes the MQCS in responses to the + // CDN. This setting is valid only when InputType is CMAF . + PublishMQCS *bool + + noSmithyDocumentSerde +} + // Configuration parameters for where in an S3 bucket to place the harvested // content. type S3DestinationConfig struct { diff --git a/service/omics/api_op_CreateRunCache.go b/service/omics/api_op_CreateRunCache.go new file mode 100644 index 00000000000..821b217b192 --- /dev/null +++ b/service/omics/api_op_CreateRunCache.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// You can create a run cache to save the task outputs from completed tasks in a +// run for a private workflow. Subsequent runs use the task outputs from the cache, +// rather than computing the task outputs again. You specify an Amazon S3 location +// where HealthOmics saves the cached data. This data must be immediately +// accessible (not in an archived state). +// +// For more information, see [Creating a run cache] in the AWS HealthOmics User Guide. +// +// [Creating a run cache]: https://docs.aws.amazon.com/omics/latest/dev/workflow-cache-create.html +func (c *Client) CreateRunCache(ctx context.Context, params *CreateRunCacheInput, optFns ...func(*Options)) (*CreateRunCacheOutput, error) { + if params == nil { + params = &CreateRunCacheInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRunCache", params, optFns, c.addOperationCreateRunCacheMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRunCacheOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRunCacheInput struct { + + // Specify the S3 location for storing the cached task outputs. This data must be + // immediately accessible (not in an archived state). + // + // This member is required. + CacheS3Location *string + + // A unique request token, to ensure idempotency. If you don't specify a token, + // HealthOmics automatically generates a universally unique identifier (UUID) for + // the request. + // + // This member is required. + RequestId *string + + // Default cache behavior for runs that use this cache. Supported values are: + // + // CACHE_ON_FAILURE : Caches task outputs from completed tasks for runs that fail. + // This setting is useful if you're debugging a workflow that fails after several + // tasks completed successfully. The subsequent run uses the cache outputs for + // previously-completed tasks if the task definition, inputs, and container in ECR + // are identical to the prior run. + // + // CACHE_ALWAYS : Caches task outputs from completed tasks for all runs. This + // setting is useful in development mode, but do not use it in a production + // setting. + // + // If you don't specify a value, the default behavior is CACHE_ON_FAILURE. When + // you start a run that uses this cache, you can override the default cache + // behavior. + // + // For more information, see [Run cache behavior] in the AWS HealthOmics User Guide. + // + // [Run cache behavior]: https://docs.aws.amazon.com/omics/latest/dev/how-run-cache.html#run-cache-behavior + CacheBehavior types.CacheBehavior + + // The AWS account ID of the expected owner of the S3 bucket for the run cache. If + // not provided, your account ID is set as the owner of the bucket. + CacheBucketOwnerId *string + + // Enter a description of the run cache. + Description *string + + // Enter a user-friendly name for the run cache. + Name *string + + // Specify one or more tags to associate with this run cache. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateRunCacheOutput struct { + + // Unique resource identifier for the run cache. + Arn *string + + // Identifier for the run cache. + Id *string + + // Run cache status. + Status types.RunCacheStatus + + // The tags associated with this run cache. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRunCacheMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateRunCache{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateRunCache{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateRunCache"); 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 = addSpanRetryLoop(stack, options); 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 = addEndpointPrefix_opCreateRunCacheMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateRunCacheMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateRunCacheValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRunCache(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type endpointPrefix_opCreateRunCacheMiddleware struct { +} + +func (*endpointPrefix_opCreateRunCacheMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opCreateRunCacheMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opCreateRunCacheMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opCreateRunCacheMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +type idempotencyToken_initializeOpCreateRunCache struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateRunCache) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateRunCache) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateRunCacheInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateRunCacheInput ") + } + + if input.RequestId == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.RequestId = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateRunCacheMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateRunCache{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateRunCache(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateRunCache", + } +} diff --git a/service/omics/api_op_DeleteRunCache.go b/service/omics/api_op_DeleteRunCache.go new file mode 100644 index 00000000000..6beafdaf2b9 --- /dev/null +++ b/service/omics/api_op_DeleteRunCache.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +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" +) + +// Delete a run cache. This action removes the cache metadata stored in the +// service account, but doesn't delete the data in Amazon S3. You can access the +// cache data in Amazon S3, for inspection or to troubleshoot issues. You can +// remove old cache data using standard S3 Delete operations. +// +// For more information, see [Deleting a run cache] in the AWS HealthOmics User Guide. +// +// [Deleting a run cache]: https://docs.aws.amazon.com/omics/latest/dev/workflow-cache-delete.html +func (c *Client) DeleteRunCache(ctx context.Context, params *DeleteRunCacheInput, optFns ...func(*Options)) (*DeleteRunCacheOutput, error) { + if params == nil { + params = &DeleteRunCacheInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRunCache", params, optFns, c.addOperationDeleteRunCacheMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRunCacheOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRunCacheInput struct { + + // Run cache identifier for the cache you want to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteRunCacheOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRunCacheMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteRunCache{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteRunCache{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRunCache"); 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 = addSpanRetryLoop(stack, options); 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 = addEndpointPrefix_opDeleteRunCacheMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteRunCacheValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRunCache(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type endpointPrefix_opDeleteRunCacheMiddleware struct { +} + +func (*endpointPrefix_opDeleteRunCacheMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDeleteRunCacheMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opDeleteRunCacheMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opDeleteRunCacheMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opDeleteRunCache(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteRunCache", + } +} diff --git a/service/omics/api_op_GetRun.go b/service/omics/api_op_GetRun.go index 2c14a78710a..5e75f9b45f9 100644 --- a/service/omics/api_op_GetRun.go +++ b/service/omics/api_op_GetRun.go @@ -19,6 +19,13 @@ import ( // Gets information about a workflow run. // // If a workflow is shared with you, you cannot export information about the run. +// +// HealthOmics stores a fixed number of runs that are available to the console and +// API. If GetRun doesn't return the requested run, you can find run logs for all +// runs in the CloudWatch logs. For more information about viewing the run logs, +// see [CloudWatch logs]in the AWS HealthOmics User Guide. +// +// [CloudWatch logs]: https://docs.aws.amazon.com/omics/latest/dev/cloudwatch-logs.html func (c *Client) GetRun(ctx context.Context, params *GetRunInput, optFns ...func(*Options)) (*GetRunOutput, error) { if params == nil { params = &GetRunInput{} @@ -55,6 +62,12 @@ type GetRunOutput struct { // The run's ARN. Arn *string + // The run cache behavior for the run. + CacheBehavior types.CacheBehavior + + // The run cache associated with the run. + CacheId *string + // When the run was created. CreationTime *time.Time @@ -64,6 +77,9 @@ type GetRunOutput struct { // The run's digest. Digest *string + // The workflow engine version. + EngineVersion *string + // The reason a run has failed. FailureReason *string diff --git a/service/omics/api_op_GetRunCache.go b/service/omics/api_op_GetRunCache.go new file mode 100644 index 00000000000..e3c35a7b4d7 --- /dev/null +++ b/service/omics/api_op_GetRunCache.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieve the details for the specified run cache. +// +// For more information, see [Call caching for HealthOmics runs] in the AWS HealthOmics User Guide. +// +// [Call caching for HealthOmics runs]: https://docs.aws.amazon.com/omics/latest/dev/workflow-call-caching.html +func (c *Client) GetRunCache(ctx context.Context, params *GetRunCacheInput, optFns ...func(*Options)) (*GetRunCacheOutput, error) { + if params == nil { + params = &GetRunCacheInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRunCache", params, optFns, c.addOperationGetRunCacheMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRunCacheOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRunCacheInput struct { + + // The identifier of the run cache to retrieve. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetRunCacheOutput struct { + + // Unique resource identifier for the run cache. + Arn *string + + // The default cache behavior for runs using this cache. + CacheBehavior types.CacheBehavior + + // The identifier of the bucket owner. + CacheBucketOwnerId *string + + // The S3 URI where the cache data is stored. + CacheS3Uri *string + + // Creation time of the run cache (an ISO 8601 formatted string). + CreationTime *time.Time + + // The run cache description. + Description *string + + // The run cache ID. + Id *string + + // The run cache name. + Name *string + + // The run cache status. + Status types.RunCacheStatus + + // The tags associated with the run cache. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRunCacheMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRunCache{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRunCache{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetRunCache"); 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 = addSpanRetryLoop(stack, options); 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 = addEndpointPrefix_opGetRunCacheMiddleware(stack); err != nil { + return err + } + if err = addOpGetRunCacheValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRunCache(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type endpointPrefix_opGetRunCacheMiddleware struct { +} + +func (*endpointPrefix_opGetRunCacheMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetRunCacheMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetRunCacheMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetRunCacheMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opGetRunCache(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetRunCache", + } +} diff --git a/service/omics/api_op_GetRunTask.go b/service/omics/api_op_GetRunTask.go index 26c3e6f2087..6c151dd1c31 100644 --- a/service/omics/api_op_GetRunTask.go +++ b/service/omics/api_op_GetRunTask.go @@ -48,6 +48,13 @@ type GetRunTaskInput struct { type GetRunTaskOutput struct { + // Set to true if AWS HealthOmics found a matching entry in the run cache for this + // task. + CacheHit *bool + + // The S3 URI of the cache location. + CacheS3Uri *string + // The task's CPU usage. Cpus *int32 diff --git a/service/omics/api_op_ListRunCaches.go b/service/omics/api_op_ListRunCaches.go new file mode 100644 index 00000000000..19f1c93044b --- /dev/null +++ b/service/omics/api_op_ListRunCaches.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of your run caches. +func (c *Client) ListRunCaches(ctx context.Context, params *ListRunCachesInput, optFns ...func(*Options)) (*ListRunCachesOutput, error) { + if params == nil { + params = &ListRunCachesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRunCaches", params, optFns, c.addOperationListRunCachesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRunCachesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRunCachesInput struct { + + // The maximum number of results to return. + MaxResults *int32 + + // Optional pagination token returned from a prior call to the ListRunCaches API + // operation. + StartingToken *string + + noSmithyDocumentSerde +} + +type ListRunCachesOutput struct { + + // Details about each run cache in the response. + Items []types.RunCacheListItem + + // Pagination token to retrieve additional run caches. If the response does not + // have a nextToken value, you have reached to the end of the list. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRunCachesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListRunCaches{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRunCaches{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRunCaches"); 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 = addSpanRetryLoop(stack, options); 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 = addEndpointPrefix_opListRunCachesMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRunCaches(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListRunCachesPaginatorOptions is the paginator options for ListRunCaches +type ListRunCachesPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRunCachesPaginator is a paginator for ListRunCaches +type ListRunCachesPaginator struct { + options ListRunCachesPaginatorOptions + client ListRunCachesAPIClient + params *ListRunCachesInput + nextToken *string + firstPage bool +} + +// NewListRunCachesPaginator returns a new ListRunCachesPaginator +func NewListRunCachesPaginator(client ListRunCachesAPIClient, params *ListRunCachesInput, optFns ...func(*ListRunCachesPaginatorOptions)) *ListRunCachesPaginator { + if params == nil { + params = &ListRunCachesInput{} + } + + options := ListRunCachesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRunCachesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.StartingToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRunCachesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListRunCaches page. +func (p *ListRunCachesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRunCachesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.StartingToken = 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.ListRunCaches(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 +} + +type endpointPrefix_opListRunCachesMiddleware struct { +} + +func (*endpointPrefix_opListRunCachesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListRunCachesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListRunCachesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListRunCachesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListRunCachesAPIClient is a client that implements the ListRunCaches operation. +type ListRunCachesAPIClient interface { + ListRunCaches(context.Context, *ListRunCachesInput, ...func(*Options)) (*ListRunCachesOutput, error) +} + +var _ ListRunCachesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListRunCaches(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRunCaches", + } +} diff --git a/service/omics/api_op_ListRuns.go b/service/omics/api_op_ListRuns.go index 158d17cab8b..967d92296f1 100644 --- a/service/omics/api_op_ListRuns.go +++ b/service/omics/api_op_ListRuns.go @@ -12,6 +12,13 @@ import ( ) // Retrieves a list of runs. +// +// HealthOmics stores a fixed number of runs that are available to the console and +// API. If the ListRuns response doesn't include specific runs that you expected, +// you can find run logs for all runs in the CloudWatch logs. For more information +// about viewing the run logs, see [CloudWatch logs]in the AWS HealthOmics User Guide. +// +// [CloudWatch logs]: https://docs.aws.amazon.com/omics/latest/dev/cloudwatch-logs.html func (c *Client) ListRuns(ctx context.Context, params *ListRunsInput, optFns ...func(*Options)) (*ListRunsOutput, error) { if params == nil { params = &ListRunsInput{} diff --git a/service/omics/api_op_StartRun.go b/service/omics/api_op_StartRun.go index a4cfb5f8cb4..4d18c611388 100644 --- a/service/omics/api_op_StartRun.go +++ b/service/omics/api_op_StartRun.go @@ -17,10 +17,10 @@ import ( // // StartRun will not support re-run for a workflow that is shared with you. // -// The total number of runs in your account is subject to a quota per Region. To -// avoid needing to delete runs manually, you can set the retention mode to REMOVE -// . Runs with this setting are deleted automatically when the run quoata is -// exceeded. +// HealthOmics stores a fixed number of runs that are available to the console and +// API. By default, HealthOmics doesn't any remove any runs. If HealthOmics reaches +// the maximum number of runs, you must manually remove runs. To have older runs +// removed automatically, set the retention mode to REMOVE . // // By default, the run uses STATIC storage. For STATIC storage, set the // storageCapacity field. You can set the storage type to DYNAMIC. You do not set @@ -57,6 +57,17 @@ type StartRunInput struct { // This member is required. RoleArn *string + // The cache behavior for the run. You specify this value if you want to override + // the default behavior for the cache. You had set the default value when you + // created the cache. For more information, see [Run cache behavior]in the AWS HealthOmics User Guide. + // + // [Run cache behavior]: https://docs.aws.amazon.com/omics/latest/dev/how-run-cache.html#run-cache-behavior + CacheBehavior types.CacheBehavior + + // Identifier of the cache associated with this run. If you don't specify a cache + // ID, no task outputs are cached for this run. + CacheId *string + // A log level for the run. LogLevel types.RunLogLevel @@ -72,7 +83,20 @@ type StartRunInput struct { // A priority for the run. Priority *int32 - // The retention mode for the run. + // The retention mode for the run. The default value is RETAIN. + // + // HealthOmics stores a fixed number of runs that are available to the console and + // API. In the default mode (RETAIN), you need to remove runs manually when the + // number of run exceeds the maximum. If you set the retention mode to REMOVE , + // HealthOmics automatically removes runs (that have mode set to REMOVE) when the + // number of run exceeds the maximum. All run logs are available in CloudWatch + // logs, if you need information about a run that is no longer available to the + // API. + // + // For more information about retention mode, see [Specifying run retention mode] in the AWS HealthOmics User + // Guide. + // + // [Specifying run retention mode]: https://docs.aws.amazon.com/omics/latest/dev/starting-a-run.html RetentionMode types.RunRetentionMode // The run's group ID. @@ -108,7 +132,7 @@ type StartRunInput struct { type StartRunOutput struct { - // The run's ARN. + // Unique resource identifier for the run. Arn *string // The run's ID. diff --git a/service/omics/api_op_UpdateRunCache.go b/service/omics/api_op_UpdateRunCache.go new file mode 100644 index 00000000000..90c72616706 --- /dev/null +++ b/service/omics/api_op_UpdateRunCache.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a run cache. +func (c *Client) UpdateRunCache(ctx context.Context, params *UpdateRunCacheInput, optFns ...func(*Options)) (*UpdateRunCacheOutput, error) { + if params == nil { + params = &UpdateRunCacheInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRunCache", params, optFns, c.addOperationUpdateRunCacheMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRunCacheOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRunCacheInput struct { + + // The identifier of the run cache you want to update. + // + // This member is required. + Id *string + + // Update the default run cache behavior. + CacheBehavior types.CacheBehavior + + // Update the run cache description. + Description *string + + // Update the name of the run cache. + Name *string + + noSmithyDocumentSerde +} + +type UpdateRunCacheOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRunCacheMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateRunCache{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateRunCache{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateRunCache"); 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 = addSpanRetryLoop(stack, options); 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 = addEndpointPrefix_opUpdateRunCacheMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateRunCacheValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRunCache(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type endpointPrefix_opUpdateRunCacheMiddleware struct { +} + +func (*endpointPrefix_opUpdateRunCacheMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opUpdateRunCacheMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opUpdateRunCacheMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opUpdateRunCacheMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opUpdateRunCache(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateRunCache", + } +} diff --git a/service/omics/deserializers.go b/service/omics/deserializers.go index 8a3b542c4dd..9a4e43e9f63 100644 --- a/service/omics/deserializers.go +++ b/service/omics/deserializers.go @@ -1918,6 +1918,206 @@ func awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(v **CreateRefe return nil } +type awsRestjson1_deserializeOpCreateRunCache struct { +} + +func (*awsRestjson1_deserializeOpCreateRunCache) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateRunCache) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateRunCache(response, &metadata) + } + output := &CreateRunCacheOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateRunCacheOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateRunCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateRunCacheOutput(v **CreateRunCacheOutput, 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 *CreateRunCacheOutput + if *v == nil { + sv = &CreateRunCacheOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunCacheArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunCacheId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunCacheStatus to be of type string, got %T instead", value) + } + sv.Status = types.RunCacheStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateRunGroup struct { } @@ -3610,14 +3810,14 @@ func awsRestjson1_deserializeOpErrorDeleteRun(response *smithyhttp.Response, met } } -type awsRestjson1_deserializeOpDeleteRunGroup struct { +type awsRestjson1_deserializeOpDeleteRunCache struct { } -func (*awsRestjson1_deserializeOpDeleteRunGroup) ID() string { +func (*awsRestjson1_deserializeOpDeleteRunCache) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRunGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRunCache) 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) @@ -3635,9 +3835,9 @@ func (m *awsRestjson1_deserializeOpDeleteRunGroup) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRunGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRunCache(response, &metadata) } - output := &DeleteRunGroupOutput{} + output := &DeleteRunCacheOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3650,7 +3850,7 @@ func (m *awsRestjson1_deserializeOpDeleteRunGroup) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRunGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRunCache(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)} @@ -3725,14 +3925,14 @@ func awsRestjson1_deserializeOpErrorDeleteRunGroup(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteSequenceStore struct { +type awsRestjson1_deserializeOpDeleteRunGroup struct { } -func (*awsRestjson1_deserializeOpDeleteSequenceStore) ID() string { +func (*awsRestjson1_deserializeOpDeleteRunGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRunGroup) 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) @@ -3750,16 +3950,22 @@ func (m *awsRestjson1_deserializeOpDeleteSequenceStore) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSequenceStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRunGroup(response, &metadata) } - output := &DeleteSequenceStoreOutput{} + output := &DeleteRunGroupOutput{} 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), + } + } + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRunGroup(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)} @@ -3815,6 +4021,9 @@ func awsRestjson1_deserializeOpErrorDeleteSequenceStore(response *smithyhttp.Res case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -3831,14 +4040,14 @@ func awsRestjson1_deserializeOpErrorDeleteSequenceStore(response *smithyhttp.Res } } -type awsRestjson1_deserializeOpDeleteShare struct { +type awsRestjson1_deserializeOpDeleteSequenceStore struct { } -func (*awsRestjson1_deserializeOpDeleteShare) ID() string { +func (*awsRestjson1_deserializeOpDeleteSequenceStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteSequenceStore) 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) @@ -3856,44 +4065,150 @@ func (m *awsRestjson1_deserializeOpDeleteShare) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteSequenceStore(response, &metadata) } - output := &DeleteShareOutput{} + output := &DeleteSequenceStoreOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDeleteShareOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteShare struct { +} + +func (*awsRestjson1_deserializeOpDeleteShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteShare) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteShare(response, &metadata) + } + output := &DeleteShareOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteShareOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteShare(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)} @@ -7301,6 +7616,24 @@ func awsRestjson1_deserializeOpDocumentGetRunOutput(v **GetRunOutput, value inte sv.Arn = ptr.String(jtv) } + case "cacheBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CacheBehavior to be of type string, got %T instead", value) + } + sv.CacheBehavior = types.CacheBehavior(jtv) + } + + case "cacheId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumericIdInArn to be of type string, got %T instead", value) + } + sv.CacheId = ptr.String(jtv) + } + case "creationTime": if value != nil { jtv, ok := value.(string) @@ -7332,6 +7665,15 @@ func awsRestjson1_deserializeOpDocumentGetRunOutput(v **GetRunOutput, value inte sv.Digest = ptr.String(jtv) } + case "engineVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngineVersion to be of type string, got %T instead", value) + } + sv.EngineVersion = ptr.String(jtv) + } + case "failureReason": if value != nil { jtv, ok := value.(string) @@ -7450,120 +7792,378 @@ func awsRestjson1_deserializeOpDocumentGetRunOutput(v **GetRunOutput, value inte sv.RunOutputUri = ptr.String(jtv) } - case "startedBy": + case "startedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunStartedBy to be of type string, got %T instead", value) + } + sv.StartedBy = ptr.String(jtv) + } + + case "startTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunTimestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunStatus to be of type string, got %T instead", value) + } + sv.Status = types.RunStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunStatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "stopTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunTimestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StopTime = ptr.Time(t) + } + + case "storageCapacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StorageCapacity = ptr.Int32(int32(i64)) + } + + case "storageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StorageType to be of type string, got %T instead", value) + } + sv.StorageType = types.StorageType(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "uuid": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunUuid to be of type string, got %T instead", value) + } + sv.Uuid = ptr.String(jtv) + } + + case "workflowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowId to be of type string, got %T instead", value) + } + sv.WorkflowId = ptr.String(jtv) + } + + case "workflowOwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowOwnerId to be of type string, got %T instead", value) + } + sv.WorkflowOwnerId = ptr.String(jtv) + } + + case "workflowType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowType to be of type string, got %T instead", value) + } + sv.WorkflowType = types.WorkflowType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetRunCache struct { +} + +func (*awsRestjson1_deserializeOpGetRunCache) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetRunCache) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetRunCache(response, &metadata) + } + output := &GetRunCacheOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetRunCacheOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetRunCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetRunCacheOutput(v **GetRunCacheOutput, 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 *GetRunCacheOutput + if *v == nil { + sv = &GetRunCacheOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunStartedBy to be of type string, got %T instead", value) + return fmt.Errorf("expected RunCacheArn to be of type string, got %T instead", value) } - sv.StartedBy = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "startTime": + case "cacheBehavior": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunTimestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected CacheBehavior to be of type string, got %T instead", value) } - sv.StartTime = ptr.Time(t) + sv.CacheBehavior = types.CacheBehavior(jtv) } - case "status": + case "cacheBucketOwnerId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) } - sv.Status = types.RunStatus(jtv) + sv.CacheBucketOwnerId = ptr.String(jtv) } - case "statusMessage": + case "cacheS3Uri": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunStatusMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected S3UriForBucketOrObject to be of type string, got %T instead", value) } - sv.StatusMessage = ptr.String(jtv) + sv.CacheS3Uri = ptr.String(jtv) } - case "stopTime": + case "creationTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunTimestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected RunCacheTimestamp to be of type string, got %T instead", value) } t, err := smithytime.ParseDateTime(jtv) if err != nil { return err } - sv.StopTime = ptr.Time(t) - } - - case "storageCapacity": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.StorageCapacity = ptr.Int32(int32(i64)) + sv.CreationTime = ptr.Time(t) } - case "storageType": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StorageType to be of type string, got %T instead", value) + return fmt.Errorf("expected UserCustomDescription to be of type string, got %T instead", value) } - sv.StorageType = types.StorageType(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { - return err + sv.Description = ptr.String(jtv) } - case "uuid": + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunUuid to be of type string, got %T instead", value) + return fmt.Errorf("expected RunCacheId to be of type string, got %T instead", value) } - sv.Uuid = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "workflowId": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkflowId to be of type string, got %T instead", value) + return fmt.Errorf("expected UserCustomName to be of type string, got %T instead", value) } - sv.WorkflowId = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "workflowOwnerId": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkflowOwnerId to be of type string, got %T instead", value) + return fmt.Errorf("expected RunCacheStatus to be of type string, got %T instead", value) } - sv.WorkflowOwnerId = ptr.String(jtv) + sv.Status = types.RunCacheStatus(jtv) } - case "workflowType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WorkflowType to be of type string, got %T instead", value) - } - sv.WorkflowType = types.WorkflowType(jtv) + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } default: @@ -7999,6 +8599,24 @@ func awsRestjson1_deserializeOpDocumentGetRunTaskOutput(v **GetRunTaskOutput, va for key, value := range shape { switch key { + case "cacheHit": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CacheHit = ptr.Bool(jtv) + } + + case "cacheS3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3UriForBucketOrObject to be of type string, got %T instead", value) + } + sv.CacheS3Uri = ptr.String(jtv) + } + case "cpus": if value != nil { jtv, ok := value.(json.Number) @@ -11471,7 +12089,189 @@ func awsRestjson1_deserializeOpErrorListReferenceStores(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListReferenceStoresOutput(v **ListReferenceStoresOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListReferenceStoresOutput(v **ListReferenceStoresOutput, 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 *ListReferenceStoresOutput + if *v == nil { + sv = &ListReferenceStoresOutput{} + } 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 "referenceStores": + if err := awsRestjson1_deserializeDocumentReferenceStoreDetailList(&sv.ReferenceStores, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListRunCaches struct { +} + +func (*awsRestjson1_deserializeOpListRunCaches) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListRunCaches) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListRunCaches(response, &metadata) + } + output := &ListRunCachesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListRunCachesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListRunCaches(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListRunCachesOutput(v **ListRunCachesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11484,29 +12284,29 @@ func awsRestjson1_deserializeOpDocumentListReferenceStoresOutput(v **ListReferen return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListReferenceStoresOutput + var sv *ListRunCachesOutput if *v == nil { - sv = &ListReferenceStoresOutput{} + sv = &ListRunCachesOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "items": + if err := awsRestjson1_deserializeDocumentRunCacheList(&sv.Items, value); err != nil { + return err + } + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected ListToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "referenceStores": - if err := awsRestjson1_deserializeDocumentReferenceStoreDetailList(&sv.ReferenceStores, value); err != nil { - return err - } - default: _, _ = key, value @@ -15219,6 +16019,121 @@ func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreVersionOutput(v **Up return nil } +type awsRestjson1_deserializeOpUpdateRunCache struct { +} + +func (*awsRestjson1_deserializeOpUpdateRunCache) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateRunCache) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRunCache(response, &metadata) + } + output := &UpdateRunCacheOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateRunCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpUpdateRunGroup struct { } @@ -19459,6 +20374,138 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentRunCacheList(v *[]types.RunCacheListItem, 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.RunCacheListItem + if *v == nil { + cv = []types.RunCacheListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RunCacheListItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentRunCacheListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRunCacheListItem(v **types.RunCacheListItem, 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.RunCacheListItem + if *v == nil { + sv = &types.RunCacheListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunCacheArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cacheBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CacheBehavior to be of type string, got %T instead", value) + } + sv.CacheBehavior = types.CacheBehavior(jtv) + } + + case "cacheS3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3UriForBucketOrObject to be of type string, got %T instead", value) + } + sv.CacheS3Uri = ptr.String(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunCacheTimestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunCacheId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserCustomName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunCacheStatus to be of type string, got %T instead", value) + } + sv.Status = types.RunCacheStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRunGroupList(v *[]types.RunGroupListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -20655,6 +21702,24 @@ func awsRestjson1_deserializeDocumentTaskListItem(v **types.TaskListItem, value for key, value := range shape { switch key { + case "cacheHit": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CacheHit = ptr.Bool(jtv) + } + + case "cacheS3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3UriForBucketOrObject to be of type string, got %T instead", value) + } + sv.CacheS3Uri = ptr.String(jtv) + } + case "cpus": if value != nil { jtv, ok := value.(json.Number) diff --git a/service/omics/generated.json b/service/omics/generated.json index 2b06bb2d046..753e9819457 100644 --- a/service/omics/generated.json +++ b/service/omics/generated.json @@ -20,6 +20,7 @@ "api_op_CreateAnnotationStoreVersion.go", "api_op_CreateMultipartReadSetUpload.go", "api_op_CreateReferenceStore.go", + "api_op_CreateRunCache.go", "api_op_CreateRunGroup.go", "api_op_CreateSequenceStore.go", "api_op_CreateShare.go", @@ -30,6 +31,7 @@ "api_op_DeleteReference.go", "api_op_DeleteReferenceStore.go", "api_op_DeleteRun.go", + "api_op_DeleteRunCache.go", "api_op_DeleteRunGroup.go", "api_op_DeleteSequenceStore.go", "api_op_DeleteShare.go", @@ -48,6 +50,7 @@ "api_op_GetReferenceMetadata.go", "api_op_GetReferenceStore.go", "api_op_GetRun.go", + "api_op_GetRunCache.go", "api_op_GetRunGroup.go", "api_op_GetRunTask.go", "api_op_GetSequenceStore.go", @@ -67,6 +70,7 @@ "api_op_ListReferenceImportJobs.go", "api_op_ListReferenceStores.go", "api_op_ListReferences.go", + "api_op_ListRunCaches.go", "api_op_ListRunGroups.go", "api_op_ListRunTasks.go", "api_op_ListRuns.go", @@ -87,6 +91,7 @@ "api_op_UntagResource.go", "api_op_UpdateAnnotationStore.go", "api_op_UpdateAnnotationStoreVersion.go", + "api_op_UpdateRunCache.go", "api_op_UpdateRunGroup.go", "api_op_UpdateVariantStore.go", "api_op_UpdateWorkflow.go", diff --git a/service/omics/serializers.go b/service/omics/serializers.go index 95cccd07556..0ea899d1d18 100644 --- a/service/omics/serializers.go +++ b/service/omics/serializers.go @@ -1061,6 +1061,119 @@ func awsRestjson1_serializeOpDocumentCreateReferenceStoreInput(v *CreateReferenc return nil } +type awsRestjson1_serializeOpCreateRunCache struct { +} + +func (*awsRestjson1_serializeOpCreateRunCache) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateRunCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateRunCacheInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/runCache") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateRunCacheInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateRunCacheInput(v *CreateRunCacheInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateRunCacheInput(v *CreateRunCacheInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.CacheBehavior) > 0 { + ok := object.Key("cacheBehavior") + ok.String(string(v.CacheBehavior)) + } + + if v.CacheBucketOwnerId != nil { + ok := object.Key("cacheBucketOwnerId") + ok.String(*v.CacheBucketOwnerId) + } + + if v.CacheS3Location != nil { + ok := object.Key("cacheS3Location") + ok.String(*v.CacheS3Location) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.RequestId != nil { + ok := object.Key("requestId") + ok.String(*v.RequestId) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateRunGroup struct { } @@ -2019,6 +2132,77 @@ func awsRestjson1_serializeOpHttpBindingsDeleteRunInput(v *DeleteRunInput, encod return nil } +type awsRestjson1_serializeOpDeleteRunCache struct { +} + +func (*awsRestjson1_serializeOpDeleteRunCache) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteRunCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteRunCacheInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/runCache/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteRunCacheInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteRunCacheInput(v *DeleteRunCacheInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteRunGroup struct { } @@ -3409,6 +3593,77 @@ func awsRestjson1_serializeOpHttpBindingsGetRunInput(v *GetRunInput, encoder *ht return nil } +type awsRestjson1_serializeOpGetRunCache struct { +} + +func (*awsRestjson1_serializeOpGetRunCache) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetRunCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetRunCacheInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/runCache/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetRunCacheInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetRunCacheInput(v *GetRunCacheInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetRunGroup struct { } @@ -5153,6 +5408,76 @@ func awsRestjson1_serializeOpDocumentListReferenceStoresInput(v *ListReferenceSt return nil } +type awsRestjson1_serializeOpListRunCaches struct { +} + +func (*awsRestjson1_serializeOpListRunCaches) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRunCaches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListRunCachesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/runCache") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListRunCachesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListRunCachesInput(v *ListRunCachesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.StartingToken != nil { + encoder.SetQuery("startingToken").String(*v.StartingToken) + } + + return nil +} + type awsRestjson1_serializeOpListRunGroups struct { } @@ -6554,6 +6879,16 @@ func awsRestjson1_serializeOpDocumentStartRunInput(v *StartRunInput, value smith object := value.Object() defer object.Close() + if len(v.CacheBehavior) > 0 { + ok := object.Key("cacheBehavior") + ok.String(string(v.CacheBehavior)) + } + + if v.CacheId != nil { + ok := object.Key("cacheId") + ok.String(*v.CacheId) + } + if len(v.LogLevel) > 0 { ok := object.Key("logLevel") ok.String(string(v.LogLevel)) @@ -7116,6 +7451,110 @@ func awsRestjson1_serializeOpDocumentUpdateAnnotationStoreVersionInput(v *Update return nil } +type awsRestjson1_serializeOpUpdateRunCache struct { +} + +func (*awsRestjson1_serializeOpUpdateRunCache) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateRunCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateRunCacheInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/runCache/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateRunCacheInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateRunCacheInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateRunCacheInput(v *UpdateRunCacheInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateRunCacheInput(v *UpdateRunCacheInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.CacheBehavior) > 0 { + ok := object.Key("cacheBehavior") + ok.String(string(v.CacheBehavior)) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + type awsRestjson1_serializeOpUpdateRunGroup struct { } diff --git a/service/omics/snapshot/api_op_CreateRunCache.go.snap b/service/omics/snapshot/api_op_CreateRunCache.go.snap new file mode 100644 index 00000000000..02acf2f2243 --- /dev/null +++ b/service/omics/snapshot/api_op_CreateRunCache.go.snap @@ -0,0 +1,43 @@ +CreateRunCache + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + EndpointHostPrefix + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/omics/snapshot/api_op_DeleteRunCache.go.snap b/service/omics/snapshot/api_op_DeleteRunCache.go.snap new file mode 100644 index 00000000000..207145119cf --- /dev/null +++ b/service/omics/snapshot/api_op_DeleteRunCache.go.snap @@ -0,0 +1,42 @@ +DeleteRunCache + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + EndpointHostPrefix + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/omics/snapshot/api_op_GetRunCache.go.snap b/service/omics/snapshot/api_op_GetRunCache.go.snap new file mode 100644 index 00000000000..ea50c68332f --- /dev/null +++ b/service/omics/snapshot/api_op_GetRunCache.go.snap @@ -0,0 +1,42 @@ +GetRunCache + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + EndpointHostPrefix + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/omics/snapshot/api_op_ListRunCaches.go.snap b/service/omics/snapshot/api_op_ListRunCaches.go.snap new file mode 100644 index 00000000000..d7600640bec --- /dev/null +++ b/service/omics/snapshot/api_op_ListRunCaches.go.snap @@ -0,0 +1,41 @@ +ListRunCaches + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + EndpointHostPrefix + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/omics/snapshot/api_op_UpdateRunCache.go.snap b/service/omics/snapshot/api_op_UpdateRunCache.go.snap new file mode 100644 index 00000000000..fdfc29fbf5f --- /dev/null +++ b/service/omics/snapshot/api_op_UpdateRunCache.go.snap @@ -0,0 +1,42 @@ +UpdateRunCache + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + EndpointHostPrefix + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/omics/snapshot_test.go b/service/omics/snapshot_test.go index f18d01da5f7..b9fd1a54272 100644 --- a/service/omics/snapshot_test.go +++ b/service/omics/snapshot_test.go @@ -194,6 +194,18 @@ func TestCheckSnapshot_CreateReferenceStore(t *testing.T) { } } +func TestCheckSnapshot_CreateRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.CreateRunGroup(context.Background(), nil, func(o *Options) { @@ -314,6 +326,18 @@ func TestCheckSnapshot_DeleteRun(t *testing.T) { } } +func TestCheckSnapshot_DeleteRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteRunGroup(context.Background(), nil, func(o *Options) { @@ -530,6 +554,18 @@ func TestCheckSnapshot_GetRun(t *testing.T) { } } +func TestCheckSnapshot_GetRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.GetRunGroup(context.Background(), nil, func(o *Options) { @@ -758,6 +794,18 @@ func TestCheckSnapshot_ListReferenceStores(t *testing.T) { } } +func TestCheckSnapshot_ListRunCaches(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRunCaches(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListRunCaches") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListRunGroups(t *testing.T) { svc := New(Options{}) _, err := svc.ListRunGroups(context.Background(), nil, func(o *Options) { @@ -998,6 +1046,18 @@ func TestCheckSnapshot_UpdateAnnotationStoreVersion(t *testing.T) { } } +func TestCheckSnapshot_UpdateRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateRunGroup(context.Background(), nil, func(o *Options) { @@ -1177,6 +1237,18 @@ func TestUpdateSnapshot_CreateReferenceStore(t *testing.T) { } } +func TestUpdateSnapshot_CreateRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.CreateRunGroup(context.Background(), nil, func(o *Options) { @@ -1297,6 +1369,18 @@ func TestUpdateSnapshot_DeleteRun(t *testing.T) { } } +func TestUpdateSnapshot_DeleteRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteRunGroup(context.Background(), nil, func(o *Options) { @@ -1513,6 +1597,18 @@ func TestUpdateSnapshot_GetRun(t *testing.T) { } } +func TestUpdateSnapshot_GetRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.GetRunGroup(context.Background(), nil, func(o *Options) { @@ -1741,6 +1837,18 @@ func TestUpdateSnapshot_ListReferenceStores(t *testing.T) { } } +func TestUpdateSnapshot_ListRunCaches(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRunCaches(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListRunCaches") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListRunGroups(t *testing.T) { svc := New(Options{}) _, err := svc.ListRunGroups(context.Background(), nil, func(o *Options) { @@ -1981,6 +2089,18 @@ func TestUpdateSnapshot_UpdateAnnotationStoreVersion(t *testing.T) { } } +func TestUpdateSnapshot_UpdateRunCache(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateRunCache(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateRunCache") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateRunGroup(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateRunGroup(context.Background(), nil, func(o *Options) { diff --git a/service/omics/types/enums.go b/service/omics/types/enums.go index df11f2d50d8..997a13f9fb6 100644 --- a/service/omics/types/enums.go +++ b/service/omics/types/enums.go @@ -57,6 +57,25 @@ func (AnnotationType) Values() []AnnotationType { } } +type CacheBehavior string + +// Enum values for CacheBehavior +const ( + CacheBehaviorCacheOnFailure CacheBehavior = "CACHE_ON_FAILURE" + CacheBehaviorCacheAlways CacheBehavior = "CACHE_ALWAYS" +) + +// Values returns all known values for CacheBehavior. 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 (CacheBehavior) Values() []CacheBehavior { + return []CacheBehavior{ + "CACHE_ON_FAILURE", + "CACHE_ALWAYS", + } +} + type CreationType string // Enum values for CreationType @@ -588,6 +607,27 @@ func (ResourceOwner) Values() []ResourceOwner { } } +type RunCacheStatus string + +// Enum values for RunCacheStatus +const ( + RunCacheStatusActive RunCacheStatus = "ACTIVE" + RunCacheStatusDeleted RunCacheStatus = "DELETED" + RunCacheStatusFailed RunCacheStatus = "FAILED" +) + +// Values returns all known values for RunCacheStatus. 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 (RunCacheStatus) Values() []RunCacheStatus { + return []RunCacheStatus{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + type RunExport string // Enum values for RunExport diff --git a/service/omics/types/types.go b/service/omics/types/types.go index 6f3c2904f8e..9035a22180e 100644 --- a/service/omics/types/types.go +++ b/service/omics/types/types.go @@ -1103,6 +1103,33 @@ type ReferenceStoreFilter struct { noSmithyDocumentSerde } +// List entry for one run cache. +type RunCacheListItem struct { + + // Unique resource identifier for the run cache. + Arn *string + + // Default cache behavior for the run cache. + CacheBehavior CacheBehavior + + // The S3 uri for the run cache data. + CacheS3Uri *string + + // The time that this run cache was created (an ISO 8601 formatted string). + CreationTime *time.Time + + // The identifier for this run cache. + Id *string + + // The name of the run cache. + Name *string + + // The run cache status. + Status RunCacheStatus + + noSmithyDocumentSerde +} + // A run group. type RunGroupListItem struct { @@ -1426,6 +1453,13 @@ func (*StoreOptionsMemberTsvStoreOptions) isStoreOptions() {} // A workflow run task. type TaskListItem struct { + // Set to true if AWS HealthOmics found a matching entry in the run cache for this + // task. + CacheHit *bool + + // The S3 URI of the cache location. + CacheS3Uri *string + // The task's CPU count. Cpus *int32 diff --git a/service/omics/validators.go b/service/omics/validators.go index 8a44f55e908..9cf6ac0191b 100644 --- a/service/omics/validators.go +++ b/service/omics/validators.go @@ -230,6 +230,26 @@ func (m *validateOpCreateReferenceStore) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpCreateRunCache struct { +} + +func (*validateOpCreateRunCache) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRunCache) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRunCacheInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRunCacheInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateRunGroup struct { } @@ -410,6 +430,26 @@ func (m *validateOpDeleteReferenceStore) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpDeleteRunCache struct { +} + +func (*validateOpDeleteRunCache) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRunCache) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRunCacheInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRunCacheInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteRunGroup struct { } @@ -770,6 +810,26 @@ func (m *validateOpGetReferenceStore) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpGetRunCache struct { +} + +func (*validateOpGetRunCache) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRunCache) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRunCacheInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRunCacheInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetRunGroup struct { } @@ -1390,6 +1450,26 @@ func (m *validateOpUpdateAnnotationStoreVersion) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpUpdateRunCache struct { +} + +func (*validateOpUpdateRunCache) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRunCache) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRunCacheInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRunCacheInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateRunGroup struct { } @@ -1514,6 +1594,10 @@ func addOpCreateReferenceStoreValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpCreateReferenceStore{}, middleware.After) } +func addOpCreateRunCacheValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRunCache{}, middleware.After) +} + func addOpCreateRunGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRunGroup{}, middleware.After) } @@ -1550,6 +1634,10 @@ func addOpDeleteReferenceStoreValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpDeleteReferenceStore{}, middleware.After) } +func addOpDeleteRunCacheValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRunCache{}, middleware.After) +} + func addOpDeleteRunGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRunGroup{}, middleware.After) } @@ -1622,6 +1710,10 @@ func addOpGetReferenceStoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetReferenceStore{}, middleware.After) } +func addOpGetRunCacheValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRunCache{}, middleware.After) +} + func addOpGetRunGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRunGroup{}, middleware.After) } @@ -1746,6 +1838,10 @@ func addOpUpdateAnnotationStoreVersionValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpUpdateAnnotationStoreVersion{}, middleware.After) } +func addOpUpdateRunCacheValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRunCache{}, middleware.After) +} + func addOpUpdateRunGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRunGroup{}, middleware.After) } @@ -2244,6 +2340,24 @@ func validateOpCreateReferenceStoreInput(v *CreateReferenceStoreInput) error { } } +func validateOpCreateRunCacheInput(v *CreateRunCacheInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRunCacheInput"} + if v.CacheS3Location == nil { + invalidParams.Add(smithy.NewErrParamRequired("CacheS3Location")) + } + if v.RequestId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RequestId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateRunGroupInput(v *CreateRunGroupInput) error { if v == nil { return nil @@ -2398,6 +2512,21 @@ func validateOpDeleteReferenceStoreInput(v *DeleteReferenceStoreInput) error { } } +func validateOpDeleteRunCacheInput(v *DeleteRunCacheInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRunCacheInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteRunGroupInput(v *DeleteRunGroupInput) error { if v == nil { return nil @@ -2701,6 +2830,21 @@ func validateOpGetReferenceStoreInput(v *GetReferenceStoreInput) error { } } +func validateOpGetRunCacheInput(v *GetRunCacheInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRunCacheInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetRunGroupInput(v *GetRunGroupInput) error { if v == nil { return nil @@ -3247,6 +3391,21 @@ func validateOpUpdateAnnotationStoreVersionInput(v *UpdateAnnotationStoreVersion } } +func validateOpUpdateRunCacheInput(v *UpdateRunCacheInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRunCacheInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateRunGroupInput(v *UpdateRunGroupInput) error { if v == nil { return nil diff --git a/service/rbin/api_op_CreateRule.go b/service/rbin/api_op_CreateRule.go index d360174fca7..6e555936c34 100644 --- a/service/rbin/api_op_CreateRule.go +++ b/service/rbin/api_op_CreateRule.go @@ -11,10 +11,25 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a Recycle Bin retention rule. For more information, see [Create Recycle Bin retention rules] in the Amazon -// Elastic Compute Cloud User Guide. +// Creates a Recycle Bin retention rule. You can create two types of retention +// rules: // -// [Create Recycle Bin retention rules]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-create-rule +// - Tag-level retention rules - These retention rules use resource tags to +// identify the resources to protect. For each retention rule, you specify one or +// more tag key and value pairs. Resources (of the specified type) that have at +// least one of these tag key and value pairs are automatically retained in the +// Recycle Bin upon deletion. Use this type of retention rule to protect specific +// resources in your account based on their tags. +// +// - Region-level retention rules - These retention rules, by default, apply to +// all of the resources (of the specified type) in the Region, even if the +// resources are not tagged. However, you can specify exclusion tags to exclude +// resources that have specific tags. Use this type of retention rule to protect +// all resources of a specific type in a Region. +// +// For more information, see [Create Recycle Bin retention rules] in the Amazon EBS User Guide. +// +// [Create Recycle Bin retention rules]: https://docs.aws.amazon.com/ebs/latest/userguide/recycle-bin.html func (c *Client) CreateRule(ctx context.Context, params *CreateRuleInput, optFns ...func(*Options)) (*CreateRuleOutput, error) { if params == nil { params = &CreateRuleInput{} @@ -48,15 +63,23 @@ type CreateRuleInput struct { // The retention rule description. Description *string + // [Region-level retention rules only] Specifies the exclusion tags to use to + // identify resources that are to be excluded, or ignored, by a Region-level + // retention rule. Resources that have any of these tags are not retained by the + // retention rule upon deletion. + // + // You can't specify exclusion tags for tag-level retention rules. + ExcludeResourceTags []types.ResourceTag + // Information about the retention rule lock configuration. LockConfiguration *types.LockConfiguration - // Specifies the resource tags to use to identify resources that are to be - // retained by a tag-level retention rule. For tag-level retention rules, only - // deleted resources, of the specified resource type, that have one or more of the - // specified tag key and value pairs are retained. If a resource is deleted, but it - // does not have any of the specified tag key and value pairs, it is immediately - // deleted without being retained by the retention rule. + // [Tag-level retention rules only] Specifies the resource tags to use to identify + // resources that are to be retained by a tag-level retention rule. For tag-level + // retention rules, only deleted resources, of the specified resource type, that + // have one or more of the specified tag key and value pairs are retained. If a + // resource is deleted, but it does not have any of the specified tag key and value + // pairs, it is immediately deleted without being retained by the retention rule. // // You can add the same tag key and value pair to a maximum or five retention // rules. @@ -78,13 +101,18 @@ type CreateRuleOutput struct { // The retention rule description. Description *string + // [Region-level retention rules only] Information about the exclusion tags used + // to identify resources that are to be excluded, or ignored, by the retention + // rule. + ExcludeResourceTags []types.ResourceTag + // The unique ID of the retention rule. Identifier *string // Information about the retention rule lock configuration. LockConfiguration *types.LockConfiguration - // The lock state for the retention rule. + // [Region-level retention rules only] The lock state for the retention rule. // // - locked - The retention rule is locked and can't be modified or deleted. // @@ -100,8 +128,8 @@ type CreateRuleOutput struct { // can never transition back to null . LockState types.LockState - // Information about the resource tags used to identify resources that are - // retained by the retention rule. + // [Tag-level retention rules only] Information about the resource tags used to + // identify resources that are retained by the retention rule. ResourceTags []types.ResourceTag // The resource type retained by the retention rule. diff --git a/service/rbin/api_op_GetRule.go b/service/rbin/api_op_GetRule.go index e4937f3ff11..6c349dcad33 100644 --- a/service/rbin/api_op_GetRule.go +++ b/service/rbin/api_op_GetRule.go @@ -43,6 +43,11 @@ type GetRuleOutput struct { // The retention rule description. Description *string + // [Region-level retention rules only] Information about the exclusion tags used + // to identify resources that are to be excluded, or ignored, by the retention + // rule. + ExcludeResourceTags []types.ResourceTag + // The unique ID of the retention rule. Identifier *string @@ -54,7 +59,7 @@ type GetRuleOutput struct { // delay period. LockEndTime *time.Time - // The lock state for the retention rule. + // [Region-level retention rules only] The lock state for the retention rule. // // - locked - The retention rule is locked and can't be modified or deleted. // @@ -70,8 +75,8 @@ type GetRuleOutput struct { // can never transition back to null . LockState types.LockState - // Information about the resource tags used to identify resources that are - // retained by the retention rule. + // [Tag-level retention rules only] Information about the resource tags used to + // identify resources that are retained by the retention rule. ResourceTags []types.ResourceTag // The resource type retained by the retention rule. diff --git a/service/rbin/api_op_ListRules.go b/service/rbin/api_op_ListRules.go index 5a9277f2199..44e7c852748 100644 --- a/service/rbin/api_op_ListRules.go +++ b/service/rbin/api_op_ListRules.go @@ -38,6 +38,11 @@ type ListRulesInput struct { // This member is required. ResourceType types.ResourceType + // [Region-level retention rules only] Information about the exclusion tags used + // to identify resources that are to be excluded, or ignored, by the retention + // rule. + ExcludeResourceTags []types.ResourceTag + // The lock state of the retention rules to list. Only retention rules with the // specified lock state are returned. LockState types.LockState @@ -49,8 +54,8 @@ type ListRulesInput struct { // The token for the next page of results. NextToken *string - // Information about the resource tags used to identify resources that are - // retained by the retention rule. + // [Tag-level retention rules only] Information about the resource tags used to + // identify resources that are retained by the retention rule. ResourceTags []types.ResourceTag noSmithyDocumentSerde diff --git a/service/rbin/api_op_LockRule.go b/service/rbin/api_op_LockRule.go index b225de6e365..018ea24d909 100644 --- a/service/rbin/api_op_LockRule.go +++ b/service/rbin/api_op_LockRule.go @@ -11,7 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Locks a retention rule. A locked retention rule can't be modified or deleted. +// Locks a Region-level retention rule. A locked retention rule can't be modified +// or deleted. +// +// You can't lock tag-level retention rules, or Region-level retention rules that +// have exclusion tags. func (c *Client) LockRule(ctx context.Context, params *LockRuleInput, optFns ...func(*Options)) (*LockRuleOutput, error) { if params == nil { params = &LockRuleInput{} @@ -47,13 +51,18 @@ type LockRuleOutput struct { // The retention rule description. Description *string + // [Region-level retention rules only] Information about the exclusion tags used + // to identify resources that are to be excluded, or ignored, by the retention + // rule. + ExcludeResourceTags []types.ResourceTag + // The unique ID of the retention rule. Identifier *string // Information about the retention rule lock configuration. LockConfiguration *types.LockConfiguration - // The lock state for the retention rule. + // [Region-level retention rules only] The lock state for the retention rule. // // - locked - The retention rule is locked and can't be modified or deleted. // @@ -69,8 +78,8 @@ type LockRuleOutput struct { // can never transition back to null . LockState types.LockState - // Information about the resource tags used to identify resources that are - // retained by the retention rule. + // [Tag-level retention rules only] Information about the resource tags used to + // identify resources that are retained by the retention rule. ResourceTags []types.ResourceTag // The resource type retained by the retention rule. diff --git a/service/rbin/api_op_UnlockRule.go b/service/rbin/api_op_UnlockRule.go index 4f18be26aab..73b1395863e 100644 --- a/service/rbin/api_op_UnlockRule.go +++ b/service/rbin/api_op_UnlockRule.go @@ -44,6 +44,11 @@ type UnlockRuleOutput struct { // The retention rule description. Description *string + // [Region-level retention rules only] Information about the exclusion tags used + // to identify resources that are to be excluded, or ignored, by the retention + // rule. + ExcludeResourceTags []types.ResourceTag + // The unique ID of the retention rule. Identifier *string @@ -55,7 +60,7 @@ type UnlockRuleOutput struct { // delay period. LockEndTime *time.Time - // The lock state for the retention rule. + // [Region-level retention rules only] The lock state for the retention rule. // // - locked - The retention rule is locked and can't be modified or deleted. // @@ -71,8 +76,8 @@ type UnlockRuleOutput struct { // can never transition back to null . LockState types.LockState - // Information about the resource tags used to identify resources that are - // retained by the retention rule. + // [Tag-level retention rules only] Information about the resource tags used to + // identify resources that are retained by the retention rule. ResourceTags []types.ResourceTag // The resource type retained by the retention rule. diff --git a/service/rbin/api_op_UpdateRule.go b/service/rbin/api_op_UpdateRule.go index edea45fd74c..7f95247eed9 100644 --- a/service/rbin/api_op_UpdateRule.go +++ b/service/rbin/api_op_UpdateRule.go @@ -43,12 +43,20 @@ type UpdateRuleInput struct { // The retention rule description. Description *string - // Specifies the resource tags to use to identify resources that are to be - // retained by a tag-level retention rule. For tag-level retention rules, only - // deleted resources, of the specified resource type, that have one or more of the - // specified tag key and value pairs are retained. If a resource is deleted, but it - // does not have any of the specified tag key and value pairs, it is immediately - // deleted without being retained by the retention rule. + // [Region-level retention rules only] Specifies the exclusion tags to use to + // identify resources that are to be excluded, or ignored, by a Region-level + // retention rule. Resources that have any of these tags are not retained by the + // retention rule upon deletion. + // + // You can't specify exclusion tags for tag-level retention rules. + ExcludeResourceTags []types.ResourceTag + + // [Tag-level retention rules only] Specifies the resource tags to use to identify + // resources that are to be retained by a tag-level retention rule. For tag-level + // retention rules, only deleted resources, of the specified resource type, that + // have one or more of the specified tag key and value pairs are retained. If a + // resource is deleted, but it does not have any of the specified tag key and value + // pairs, it is immediately deleted without being retained by the retention rule. // // You can add the same tag key and value pair to a maximum or five retention // rules. @@ -75,6 +83,11 @@ type UpdateRuleOutput struct { // The retention rule description. Description *string + // [Region-level retention rules only] Information about the exclusion tags used + // to identify resources that are to be excluded, or ignored, by the retention + // rule. + ExcludeResourceTags []types.ResourceTag + // The unique ID of the retention rule. Identifier *string @@ -83,7 +96,7 @@ type UpdateRuleOutput struct { // delay period. LockEndTime *time.Time - // The lock state for the retention rule. + // [Region-level retention rules only] The lock state for the retention rule. // // - locked - The retention rule is locked and can't be modified or deleted. // @@ -99,8 +112,8 @@ type UpdateRuleOutput struct { // can never transition back to null . LockState types.LockState - // Information about the resource tags used to identify resources that are - // retained by the retention rule. + // [Tag-level retention rules only] Information about the resource tags used to + // identify resources that are retained by the retention rule. ResourceTags []types.ResourceTag // The resource type retained by the retention rule. diff --git a/service/rbin/deserializers.go b/service/rbin/deserializers.go index 87af680bbe3..16563d6b4b8 100644 --- a/service/rbin/deserializers.go +++ b/service/rbin/deserializers.go @@ -182,6 +182,11 @@ func awsRestjson1_deserializeOpDocumentCreateRuleOutput(v **CreateRuleOutput, va sv.Description = ptr.String(jtv) } + case "ExcludeResourceTags": + if err := awsRestjson1_deserializeDocumentExcludeResourceTags(&sv.ExcludeResourceTags, value); err != nil { + return err + } + case "Identifier": if value != nil { jtv, ok := value.(string) @@ -506,6 +511,11 @@ func awsRestjson1_deserializeOpDocumentGetRuleOutput(v **GetRuleOutput, value in sv.Description = ptr.String(jtv) } + case "ExcludeResourceTags": + if err := awsRestjson1_deserializeDocumentExcludeResourceTags(&sv.ExcludeResourceTags, value); err != nil { + return err + } + case "Identifier": if value != nil { jtv, ok := value.(string) @@ -1069,6 +1079,11 @@ func awsRestjson1_deserializeOpDocumentLockRuleOutput(v **LockRuleOutput, value sv.Description = ptr.String(jtv) } + case "ExcludeResourceTags": + if err := awsRestjson1_deserializeDocumentExcludeResourceTags(&sv.ExcludeResourceTags, value); err != nil { + return err + } + case "Identifier": if value != nil { jtv, ok := value.(string) @@ -1391,6 +1406,11 @@ func awsRestjson1_deserializeOpDocumentUnlockRuleOutput(v **UnlockRuleOutput, va sv.Description = ptr.String(jtv) } + case "ExcludeResourceTags": + if err := awsRestjson1_deserializeDocumentExcludeResourceTags(&sv.ExcludeResourceTags, value); err != nil { + return err + } + case "Identifier": if value != nil { jtv, ok := value.(string) @@ -1729,6 +1749,11 @@ func awsRestjson1_deserializeOpDocumentUpdateRuleOutput(v **UpdateRuleOutput, va sv.Description = ptr.String(jtv) } + case "ExcludeResourceTags": + if err := awsRestjson1_deserializeDocumentExcludeResourceTags(&sv.ExcludeResourceTags, value); err != nil { + return err + } + case "Identifier": if value != nil { jtv, ok := value.(string) @@ -2038,6 +2063,40 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentExcludeResourceTags(v *[]types.ResourceTag, 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.ResourceTag + if *v == nil { + cv = []types.ResourceTag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceTag + destAddr := &col + if err := awsRestjson1_deserializeDocumentResourceTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/rbin/serializers.go b/service/rbin/serializers.go index 721cf296f47..5150b5b9a5d 100644 --- a/service/rbin/serializers.go +++ b/service/rbin/serializers.go @@ -93,6 +93,13 @@ func awsRestjson1_serializeOpDocumentCreateRuleInput(v *CreateRuleInput, value s ok.String(*v.Description) } + if v.ExcludeResourceTags != nil { + ok := object.Key("ExcludeResourceTags") + if err := awsRestjson1_serializeDocumentExcludeResourceTags(v.ExcludeResourceTags, ok); err != nil { + return err + } + } + if v.LockConfiguration != nil { ok := object.Key("LockConfiguration") if err := awsRestjson1_serializeDocumentLockConfiguration(v.LockConfiguration, ok); err != nil { @@ -344,6 +351,13 @@ func awsRestjson1_serializeOpDocumentListRulesInput(v *ListRulesInput, value smi object := value.Object() defer object.Close() + if v.ExcludeResourceTags != nil { + ok := object.Key("ExcludeResourceTags") + if err := awsRestjson1_serializeDocumentExcludeResourceTags(v.ExcludeResourceTags, ok); err != nil { + return err + } + } + if len(v.LockState) > 0 { ok := object.Key("LockState") ok.String(string(v.LockState)) @@ -876,6 +890,13 @@ func awsRestjson1_serializeOpDocumentUpdateRuleInput(v *UpdateRuleInput, value s ok.String(*v.Description) } + if v.ExcludeResourceTags != nil { + ok := object.Key("ExcludeResourceTags") + if err := awsRestjson1_serializeDocumentExcludeResourceTags(v.ExcludeResourceTags, ok); err != nil { + return err + } + } + if v.ResourceTags != nil { ok := object.Key("ResourceTags") if err := awsRestjson1_serializeDocumentResourceTags(v.ResourceTags, ok); err != nil { @@ -898,6 +919,19 @@ func awsRestjson1_serializeOpDocumentUpdateRuleInput(v *UpdateRuleInput, value s return nil } +func awsRestjson1_serializeDocumentExcludeResourceTags(v []types.ResourceTag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentResourceTag(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentLockConfiguration(v *types.LockConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/rbin/types/types.go b/service/rbin/types/types.go index de8af5af331..ddb2da422ef 100644 --- a/service/rbin/types/types.go +++ b/service/rbin/types/types.go @@ -17,8 +17,8 @@ type LockConfiguration struct { noSmithyDocumentSerde } -// Information about the resource tags used to identify resources that are -// retained by the retention rule. +// [Tag-level retention rules only] Information about the resource tags used to +// identify resources that are retained by the retention rule. type ResourceTag struct { // The tag key. @@ -60,7 +60,7 @@ type RuleSummary struct { // The unique ID of the retention rule. Identifier *string - // The lock state for the retention rule. + // [Region-level retention rules only] The lock state for the retention rule. // // - locked - The retention rule is locked and can't be modified or deleted. // diff --git a/service/rbin/validators.go b/service/rbin/validators.go index 1706da0e69f..07037f55d30 100644 --- a/service/rbin/validators.go +++ b/service/rbin/validators.go @@ -250,6 +250,23 @@ func addOpUpdateRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRule{}, middleware.After) } +func validateExcludeResourceTags(v []types.ResourceTag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExcludeResourceTags"} + for i := range v { + if err := validateResourceTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateLockConfiguration(v *types.LockConfiguration) error { if v == nil { return nil @@ -402,6 +419,11 @@ func validateOpCreateRuleInput(v *CreateRuleInput) error { invalidParams.AddNested("LockConfiguration", err.(smithy.InvalidParamsError)) } } + if v.ExcludeResourceTags != nil { + if err := validateExcludeResourceTags(v.ExcludeResourceTags); err != nil { + invalidParams.AddNested("ExcludeResourceTags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -452,6 +474,11 @@ func validateOpListRulesInput(v *ListRulesInput) error { invalidParams.AddNested("ResourceTags", err.(smithy.InvalidParamsError)) } } + if v.ExcludeResourceTags != nil { + if err := validateExcludeResourceTags(v.ExcludeResourceTags); err != nil { + invalidParams.AddNested("ExcludeResourceTags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -569,6 +596,11 @@ func validateOpUpdateRuleInput(v *UpdateRuleInput) error { invalidParams.AddNested("ResourceTags", err.(smithy.InvalidParamsError)) } } + if v.ExcludeResourceTags != nil { + if err := validateExcludeResourceTags(v.ExcludeResourceTags); err != nil { + invalidParams.AddNested("ExcludeResourceTags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/rds/api_op_CreateBlueGreenDeployment.go b/service/rds/api_op_CreateBlueGreenDeployment.go index 4bcb8625cd5..8b8c80515d2 100644 --- a/service/rds/api_op_CreateBlueGreenDeployment.go +++ b/service/rds/api_op_CreateBlueGreenDeployment.go @@ -16,8 +16,7 @@ import ( // A blue/green deployment creates a staging environment that copies the // production environment. In a blue/green deployment, the blue environment is the // current production environment. The green environment is the staging -// environment. The staging environment stays in sync with the current production -// environment using logical replication. +// environment, and it stays in sync with the current production environment. // // You can make changes to the databases in the green environment without // affecting production workloads. For example, you can upgrade the major or minor @@ -72,6 +71,13 @@ type CreateBlueGreenDeploymentInput struct { // Tags to assign to the blue/green deployment. Tags []types.Tag + // The amount of storage in gibibytes (GiB) to allocate for the green DB instance. + // You can choose to increase or decrease the allocated storage on the green DB + // instance. + // + // This setting doesn't apply to Amazon Aurora blue/green deployments. + TargetAllocatedStorage *int32 + // The DB cluster parameter group associated with the Aurora DB cluster in the // green environment. // @@ -99,6 +105,29 @@ type CreateBlueGreenDeploymentInput struct { // Specify the engine version to upgrade to in the green environment. TargetEngineVersion *string + // The amount of Provisioned IOPS (input/output operations per second) to allocate + // for the green DB instance. For information about valid IOPS values, see [Amazon RDS DB instance storage]in the + // Amazon RDS User Guide. + // + // This setting doesn't apply to Amazon Aurora blue/green deployments. + // + // [Amazon RDS DB instance storage]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html + TargetIops *int32 + + // The storage throughput value for the green DB instance. + // + // This setting applies only to the gp3 storage type. + // + // This setting doesn't apply to Amazon Aurora blue/green deployments. + TargetStorageThroughput *int32 + + // The storage type to associate with the green DB instance. + // + // Valid Values: gp2 | gp3 | io1 | io2 + // + // This setting doesn't apply to Amazon Aurora blue/green deployments. + TargetStorageType *string + // Whether to upgrade the storage file system configuration on the green database. // This option migrates the green DB instance from the older 32-bit file system to // the preferred configuration. For more information, see [Upgrading the storage file system for a DB instance]. diff --git a/service/rds/serializers.go b/service/rds/serializers.go index eae9ed552dc..000ee965283 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -12411,6 +12411,11 @@ func awsAwsquery_serializeOpDocumentCreateBlueGreenDeploymentInput(v *CreateBlue } } + if v.TargetAllocatedStorage != nil { + objectKey := object.Key("TargetAllocatedStorage") + objectKey.Integer(*v.TargetAllocatedStorage) + } + if v.TargetDBClusterParameterGroupName != nil { objectKey := object.Key("TargetDBClusterParameterGroupName") objectKey.String(*v.TargetDBClusterParameterGroupName) @@ -12431,6 +12436,21 @@ func awsAwsquery_serializeOpDocumentCreateBlueGreenDeploymentInput(v *CreateBlue objectKey.String(*v.TargetEngineVersion) } + if v.TargetIops != nil { + objectKey := object.Key("TargetIops") + objectKey.Integer(*v.TargetIops) + } + + if v.TargetStorageThroughput != nil { + objectKey := object.Key("TargetStorageThroughput") + objectKey.Integer(*v.TargetStorageThroughput) + } + + if v.TargetStorageType != nil { + objectKey := object.Key("TargetStorageType") + objectKey.String(*v.TargetStorageType) + } + if v.UpgradeTargetStorageConfig != nil { objectKey := object.Key("UpgradeTargetStorageConfig") objectKey.Boolean(*v.UpgradeTargetStorageConfig) diff --git a/service/timestreamquery/api_op_DescribeAccountSettings.go b/service/timestreamquery/api_op_DescribeAccountSettings.go index a16348421a3..2a09c91b7a3 100644 --- a/service/timestreamquery/api_op_DescribeAccountSettings.go +++ b/service/timestreamquery/api_op_DescribeAccountSettings.go @@ -38,12 +38,23 @@ type DescribeAccountSettingsInput struct { type DescribeAccountSettingsOutput struct { // The maximum number of [Timestream compute units] (TCUs) the service will use at any point in time to - // serve your queries. + // serve your queries. To run queries, you must set a minimum capacity of 4 TCU. + // You can set the maximum number of TCU in multiples of 4, for example, 4, 8, 16, + // 32, and so on. This configuration is applicable only for on-demand usage of + // (TCUs). // // [Timestream compute units]: https://docs.aws.amazon.com/timestream/latest/developerguide/tcu.html MaxQueryTCU *int32 + // An object that contains the usage settings for Timestream Compute Units (TCUs) + // in your account for the query workload. + QueryCompute *types.QueryComputeResponse + // The pricing model for queries in your account. + // + // The QueryPricingModel parameter is used by several Timestream operations; + // however, the UpdateAccountSettings API operation doesn't recognize any values + // other than COMPUTE_UNITS . QueryPricingModel types.QueryPricingModel // Metadata pertaining to the operation's result. diff --git a/service/timestreamquery/api_op_ExecuteScheduledQuery.go b/service/timestreamquery/api_op_ExecuteScheduledQuery.go index 4c19cc9c573..6311de4f9d0 100644 --- a/service/timestreamquery/api_op_ExecuteScheduledQuery.go +++ b/service/timestreamquery/api_op_ExecuteScheduledQuery.go @@ -17,7 +17,10 @@ import ( // // If you enabled QueryInsights , this API also returns insights and metrics // related to the query that you executed as part of an Amazon SNS notification. -// QueryInsights helps with performance tuning of your query. +// QueryInsights helps with performance tuning of your query. For more information +// about QueryInsights , see [Using query insights to optimize queries in Amazon Timestream]. +// +// [Using query insights to optimize queries in Amazon Timestream]: https://docs.aws.amazon.com/timestream/latest/developerguide/using-query-insights.html func (c *Client) ExecuteScheduledQuery(ctx context.Context, params *ExecuteScheduledQueryInput, optFns ...func(*Options)) (*ExecuteScheduledQueryOutput, error) { if params == nil { params = &ExecuteScheduledQueryInput{} diff --git a/service/timestreamquery/api_op_Query.go b/service/timestreamquery/api_op_Query.go index 7d65a94daa3..22bc7cb9c0b 100644 --- a/service/timestreamquery/api_op_Query.go +++ b/service/timestreamquery/api_op_Query.go @@ -17,7 +17,7 @@ import ( // // If you enabled QueryInsights , this API also returns insights and metrics // related to the query that you executed. QueryInsights helps with performance -// tuning of your query. +// tuning of your query. For more information about QueryInsights , see [Using query insights to optimize queries in Amazon Timestream]. // // The maximum number of Query API requests you're allowed to make with // QueryInsights enabled is 1 query per second (QPS). If you exceed this query @@ -47,6 +47,7 @@ import ( // pagination token error. // // [code sample]: https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.run-query.html +// [Using query insights to optimize queries in Amazon Timestream]: https://docs.aws.amazon.com/timestream/latest/developerguide/using-query-insights.html func (c *Client) Query(ctx context.Context, params *QueryInput, optFns ...func(*Options)) (*QueryOutput, error) { if params == nil { params = &QueryInput{} diff --git a/service/timestreamquery/api_op_UpdateAccountSettings.go b/service/timestreamquery/api_op_UpdateAccountSettings.go index befb64b95a7..da8e7fa1cc7 100644 --- a/service/timestreamquery/api_op_UpdateAccountSettings.go +++ b/service/timestreamquery/api_op_UpdateAccountSettings.go @@ -39,15 +39,27 @@ type UpdateAccountSettingsInput struct { // The maximum number of compute units the service will use at any point in time // to serve your queries. To run queries, you must set a minimum capacity of 4 TCU. // You can set the maximum number of TCU in multiples of 4, for example, 4, 8, 16, - // 32, and so on. + // 32, and so on. The maximum value supported for MaxQueryTCU is 1000. To request + // an increase to this soft limit, contact Amazon Web Services Support. For + // information about the default quota for maxQueryTCU, see Default quotas. This + // configuration is applicable only for on-demand usage of Timestream Compute Units + // (TCUs). // // The maximum value supported for MaxQueryTCU is 1000. To request an increase to // this soft limit, contact Amazon Web Services Support. For information about the - // default quota for maxQueryTCU, see [Default quotas]. + // default quota for maxQueryTCU , see [Default quotas]. // // [Default quotas]: https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.default MaxQueryTCU *int32 + // Modifies the query compute settings configured in your account, including the + // query pricing model and provisioned Timestream Compute Units (TCUs) in your + // account. + // + // This API is idempotent, meaning that making the same request multiple times + // will have the same effect as making the request once. + QueryCompute *types.QueryComputeRequest + // The pricing model for queries in an account. // // The QueryPricingModel parameter is used by several Timestream operations; @@ -64,6 +76,9 @@ type UpdateAccountSettingsOutput struct { // point in time to serve your queries. MaxQueryTCU *int32 + // Confirms the updated account settings for querying data in your account. + QueryCompute *types.QueryComputeResponse + // The pricing model for an account. QueryPricingModel types.QueryPricingModel @@ -140,6 +155,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addOpUpdateAccountSettingsValidationMiddleware(stack); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/timestreamquery/deserializers.go b/service/timestreamquery/deserializers.go index 11abf1fd71c..d8746078be6 100644 --- a/service/timestreamquery/deserializers.go +++ b/service/timestreamquery/deserializers.go @@ -2174,6 +2174,51 @@ func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } +func awsAwsjson10_deserializeDocumentAccountSettingsNotificationConfiguration(v **types.AccountSettingsNotificationConfiguration, 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.AccountSettingsNotificationConfiguration + if *v == nil { + sv = &types.AccountSettingsNotificationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "SnsConfiguration": + if err := awsAwsjson10_deserializeDocumentSnsConfiguration(&sv.SnsConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentColumnInfo(v **types.ColumnInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2822,6 +2867,68 @@ func awsAwsjson10_deserializeDocumentInvalidEndpointException(v **types.InvalidE return nil } +func awsAwsjson10_deserializeDocumentLastUpdate(v **types.LastUpdate, 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.LastUpdate + if *v == nil { + sv = &types.LastUpdate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value) + } + sv.Status = types.LastUpdateStatus(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "TargetQueryTCU": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected QueryTCU to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TargetQueryTCU = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentMixedMeasureMapping(v **types.MixedMeasureMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3216,6 +3323,105 @@ func awsAwsjson10_deserializeDocumentPartitionKeyList(v *[]string, value interfa return nil } +func awsAwsjson10_deserializeDocumentProvisionedCapacityResponse(v **types.ProvisionedCapacityResponse, 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.ProvisionedCapacityResponse + if *v == nil { + sv = &types.ProvisionedCapacityResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActiveQueryTCU": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected QueryTCU to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ActiveQueryTCU = ptr.Int32(int32(i64)) + } + + case "LastUpdate": + if err := awsAwsjson10_deserializeDocumentLastUpdate(&sv.LastUpdate, value); err != nil { + return err + } + + case "NotificationConfiguration": + if err := awsAwsjson10_deserializeDocumentAccountSettingsNotificationConfiguration(&sv.NotificationConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentQueryComputeResponse(v **types.QueryComputeResponse, 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.QueryComputeResponse + if *v == nil { + sv = &types.QueryComputeResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComputeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputeMode to be of type string, got %T instead", value) + } + sv.ComputeMode = types.ComputeMode(jtv) + } + + case "ProvisionedCapacity": + if err := awsAwsjson10_deserializeDocumentProvisionedCapacityResponse(&sv.ProvisionedCapacity, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentQueryExecutionException(v **types.QueryExecutionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5269,6 +5475,11 @@ func awsAwsjson10_deserializeOpDocumentDescribeAccountSettingsOutput(v **Describ sv.MaxQueryTCU = ptr.Int32(int32(i64)) } + case "QueryCompute": + if err := awsAwsjson10_deserializeDocumentQueryComputeResponse(&sv.QueryCompute, value); err != nil { + return err + } + case "QueryPricingModel": if value != nil { jtv, ok := value.(string) @@ -5665,6 +5876,11 @@ func awsAwsjson10_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAcc sv.MaxQueryTCU = ptr.Int32(int32(i64)) } + case "QueryCompute": + if err := awsAwsjson10_deserializeDocumentQueryComputeResponse(&sv.QueryCompute, value); err != nil { + return err + } + case "QueryPricingModel": if value != nil { jtv, ok := value.(string) diff --git a/service/timestreamquery/serializers.go b/service/timestreamquery/serializers.go index 7520a654dde..ae8993a3796 100644 --- a/service/timestreamquery/serializers.go +++ b/service/timestreamquery/serializers.go @@ -931,6 +931,25 @@ func (m *awsAwsjson10_serializeOpUpdateScheduledQuery) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } +func awsAwsjson10_serializeDocumentAccountSettingsNotificationConfiguration(v *types.AccountSettingsNotificationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RoleArn != nil { + ok := object.Key("RoleArn") + ok.String(*v.RoleArn) + } + + if v.SnsConfiguration != nil { + ok := object.Key("SnsConfiguration") + if err := awsAwsjson10_serializeDocumentSnsConfiguration(v.SnsConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeDocumentDimensionMapping(v *types.DimensionMapping, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1090,6 +1109,44 @@ func awsAwsjson10_serializeDocumentNotificationConfiguration(v *types.Notificati return nil } +func awsAwsjson10_serializeDocumentProvisionedCapacityRequest(v *types.ProvisionedCapacityRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NotificationConfiguration != nil { + ok := object.Key("NotificationConfiguration") + if err := awsAwsjson10_serializeDocumentAccountSettingsNotificationConfiguration(v.NotificationConfiguration, ok); err != nil { + return err + } + } + + if v.TargetQueryTCU != nil { + ok := object.Key("TargetQueryTCU") + ok.Integer(*v.TargetQueryTCU) + } + + return nil +} + +func awsAwsjson10_serializeDocumentQueryComputeRequest(v *types.QueryComputeRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ComputeMode) > 0 { + ok := object.Key("ComputeMode") + ok.String(string(v.ComputeMode)) + } + + if v.ProvisionedCapacity != nil { + ok := object.Key("ProvisionedCapacity") + if err := awsAwsjson10_serializeDocumentProvisionedCapacityRequest(v.ProvisionedCapacity, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeDocumentQueryInsights(v *types.QueryInsights, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1546,6 +1603,13 @@ func awsAwsjson10_serializeOpDocumentUpdateAccountSettingsInput(v *UpdateAccount ok.Integer(*v.MaxQueryTCU) } + if v.QueryCompute != nil { + ok := object.Key("QueryCompute") + if err := awsAwsjson10_serializeDocumentQueryComputeRequest(v.QueryCompute, ok); err != nil { + return err + } + } + if len(v.QueryPricingModel) > 0 { ok := object.Key("QueryPricingModel") ok.String(string(v.QueryPricingModel)) diff --git a/service/timestreamquery/snapshot/api_op_UpdateAccountSettings.go.snap b/service/timestreamquery/snapshot/api_op_UpdateAccountSettings.go.snap index 567ed625830..78d87f7cb5e 100644 --- a/service/timestreamquery/snapshot/api_op_UpdateAccountSettings.go.snap +++ b/service/timestreamquery/snapshot/api_op_UpdateAccountSettings.go.snap @@ -4,6 +4,7 @@ UpdateAccountSettings RegisterServiceMetadata legacyEndpointContextSetter SetLogger + OperationInputValidation spanInitializeEnd Serialize stack step spanBuildRequestStart diff --git a/service/timestreamquery/types/enums.go b/service/timestreamquery/types/enums.go index 928a7fe5dc2..3fe79d05555 100644 --- a/service/timestreamquery/types/enums.go +++ b/service/timestreamquery/types/enums.go @@ -2,6 +2,25 @@ package types +type ComputeMode string + +// Enum values for ComputeMode +const ( + ComputeModeOnDemand ComputeMode = "ON_DEMAND" + ComputeModeProvisioned ComputeMode = "PROVISIONED" +) + +// Values returns all known values for ComputeMode. 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 (ComputeMode) Values() []ComputeMode { + return []ComputeMode{ + "ON_DEMAND", + "PROVISIONED", + } +} + type DimensionValueType string // Enum values for DimensionValueType @@ -19,6 +38,27 @@ func (DimensionValueType) Values() []DimensionValueType { } } +type LastUpdateStatus string + +// Enum values for LastUpdateStatus +const ( + LastUpdateStatusPending LastUpdateStatus = "PENDING" + LastUpdateStatusFailed LastUpdateStatus = "FAILED" + LastUpdateStatusSucceeded LastUpdateStatus = "SUCCEEDED" +) + +// Values returns all known values for LastUpdateStatus. 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 (LastUpdateStatus) Values() []LastUpdateStatus { + return []LastUpdateStatus{ + "PENDING", + "FAILED", + "SUCCEEDED", + } +} + type MeasureValueType string // Enum values for MeasureValueType diff --git a/service/timestreamquery/types/errors.go b/service/timestreamquery/types/errors.go index 97b321faead..9c05f27b02d 100644 --- a/service/timestreamquery/types/errors.go +++ b/service/timestreamquery/types/errors.go @@ -7,7 +7,7 @@ import ( smithy "github.com/aws/smithy-go" ) -// You are not authorized to perform this action. +// You do not have the necessary permissions to access the account settings. type AccessDeniedException struct { Message *string @@ -59,9 +59,7 @@ func (e *ConflictException) ErrorCode() string { } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The service was unable to fully process this request because of an internal -// -// server error. +// An internal server error occurred while processing the request. type InternalServerException struct { Message *string @@ -87,7 +85,7 @@ func (e *InternalServerException) ErrorCode() string { } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// The requested endpoint was not valid. +// The requested endpoint is invalid. type InvalidEndpointException struct { Message *string @@ -193,7 +191,7 @@ func (e *ServiceQuotaExceededException) ErrorCode() string { } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The request was denied due to request throttling. +// The request was throttled due to excessive requests. type ThrottlingException struct { Message *string diff --git a/service/timestreamquery/types/types.go b/service/timestreamquery/types/types.go index 2d5b4fba1d7..9f9dfe41704 100644 --- a/service/timestreamquery/types/types.go +++ b/service/timestreamquery/types/types.go @@ -7,6 +7,22 @@ import ( "time" ) +// Configuration settings for notifications related to account settings. +type AccountSettingsNotificationConfiguration struct { + + // An Amazon Resource Name (ARN) that grants Timestream permission to publish + // notifications. This field is only visible if SNS Topic is provided when updating + // the account settings. + // + // This member is required. + RoleArn *string + + // Details on SNS that are required to send the notification. + SnsConfiguration *SnsConfiguration + + noSmithyDocumentSerde +} + // Contains the metadata for query results such as the column names, data types, // // and other attributes. @@ -129,6 +145,24 @@ type ExecutionStats struct { noSmithyDocumentSerde } +// Configuration object that contains the most recent account settings update, +// visible only if settings have been updated previously. +type LastUpdate struct { + + // The status of the last update. Can be either PENDING , FAILED , or SUCCEEDED . + Status LastUpdateStatus + + // Error message describing the last account settings update status, visible only + // if an error occurred. + StatusMessage *string + + // The number of TimeStream Compute Units (TCUs) requested in the last account + // settings update. + TargetQueryTCU *int32 + + noSmithyDocumentSerde +} + // MixedMeasureMappings are mappings that can be used to ingest data into a // mixture of narrow and multi measures in the derived table. type MixedMeasureMapping struct { @@ -202,7 +236,9 @@ type MultiMeasureMappings struct { // deleted. type NotificationConfiguration struct { - // Details on SNS configuration. + // Details about the Amazon Simple Notification Service (SNS) configuration. This + // field is visible only when SNS Topic is provided when updating the account + // settings. // // This member is required. SnsConfiguration *SnsConfiguration @@ -229,6 +265,72 @@ type ParameterMapping struct { noSmithyDocumentSerde } +// A request to update the provisioned capacity settings for querying data. +type ProvisionedCapacityRequest struct { + + // The target compute capacity for querying data, specified in Timestream Compute + // Units (TCUs). + // + // This member is required. + TargetQueryTCU *int32 + + // Configuration settings for notifications related to the provisioned capacity + // update. + NotificationConfiguration *AccountSettingsNotificationConfiguration + + noSmithyDocumentSerde +} + +// The response to a request to update the provisioned capacity settings for +// querying data. +type ProvisionedCapacityResponse struct { + + // The number of Timestream Compute Units (TCUs) provisioned in the account. This + // field is only visible when the compute mode is PROVISIONED . + ActiveQueryTCU *int32 + + // Information about the last update to the provisioned capacity settings. + LastUpdate *LastUpdate + + // An object that contains settings for notifications that are sent whenever the + // provisioned capacity settings are modified. This field is only visible when the + // compute mode is PROVISIONED . + NotificationConfiguration *AccountSettingsNotificationConfiguration + + noSmithyDocumentSerde +} + +// A request to retrieve or update the compute capacity settings for querying data. +type QueryComputeRequest struct { + + // The mode in which Timestream Compute Units (TCUs) are allocated and utilized + // within an account. Note that in the Asia Pacific (Mumbai) region, the API + // operation only recognizes the value PROVISIONED . + ComputeMode ComputeMode + + // Configuration object that contains settings for provisioned Timestream Compute + // Units (TCUs) in your account. + ProvisionedCapacity *ProvisionedCapacityRequest + + noSmithyDocumentSerde +} + +// The response to a request to retrieve or update the compute capacity settings +// for querying data. +type QueryComputeResponse struct { + + // The mode in which Timestream Compute Units (TCUs) are allocated and utilized + // within an account. Note that in the Asia Pacific (Mumbai) region, the API + // operation only recognizes the value PROVISIONED . + ComputeMode ComputeMode + + // Configuration object that contains settings for provisioned Timestream Compute + // Units (TCUs) in your account. + ProvisionedCapacity *ProvisionedCapacityResponse + + noSmithyDocumentSerde +} + // QueryInsights is a performance tuning feature that helps you optimize your // queries, reducing costs and improving performance. With QueryInsights , you can // assess the pruning efficiency of your queries and identify areas for improvement diff --git a/service/timestreamquery/validators.go b/service/timestreamquery/validators.go index 49505742ac9..3020a89d143 100644 --- a/service/timestreamquery/validators.go +++ b/service/timestreamquery/validators.go @@ -210,6 +210,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateAccountSettings struct { +} + +func (*validateOpUpdateAccountSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAccountSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAccountSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAccountSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateScheduledQuery struct { } @@ -270,10 +290,34 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateAccountSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAccountSettings{}, middleware.After) +} + func addOpUpdateScheduledQueryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateScheduledQuery{}, middleware.After) } +func validateAccountSettingsNotificationConfiguration(v *types.AccountSettingsNotificationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AccountSettingsNotificationConfiguration"} + if v.SnsConfiguration != nil { + if err := validateSnsConfiguration(v.SnsConfiguration); err != nil { + invalidParams.AddNested("SnsConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDimensionMapping(v *types.DimensionMapping) error { if v == nil { return nil @@ -438,6 +482,43 @@ func validateNotificationConfiguration(v *types.NotificationConfiguration) error } } +func validateProvisionedCapacityRequest(v *types.ProvisionedCapacityRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProvisionedCapacityRequest"} + if v.TargetQueryTCU == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetQueryTCU")) + } + if v.NotificationConfiguration != nil { + if err := validateAccountSettingsNotificationConfiguration(v.NotificationConfiguration); err != nil { + invalidParams.AddNested("NotificationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryComputeRequest(v *types.QueryComputeRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryComputeRequest"} + if v.ProvisionedCapacity != nil { + if err := validateProvisionedCapacityRequest(v.ProvisionedCapacity); err != nil { + invalidParams.AddNested("ProvisionedCapacity", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateQueryInsights(v *types.QueryInsights) error { if v == nil { return nil @@ -815,6 +896,23 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateAccountSettingsInput(v *UpdateAccountSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAccountSettingsInput"} + if v.QueryCompute != nil { + if err := validateQueryComputeRequest(v.QueryCompute); err != nil { + invalidParams.AddNested("QueryCompute", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateScheduledQueryInput(v *UpdateScheduledQueryInput) error { if v == nil { return nil diff --git a/service/vpclattice/internal/endpoints/endpoints.go b/service/vpclattice/internal/endpoints/endpoints.go index 2b0c4d75325..1f42064d070 100644 --- a/service/vpclattice/internal/endpoints/endpoints.go +++ b/service/vpclattice/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, diff --git a/service/workspaces/api_op_AcceptAccountLinkInvitation.go b/service/workspaces/api_op_AcceptAccountLinkInvitation.go index e10e6bcc074..11a0dab4e89 100644 --- a/service/workspaces/api_op_AcceptAccountLinkInvitation.go +++ b/service/workspaces/api_op_AcceptAccountLinkInvitation.go @@ -37,8 +37,8 @@ type AcceptAccountLinkInvitationInput struct { // This member is required. LinkId *string - // A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent - // creation. + // A string of up to 64 ASCII characters that Amazon WorkSpaces uses to ensure + // idempotent creation. ClientToken *string noSmithyDocumentSerde diff --git a/service/workspaces/api_op_CreateAccountLinkInvitation.go b/service/workspaces/api_op_CreateAccountLinkInvitation.go index 347f944922e..efcb4c03953 100644 --- a/service/workspaces/api_op_CreateAccountLinkInvitation.go +++ b/service/workspaces/api_op_CreateAccountLinkInvitation.go @@ -34,8 +34,8 @@ type CreateAccountLinkInvitationInput struct { // This member is required. TargetAccountId *string - // A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent - // creation. + // A string of up to 64 ASCII characters that Amazon WorkSpaces uses to ensure + // idempotent creation. ClientToken *string noSmithyDocumentSerde diff --git a/service/workspaces/api_op_CreateWorkspaces.go b/service/workspaces/api_op_CreateWorkspaces.go index ac7808010d6..1bb30061122 100644 --- a/service/workspaces/api_op_CreateWorkspaces.go +++ b/service/workspaces/api_op_CreateWorkspaces.go @@ -19,8 +19,8 @@ import ( // Contact your account team to be allow-listed to use this value. For more // information, see [Amazon WorkSpaces Core]. // -// - You don't need to specify the PCOIP protocol for Linux bundles because WSP -// is the default protocol for those bundles. +// - You don't need to specify the PCOIP protocol for Linux bundles because DCV +// (formerly WSP) is the default protocol for those bundles. // // - User-decoupled WorkSpaces are only supported by Amazon WorkSpaces Core. // diff --git a/service/workspaces/api_op_DeleteAccountLinkInvitation.go b/service/workspaces/api_op_DeleteAccountLinkInvitation.go index 56c295e0c27..16ccfc84bbd 100644 --- a/service/workspaces/api_op_DeleteAccountLinkInvitation.go +++ b/service/workspaces/api_op_DeleteAccountLinkInvitation.go @@ -34,8 +34,8 @@ type DeleteAccountLinkInvitationInput struct { // This member is required. LinkId *string - // A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent - // creation. + // A string of up to 64 ASCII characters that Amazon WorkSpaces uses to ensure + // idempotent creation. ClientToken *string noSmithyDocumentSerde diff --git a/service/workspaces/api_op_ImportWorkspaceImage.go b/service/workspaces/api_op_ImportWorkspaceImage.go index 65efc02e4c4..5ac8a6b8c4e 100644 --- a/service/workspaces/api_op_ImportWorkspaceImage.go +++ b/service/workspaces/api_op_ImportWorkspaceImage.go @@ -50,13 +50,13 @@ type ImportWorkspaceImageInput struct { ImageName *string // The ingestion process to be used when importing the image, depending on which - // protocol you want to use for your BYOL Workspace image, either PCoIP, WorkSpaces - // Streaming Protocol (WSP), or bring your own protocol (BYOP). To use WSP, specify - // a value that ends in _WSP . To use PCoIP, specify a value that does not end in - // _WSP . To use BYOP, specify a value that ends in _BYOP . + // protocol you want to use for your BYOL Workspace image, either PCoIP, DCV, or + // bring your own protocol (BYOP). To use WSP, specify a value that ends in _DCV . + // To use PCoIP, specify a value that does not end in _DCV . To use BYOP, specify a + // value that ends in _BYOP . // // For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), - // specify BYOL_REGULAR , BYOL_REGULAR_WSP , or BYOL_REGULAR_BYOP , depending on + // specify BYOL_REGULAR , BYOL_REGULAR_DCV , or BYOL_REGULAR_BYOP , depending on // the protocol. // // The BYOL_REGULAR_BYOP and BYOL_GRAPHICS_G4DN_BYOP values are only supported by @@ -74,9 +74,9 @@ type ImportWorkspaceImageInput struct { // // - Although this parameter is an array, only one item is allowed at this time. // - // - During the image import process, non-GPU WSP WorkSpaces with Windows 11 - // support only Microsoft_Office_2019 . GPU WSP WorkSpaces with Windows 11 do not - // support Office installation. + // - During the image import process, non-GPU DCV (formerly WSP) WorkSpaces with + // Windows 11 support only Microsoft_Office_2019 . GPU DCV (formerly WSP) + // WorkSpaces with Windows 11 do not support Office installation. // // [Bring Your Own Windows Desktop Licenses]: https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html Applications []types.Application diff --git a/service/workspaces/types/enums.go b/service/workspaces/types/enums.go index 11b1510300e..92b3ea72fbf 100644 --- a/service/workspaces/types/enums.go +++ b/service/workspaces/types/enums.go @@ -673,6 +673,7 @@ const ( OperatingSystemNameWindowsServer2019 OperatingSystemName = "WINDOWS_SERVER_2019" OperatingSystemNameWindowsServer2022 OperatingSystemName = "WINDOWS_SERVER_2022" OperatingSystemNameRhel8 OperatingSystemName = "RHEL_8" + OperatingSystemNameRocky8 OperatingSystemName = "ROCKY_8" ) // Values returns all known values for OperatingSystemName. Note that this can be @@ -693,6 +694,7 @@ func (OperatingSystemName) Values() []OperatingSystemName { "WINDOWS_SERVER_2019", "WINDOWS_SERVER_2022", "RHEL_8", + "ROCKY_8", } } diff --git a/service/workspaces/types/types.go b/service/workspaces/types/types.go index 4cdc604f472..d148fcb767c 100644 --- a/service/workspaces/types/types.go +++ b/service/workspaces/types/types.go @@ -1670,7 +1670,8 @@ type WorkspaceProperties struct { // // - Only available for WorkSpaces created with PCoIP bundles. // - // - The Protocols property is case sensitive. Ensure you use PCOIP or WSP . + // - The Protocols property is case sensitive. Ensure you use PCOIP or DCV + // (formerly WSP). // // - Unavailable for Windows 7 WorkSpaces and WorkSpaces using GPU-based bundles // (Graphics, GraphicsPro, Graphics.g4dn, and GraphicsPro.g4dn). diff --git a/service/workspacesweb/api_op_AssociateDataProtectionSettings.go b/service/workspacesweb/api_op_AssociateDataProtectionSettings.go new file mode 100644 index 00000000000..27941cc698a --- /dev/null +++ b/service/workspacesweb/api_op_AssociateDataProtectionSettings.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +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" +) + +// Associates a data protection settings resource with a web portal. +func (c *Client) AssociateDataProtectionSettings(ctx context.Context, params *AssociateDataProtectionSettingsInput, optFns ...func(*Options)) (*AssociateDataProtectionSettingsOutput, error) { + if params == nil { + params = &AssociateDataProtectionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateDataProtectionSettings", params, optFns, c.addOperationAssociateDataProtectionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateDataProtectionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateDataProtectionSettingsInput struct { + + // The ARN of the data protection settings. + // + // This member is required. + DataProtectionSettingsArn *string + + // The ARN of the web portal. + // + // This member is required. + PortalArn *string + + noSmithyDocumentSerde +} + +type AssociateDataProtectionSettingsOutput struct { + + // The ARN of the data protection settings resource. + // + // This member is required. + DataProtectionSettingsArn *string + + // The ARN of the web portal. + // + // This member is required. + PortalArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateDataProtectionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateDataProtectionSettings"); 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 = addSpanRetryLoop(stack, options); 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 = addOpAssociateDataProtectionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateDataProtectionSettings(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateDataProtectionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateDataProtectionSettings", + } +} diff --git a/service/workspacesweb/api_op_CreateDataProtectionSettings.go b/service/workspacesweb/api_op_CreateDataProtectionSettings.go new file mode 100644 index 00000000000..2410ae25b95 --- /dev/null +++ b/service/workspacesweb/api_op_CreateDataProtectionSettings.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workspacesweb/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a data protection settings resource that can be associated with a web +// portal. +func (c *Client) CreateDataProtectionSettings(ctx context.Context, params *CreateDataProtectionSettingsInput, optFns ...func(*Options)) (*CreateDataProtectionSettingsOutput, error) { + if params == nil { + params = &CreateDataProtectionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDataProtectionSettings", params, optFns, c.addOperationCreateDataProtectionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDataProtectionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateDataProtectionSettingsInput struct { + + // Additional encryption context of the data protection settings. + AdditionalEncryptionContext map[string]string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. Idempotency ensures that an API request completes only once. + // With an idempotent request, if the original request completes successfully, + // subsequent retries with the same client token returns the result from the + // original successful request. + // + // If you do not specify a client token, one is automatically generated by the + // Amazon Web Services SDK. + ClientToken *string + + // The custom managed key of the data protection settings. + CustomerManagedKey *string + + // The description of the data protection settings. + Description *string + + // The display name of the data protection settings. + DisplayName *string + + // The inline redaction configuration of the data protection settings that will be + // applied to all sessions. + InlineRedactionConfiguration *types.InlineRedactionConfiguration + + // The tags to add to the data protection settings resource. A tag is a key-value + // pair. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateDataProtectionSettingsOutput struct { + + // The ARN of the data protection settings resource. + // + // This member is required. + DataProtectionSettingsArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDataProtectionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDataProtectionSettings"); 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 = addSpanRetryLoop(stack, options); 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 = addIdempotencyToken_opCreateDataProtectionSettingsMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateDataProtectionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDataProtectionSettings(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateDataProtectionSettings struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateDataProtectionSettings) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateDataProtectionSettingsInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateDataProtectionSettingsMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateDataProtectionSettings{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateDataProtectionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateDataProtectionSettings", + } +} diff --git a/service/workspacesweb/api_op_DeleteDataProtectionSettings.go b/service/workspacesweb/api_op_DeleteDataProtectionSettings.go new file mode 100644 index 00000000000..5de62fd77a2 --- /dev/null +++ b/service/workspacesweb/api_op_DeleteDataProtectionSettings.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +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 data protection settings. +func (c *Client) DeleteDataProtectionSettings(ctx context.Context, params *DeleteDataProtectionSettingsInput, optFns ...func(*Options)) (*DeleteDataProtectionSettingsOutput, error) { + if params == nil { + params = &DeleteDataProtectionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDataProtectionSettings", params, optFns, c.addOperationDeleteDataProtectionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDataProtectionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDataProtectionSettingsInput struct { + + // The ARN of the data protection settings. + // + // This member is required. + DataProtectionSettingsArn *string + + noSmithyDocumentSerde +} + +type DeleteDataProtectionSettingsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDataProtectionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDataProtectionSettings"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteDataProtectionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDataProtectionSettings(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDataProtectionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDataProtectionSettings", + } +} diff --git a/service/workspacesweb/api_op_DisassociateDataProtectionSettings.go b/service/workspacesweb/api_op_DisassociateDataProtectionSettings.go new file mode 100644 index 00000000000..5e0d591c765 --- /dev/null +++ b/service/workspacesweb/api_op_DisassociateDataProtectionSettings.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +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" +) + +// Disassociates data protection settings from a web portal. +func (c *Client) DisassociateDataProtectionSettings(ctx context.Context, params *DisassociateDataProtectionSettingsInput, optFns ...func(*Options)) (*DisassociateDataProtectionSettingsOutput, error) { + if params == nil { + params = &DisassociateDataProtectionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateDataProtectionSettings", params, optFns, c.addOperationDisassociateDataProtectionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateDataProtectionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateDataProtectionSettingsInput struct { + + // The ARN of the web portal. + // + // This member is required. + PortalArn *string + + noSmithyDocumentSerde +} + +type DisassociateDataProtectionSettingsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateDataProtectionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateDataProtectionSettings"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDisassociateDataProtectionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateDataProtectionSettings(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateDataProtectionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateDataProtectionSettings", + } +} diff --git a/service/workspacesweb/api_op_GetDataProtectionSettings.go b/service/workspacesweb/api_op_GetDataProtectionSettings.go new file mode 100644 index 00000000000..85796c41c89 --- /dev/null +++ b/service/workspacesweb/api_op_GetDataProtectionSettings.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workspacesweb/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the data protection settings. +func (c *Client) GetDataProtectionSettings(ctx context.Context, params *GetDataProtectionSettingsInput, optFns ...func(*Options)) (*GetDataProtectionSettingsOutput, error) { + if params == nil { + params = &GetDataProtectionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDataProtectionSettings", params, optFns, c.addOperationGetDataProtectionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDataProtectionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDataProtectionSettingsInput struct { + + // The ARN of the data protection settings. + // + // This member is required. + DataProtectionSettingsArn *string + + noSmithyDocumentSerde +} + +type GetDataProtectionSettingsOutput struct { + + // The data protection settings. + DataProtectionSettings *types.DataProtectionSettings + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDataProtectionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDataProtectionSettings"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetDataProtectionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataProtectionSettings(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDataProtectionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDataProtectionSettings", + } +} diff --git a/service/workspacesweb/api_op_ListDataProtectionSettings.go b/service/workspacesweb/api_op_ListDataProtectionSettings.go new file mode 100644 index 00000000000..072f7655366 --- /dev/null +++ b/service/workspacesweb/api_op_ListDataProtectionSettings.go @@ -0,0 +1,256 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workspacesweb/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of data protection settings. +func (c *Client) ListDataProtectionSettings(ctx context.Context, params *ListDataProtectionSettingsInput, optFns ...func(*Options)) (*ListDataProtectionSettingsOutput, error) { + if params == nil { + params = &ListDataProtectionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDataProtectionSettings", params, optFns, c.addOperationListDataProtectionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDataProtectionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDataProtectionSettingsInput struct { + + // The maximum number of results to be included in the next page. + MaxResults *int32 + + // The pagination token used to retrieve the next page of results for this + // operation. + NextToken *string + + noSmithyDocumentSerde +} + +type ListDataProtectionSettingsOutput struct { + + // The data protection settings. + DataProtectionSettings []types.DataProtectionSettingsSummary + + // The pagination token used to retrieve the next page of results for this + // operation. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDataProtectionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDataProtectionSettings"); 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 = addSpanRetryLoop(stack, options); 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_opListDataProtectionSettings(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListDataProtectionSettingsPaginatorOptions is the paginator options for +// ListDataProtectionSettings +type ListDataProtectionSettingsPaginatorOptions struct { + // The maximum number of results to be included in the next page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDataProtectionSettingsPaginator is a paginator for +// ListDataProtectionSettings +type ListDataProtectionSettingsPaginator struct { + options ListDataProtectionSettingsPaginatorOptions + client ListDataProtectionSettingsAPIClient + params *ListDataProtectionSettingsInput + nextToken *string + firstPage bool +} + +// NewListDataProtectionSettingsPaginator returns a new +// ListDataProtectionSettingsPaginator +func NewListDataProtectionSettingsPaginator(client ListDataProtectionSettingsAPIClient, params *ListDataProtectionSettingsInput, optFns ...func(*ListDataProtectionSettingsPaginatorOptions)) *ListDataProtectionSettingsPaginator { + if params == nil { + params = &ListDataProtectionSettingsInput{} + } + + options := ListDataProtectionSettingsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDataProtectionSettingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDataProtectionSettingsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListDataProtectionSettings page. +func (p *ListDataProtectionSettingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDataProtectionSettingsOutput, 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.ListDataProtectionSettings(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 +} + +// ListDataProtectionSettingsAPIClient is a client that implements the +// ListDataProtectionSettings operation. +type ListDataProtectionSettingsAPIClient interface { + ListDataProtectionSettings(context.Context, *ListDataProtectionSettingsInput, ...func(*Options)) (*ListDataProtectionSettingsOutput, error) +} + +var _ ListDataProtectionSettingsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListDataProtectionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDataProtectionSettings", + } +} diff --git a/service/workspacesweb/api_op_UpdateDataProtectionSettings.go b/service/workspacesweb/api_op_UpdateDataProtectionSettings.go new file mode 100644 index 00000000000..887b9347274 --- /dev/null +++ b/service/workspacesweb/api_op_UpdateDataProtectionSettings.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspacesweb + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workspacesweb/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates data protection settings. +func (c *Client) UpdateDataProtectionSettings(ctx context.Context, params *UpdateDataProtectionSettingsInput, optFns ...func(*Options)) (*UpdateDataProtectionSettingsOutput, error) { + if params == nil { + params = &UpdateDataProtectionSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDataProtectionSettings", params, optFns, c.addOperationUpdateDataProtectionSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDataProtectionSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDataProtectionSettingsInput struct { + + // The ARN of the data protection settings. + // + // This member is required. + DataProtectionSettingsArn *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. Idempotency ensures that an API request completes only once. + // With an idempotent request, if the original request completes successfully, + // subsequent retries with the same client token return the result from the + // original successful request. + // + // If you do not specify a client token, one is automatically generated by the + // Amazon Web Services SDK. + ClientToken *string + + // The description of the data protection settings. + Description *string + + // The display name of the data protection settings. + DisplayName *string + + // The inline redaction configuration of the data protection settings that will be + // applied to all sessions. + InlineRedactionConfiguration *types.InlineRedactionConfiguration + + noSmithyDocumentSerde +} + +type UpdateDataProtectionSettingsOutput struct { + + // The data protection settings. + // + // This member is required. + DataProtectionSettings *types.DataProtectionSettings + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDataProtectionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDataProtectionSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDataProtectionSettings"); 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 = addSpanRetryLoop(stack, options); 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 = addIdempotencyToken_opUpdateDataProtectionSettingsMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateDataProtectionSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDataProtectionSettings(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpUpdateDataProtectionSettings struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateDataProtectionSettings) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateDataProtectionSettingsInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateDataProtectionSettingsMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateDataProtectionSettings{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateDataProtectionSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDataProtectionSettings", + } +} diff --git a/service/workspacesweb/deserializers.go b/service/workspacesweb/deserializers.go index 4ae3716e7a8..28ec9f89ec0 100644 --- a/service/workspacesweb/deserializers.go +++ b/service/workspacesweb/deserializers.go @@ -211,6 +211,186 @@ func awsRestjson1_deserializeOpDocumentAssociateBrowserSettingsOutput(v **Associ return nil } +type awsRestjson1_deserializeOpAssociateDataProtectionSettings struct { +} + +func (*awsRestjson1_deserializeOpAssociateDataProtectionSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAssociateDataProtectionSettings) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorAssociateDataProtectionSettings(response, &metadata) + } + output := &AssociateDataProtectionSettingsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentAssociateDataProtectionSettingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAssociateDataProtectionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAssociateDataProtectionSettingsOutput(v **AssociateDataProtectionSettingsOutput, 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 *AssociateDataProtectionSettingsOutput + if *v == nil { + sv = &AssociateDataProtectionSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dataProtectionSettingsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.DataProtectionSettingsArn = ptr.String(jtv) + } + + case "portalArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.PortalArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpAssociateIpAccessSettings struct { } @@ -1285,14 +1465,14 @@ func awsRestjson1_deserializeOpDocumentCreateBrowserSettingsOutput(v **CreateBro return nil } -type awsRestjson1_deserializeOpCreateIdentityProvider struct { +type awsRestjson1_deserializeOpCreateDataProtectionSettings struct { } -func (*awsRestjson1_deserializeOpCreateIdentityProvider) ID() string { +func (*awsRestjson1_deserializeOpCreateDataProtectionSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDataProtectionSettings) 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) @@ -1310,9 +1490,9 @@ func (m *awsRestjson1_deserializeOpCreateIdentityProvider) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateIdentityProvider(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDataProtectionSettings(response, &metadata) } - output := &CreateIdentityProviderOutput{} + output := &CreateDataProtectionSettingsOutput{} out.Result = output var buff [1024]byte @@ -1333,7 +1513,7 @@ func (m *awsRestjson1_deserializeOpCreateIdentityProvider) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateIdentityProviderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDataProtectionSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1347,7 +1527,7 @@ func (m *awsRestjson1_deserializeOpCreateIdentityProvider) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDataProtectionSettings(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)} @@ -1419,7 +1599,7 @@ func awsRestjson1_deserializeOpErrorCreateIdentityProvider(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateIdentityProviderOutput(v **CreateIdentityProviderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDataProtectionSettingsOutput(v **CreateDataProtectionSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1432,22 +1612,22 @@ func awsRestjson1_deserializeOpDocumentCreateIdentityProviderOutput(v **CreateId return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateIdentityProviderOutput + var sv *CreateDataProtectionSettingsOutput if *v == nil { - sv = &CreateIdentityProviderOutput{} + sv = &CreateDataProtectionSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "identityProviderArn": + case "dataProtectionSettingsArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubresourceARN to be of type string, got %T instead", value) + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.IdentityProviderArn = ptr.String(jtv) + sv.DataProtectionSettingsArn = ptr.String(jtv) } default: @@ -1459,14 +1639,14 @@ func awsRestjson1_deserializeOpDocumentCreateIdentityProviderOutput(v **CreateId return nil } -type awsRestjson1_deserializeOpCreateIpAccessSettings struct { +type awsRestjson1_deserializeOpCreateIdentityProvider struct { } -func (*awsRestjson1_deserializeOpCreateIpAccessSettings) ID() string { +func (*awsRestjson1_deserializeOpCreateIdentityProvider) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateIpAccessSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateIdentityProvider) 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) @@ -1484,9 +1664,9 @@ func (m *awsRestjson1_deserializeOpCreateIpAccessSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateIpAccessSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateIdentityProvider(response, &metadata) } - output := &CreateIpAccessSettingsOutput{} + output := &CreateIdentityProviderOutput{} out.Result = output var buff [1024]byte @@ -1507,7 +1687,7 @@ func (m *awsRestjson1_deserializeOpCreateIpAccessSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateIpAccessSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateIdentityProviderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1521,7 +1701,7 @@ func (m *awsRestjson1_deserializeOpCreateIpAccessSettings) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateIpAccessSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateIdentityProvider(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)} @@ -1571,6 +1751,9 @@ func awsRestjson1_deserializeOpErrorCreateIpAccessSettings(response *smithyhttp. case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1590,7 +1773,7 @@ func awsRestjson1_deserializeOpErrorCreateIpAccessSettings(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateIpAccessSettingsOutput(v **CreateIpAccessSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateIdentityProviderOutput(v **CreateIdentityProviderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1603,22 +1786,22 @@ func awsRestjson1_deserializeOpDocumentCreateIpAccessSettingsOutput(v **CreateIp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateIpAccessSettingsOutput + var sv *CreateIdentityProviderOutput if *v == nil { - sv = &CreateIpAccessSettingsOutput{} + sv = &CreateIdentityProviderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ipAccessSettingsArn": + case "identityProviderArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + return fmt.Errorf("expected SubresourceARN to be of type string, got %T instead", value) } - sv.IpAccessSettingsArn = ptr.String(jtv) + sv.IdentityProviderArn = ptr.String(jtv) } default: @@ -1630,14 +1813,14 @@ func awsRestjson1_deserializeOpDocumentCreateIpAccessSettingsOutput(v **CreateIp return nil } -type awsRestjson1_deserializeOpCreateNetworkSettings struct { +type awsRestjson1_deserializeOpCreateIpAccessSettings struct { } -func (*awsRestjson1_deserializeOpCreateNetworkSettings) ID() string { +func (*awsRestjson1_deserializeOpCreateIpAccessSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateNetworkSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateIpAccessSettings) 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) @@ -1655,9 +1838,9 @@ func (m *awsRestjson1_deserializeOpCreateNetworkSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateNetworkSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateIpAccessSettings(response, &metadata) } - output := &CreateNetworkSettingsOutput{} + output := &CreateIpAccessSettingsOutput{} out.Result = output var buff [1024]byte @@ -1678,7 +1861,7 @@ func (m *awsRestjson1_deserializeOpCreateNetworkSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateNetworkSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateIpAccessSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1692,7 +1875,7 @@ func (m *awsRestjson1_deserializeOpCreateNetworkSettings) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateNetworkSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateIpAccessSettings(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)} @@ -1761,7 +1944,7 @@ func awsRestjson1_deserializeOpErrorCreateNetworkSettings(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentCreateNetworkSettingsOutput(v **CreateNetworkSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateIpAccessSettingsOutput(v **CreateIpAccessSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1774,22 +1957,22 @@ func awsRestjson1_deserializeOpDocumentCreateNetworkSettingsOutput(v **CreateNet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateNetworkSettingsOutput + var sv *CreateIpAccessSettingsOutput if *v == nil { - sv = &CreateNetworkSettingsOutput{} + sv = &CreateIpAccessSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "networkSettingsArn": + case "ipAccessSettingsArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.NetworkSettingsArn = ptr.String(jtv) + sv.IpAccessSettingsArn = ptr.String(jtv) } default: @@ -1801,14 +1984,14 @@ func awsRestjson1_deserializeOpDocumentCreateNetworkSettingsOutput(v **CreateNet return nil } -type awsRestjson1_deserializeOpCreatePortal struct { +type awsRestjson1_deserializeOpCreateNetworkSettings struct { } -func (*awsRestjson1_deserializeOpCreatePortal) ID() string { +func (*awsRestjson1_deserializeOpCreateNetworkSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreatePortal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateNetworkSettings) 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) @@ -1826,9 +2009,9 @@ func (m *awsRestjson1_deserializeOpCreatePortal) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreatePortal(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateNetworkSettings(response, &metadata) } - output := &CreatePortalOutput{} + output := &CreateNetworkSettingsOutput{} out.Result = output var buff [1024]byte @@ -1849,7 +2032,7 @@ func (m *awsRestjson1_deserializeOpCreatePortal) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreatePortalOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateNetworkSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1863,7 +2046,7 @@ func (m *awsRestjson1_deserializeOpCreatePortal) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreatePortal(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateNetworkSettings(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)} @@ -1913,9 +2096,6 @@ func awsRestjson1_deserializeOpErrorCreatePortal(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1935,7 +2115,7 @@ func awsRestjson1_deserializeOpErrorCreatePortal(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreatePortalOutput(v **CreatePortalOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateNetworkSettingsOutput(v **CreateNetworkSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1948,7 +2128,181 @@ func awsRestjson1_deserializeOpDocumentCreatePortalOutput(v **CreatePortalOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreatePortalOutput + var sv *CreateNetworkSettingsOutput + if *v == nil { + sv = &CreateNetworkSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSettingsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.NetworkSettingsArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreatePortal struct { +} + +func (*awsRestjson1_deserializeOpCreatePortal) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreatePortal) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreatePortal(response, &metadata) + } + output := &CreatePortalOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreatePortalOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreatePortal(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreatePortalOutput(v **CreatePortalOutput, 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 *CreatePortalOutput if *v == nil { sv = &CreatePortalOutput{} } else { @@ -2597,14 +2951,14 @@ func awsRestjson1_deserializeOpErrorDeleteBrowserSettings(response *smithyhttp.R } } -type awsRestjson1_deserializeOpDeleteIdentityProvider struct { +type awsRestjson1_deserializeOpDeleteDataProtectionSettings struct { } -func (*awsRestjson1_deserializeOpDeleteIdentityProvider) ID() string { +func (*awsRestjson1_deserializeOpDeleteDataProtectionSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDataProtectionSettings) 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) @@ -2622,16 +2976,16 @@ func (m *awsRestjson1_deserializeOpDeleteIdentityProvider) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteIdentityProvider(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataProtectionSettings(response, &metadata) } - output := &DeleteIdentityProviderOutput{} + output := &DeleteDataProtectionSettingsOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDataProtectionSettings(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)} @@ -2697,14 +3051,14 @@ func awsRestjson1_deserializeOpErrorDeleteIdentityProvider(response *smithyhttp. } } -type awsRestjson1_deserializeOpDeleteIpAccessSettings struct { +type awsRestjson1_deserializeOpDeleteIdentityProvider struct { } -func (*awsRestjson1_deserializeOpDeleteIpAccessSettings) ID() string { +func (*awsRestjson1_deserializeOpDeleteIdentityProvider) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteIpAccessSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIdentityProvider) 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) @@ -2722,16 +3076,16 @@ func (m *awsRestjson1_deserializeOpDeleteIpAccessSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteIpAccessSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIdentityProvider(response, &metadata) } - output := &DeleteIpAccessSettingsOutput{} + output := &DeleteIdentityProviderOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteIpAccessSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIdentityProvider(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)} @@ -2797,14 +3151,14 @@ func awsRestjson1_deserializeOpErrorDeleteIpAccessSettings(response *smithyhttp. } } -type awsRestjson1_deserializeOpDeleteNetworkSettings struct { +type awsRestjson1_deserializeOpDeleteIpAccessSettings struct { } -func (*awsRestjson1_deserializeOpDeleteNetworkSettings) ID() string { +func (*awsRestjson1_deserializeOpDeleteIpAccessSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteNetworkSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIpAccessSettings) 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) @@ -2822,16 +3176,16 @@ func (m *awsRestjson1_deserializeOpDeleteNetworkSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteNetworkSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIpAccessSettings(response, &metadata) } - output := &DeleteNetworkSettingsOutput{} + output := &DeleteIpAccessSettingsOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteNetworkSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIpAccessSettings(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)} @@ -2897,14 +3251,14 @@ func awsRestjson1_deserializeOpErrorDeleteNetworkSettings(response *smithyhttp.R } } -type awsRestjson1_deserializeOpDeletePortal struct { +type awsRestjson1_deserializeOpDeleteNetworkSettings struct { } -func (*awsRestjson1_deserializeOpDeletePortal) ID() string { +func (*awsRestjson1_deserializeOpDeleteNetworkSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeletePortal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteNetworkSettings) 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) @@ -2922,16 +3276,16 @@ func (m *awsRestjson1_deserializeOpDeletePortal) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeletePortal(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteNetworkSettings(response, &metadata) } - output := &DeletePortalOutput{} + output := &DeleteNetworkSettingsOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeletePortal(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteNetworkSettings(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)} @@ -2997,14 +3351,14 @@ func awsRestjson1_deserializeOpErrorDeletePortal(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteTrustStore struct { +type awsRestjson1_deserializeOpDeletePortal struct { } -func (*awsRestjson1_deserializeOpDeleteTrustStore) ID() string { +func (*awsRestjson1_deserializeOpDeletePortal) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTrustStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePortal) 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) @@ -3022,16 +3376,16 @@ func (m *awsRestjson1_deserializeOpDeleteTrustStore) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTrustStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePortal(response, &metadata) } - output := &DeleteTrustStoreOutput{} + output := &DeletePortalOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTrustStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePortal(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)} @@ -3097,14 +3451,14 @@ func awsRestjson1_deserializeOpErrorDeleteTrustStore(response *smithyhttp.Respon } } -type awsRestjson1_deserializeOpDeleteUserAccessLoggingSettings struct { +type awsRestjson1_deserializeOpDeleteTrustStore struct { } -func (*awsRestjson1_deserializeOpDeleteUserAccessLoggingSettings) ID() string { +func (*awsRestjson1_deserializeOpDeleteTrustStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUserAccessLoggingSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTrustStore) 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) @@ -3122,16 +3476,16 @@ func (m *awsRestjson1_deserializeOpDeleteUserAccessLoggingSettings) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserAccessLoggingSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTrustStore(response, &metadata) } - output := &DeleteUserAccessLoggingSettingsOutput{} + output := &DeleteTrustStoreOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUserAccessLoggingSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTrustStore(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)} @@ -3197,14 +3551,14 @@ func awsRestjson1_deserializeOpErrorDeleteUserAccessLoggingSettings(response *sm } } -type awsRestjson1_deserializeOpDeleteUserSettings struct { +type awsRestjson1_deserializeOpDeleteUserAccessLoggingSettings struct { } -func (*awsRestjson1_deserializeOpDeleteUserSettings) ID() string { +func (*awsRestjson1_deserializeOpDeleteUserAccessLoggingSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUserSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUserAccessLoggingSettings) 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) @@ -3222,16 +3576,16 @@ func (m *awsRestjson1_deserializeOpDeleteUserSettings) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserAccessLoggingSettings(response, &metadata) } - output := &DeleteUserSettingsOutput{} + output := &DeleteUserAccessLoggingSettingsOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUserAccessLoggingSettings(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)} @@ -3297,10 +3651,110 @@ func awsRestjson1_deserializeOpErrorDeleteUserSettings(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpDisassociateBrowserSettings struct { +type awsRestjson1_deserializeOpDeleteUserSettings struct { } -func (*awsRestjson1_deserializeOpDisassociateBrowserSettings) ID() string { +func (*awsRestjson1_deserializeOpDeleteUserSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteUserSettings) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserSettings(response, &metadata) + } + output := &DeleteUserSettingsOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDisassociateBrowserSettings struct { +} + +func (*awsRestjson1_deserializeOpDisassociateBrowserSettings) ID() string { return "OperationDeserializer" } @@ -3400,6 +3854,109 @@ func awsRestjson1_deserializeOpErrorDisassociateBrowserSettings(response *smithy } } +type awsRestjson1_deserializeOpDisassociateDataProtectionSettings struct { +} + +func (*awsRestjson1_deserializeOpDisassociateDataProtectionSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateDataProtectionSettings) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateDataProtectionSettings(response, &metadata) + } + output := &DisassociateDataProtectionSettingsOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateDataProtectionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDisassociateIpAccessSettings struct { } @@ -4179,14 +4736,14 @@ func awsRestjson1_deserializeOpDocumentGetBrowserSettingsOutput(v **GetBrowserSe return nil } -type awsRestjson1_deserializeOpGetIdentityProvider struct { +type awsRestjson1_deserializeOpGetDataProtectionSettings struct { } -func (*awsRestjson1_deserializeOpGetIdentityProvider) ID() string { +func (*awsRestjson1_deserializeOpGetDataProtectionSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDataProtectionSettings) 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) @@ -4204,9 +4761,9 @@ func (m *awsRestjson1_deserializeOpGetIdentityProvider) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetIdentityProvider(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDataProtectionSettings(response, &metadata) } - output := &GetIdentityProviderOutput{} + output := &GetDataProtectionSettingsOutput{} out.Result = output var buff [1024]byte @@ -4227,7 +4784,7 @@ func (m *awsRestjson1_deserializeOpGetIdentityProvider) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetIdentityProviderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDataProtectionSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4241,7 +4798,7 @@ func (m *awsRestjson1_deserializeOpGetIdentityProvider) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDataProtectionSettings(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)} @@ -4307,7 +4864,7 @@ func awsRestjson1_deserializeOpErrorGetIdentityProvider(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetIdentityProviderOutput(v **GetIdentityProviderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDataProtectionSettingsOutput(v **GetDataProtectionSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4320,17 +4877,17 @@ func awsRestjson1_deserializeOpDocumentGetIdentityProviderOutput(v **GetIdentity return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetIdentityProviderOutput + var sv *GetDataProtectionSettingsOutput if *v == nil { - sv = &GetIdentityProviderOutput{} + sv = &GetDataProtectionSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "identityProvider": - if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { + case "dataProtectionSettings": + if err := awsRestjson1_deserializeDocumentDataProtectionSettings(&sv.DataProtectionSettings, value); err != nil { return err } @@ -4343,14 +4900,14 @@ func awsRestjson1_deserializeOpDocumentGetIdentityProviderOutput(v **GetIdentity return nil } -type awsRestjson1_deserializeOpGetIpAccessSettings struct { +type awsRestjson1_deserializeOpGetIdentityProvider struct { } -func (*awsRestjson1_deserializeOpGetIpAccessSettings) ID() string { +func (*awsRestjson1_deserializeOpGetIdentityProvider) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetIpAccessSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIdentityProvider) 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) @@ -4368,9 +4925,9 @@ func (m *awsRestjson1_deserializeOpGetIpAccessSettings) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetIpAccessSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIdentityProvider(response, &metadata) } - output := &GetIpAccessSettingsOutput{} + output := &GetIdentityProviderOutput{} out.Result = output var buff [1024]byte @@ -4391,7 +4948,7 @@ func (m *awsRestjson1_deserializeOpGetIpAccessSettings) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetIpAccessSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIdentityProviderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4405,7 +4962,7 @@ func (m *awsRestjson1_deserializeOpGetIpAccessSettings) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetIpAccessSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIdentityProvider(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)} @@ -4471,7 +5028,7 @@ func awsRestjson1_deserializeOpErrorGetIpAccessSettings(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetIpAccessSettingsOutput(v **GetIpAccessSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIdentityProviderOutput(v **GetIdentityProviderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4484,17 +5041,17 @@ func awsRestjson1_deserializeOpDocumentGetIpAccessSettingsOutput(v **GetIpAccess return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetIpAccessSettingsOutput + var sv *GetIdentityProviderOutput if *v == nil { - sv = &GetIpAccessSettingsOutput{} + sv = &GetIdentityProviderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ipAccessSettings": - if err := awsRestjson1_deserializeDocumentIpAccessSettings(&sv.IpAccessSettings, value); err != nil { + case "identityProvider": + if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { return err } @@ -4507,14 +5064,14 @@ func awsRestjson1_deserializeOpDocumentGetIpAccessSettingsOutput(v **GetIpAccess return nil } -type awsRestjson1_deserializeOpGetNetworkSettings struct { +type awsRestjson1_deserializeOpGetIpAccessSettings struct { } -func (*awsRestjson1_deserializeOpGetNetworkSettings) ID() string { +func (*awsRestjson1_deserializeOpGetIpAccessSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetNetworkSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIpAccessSettings) 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) @@ -4532,9 +5089,9 @@ func (m *awsRestjson1_deserializeOpGetNetworkSettings) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIpAccessSettings(response, &metadata) } - output := &GetNetworkSettingsOutput{} + output := &GetIpAccessSettingsOutput{} out.Result = output var buff [1024]byte @@ -4555,7 +5112,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkSettings) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetNetworkSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIpAccessSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4569,7 +5126,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkSettings) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetNetworkSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIpAccessSettings(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)} @@ -4635,7 +5192,7 @@ func awsRestjson1_deserializeOpErrorGetNetworkSettings(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentGetNetworkSettingsOutput(v **GetNetworkSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIpAccessSettingsOutput(v **GetIpAccessSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4648,18 +5205,182 @@ func awsRestjson1_deserializeOpDocumentGetNetworkSettingsOutput(v **GetNetworkSe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetNetworkSettingsOutput + var sv *GetIpAccessSettingsOutput if *v == nil { - sv = &GetNetworkSettingsOutput{} + sv = &GetIpAccessSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "networkSettings": - if err := awsRestjson1_deserializeDocumentNetworkSettings(&sv.NetworkSettings, value); err != nil { - return err + case "ipAccessSettings": + if err := awsRestjson1_deserializeDocumentIpAccessSettings(&sv.IpAccessSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetNetworkSettings struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkSettings) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkSettings(response, &metadata) + } + output := &GetNetworkSettingsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetNetworkSettingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetworkSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetNetworkSettingsOutput(v **GetNetworkSettingsOutput, 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 *GetNetworkSettingsOutput + if *v == nil { + sv = &GetNetworkSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSettings": + if err := awsRestjson1_deserializeDocumentNetworkSettings(&sv.NetworkSettings, value); err != nil { + return err } default: @@ -6011,14 +6732,14 @@ func awsRestjson1_deserializeOpDocumentListBrowserSettingsOutput(v **ListBrowser return nil } -type awsRestjson1_deserializeOpListIdentityProviders struct { +type awsRestjson1_deserializeOpListDataProtectionSettings struct { } -func (*awsRestjson1_deserializeOpListIdentityProviders) ID() string { +func (*awsRestjson1_deserializeOpListDataProtectionSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDataProtectionSettings) 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) @@ -6036,9 +6757,9 @@ func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIdentityProviders(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDataProtectionSettings(response, &metadata) } - output := &ListIdentityProvidersOutput{} + output := &ListDataProtectionSettingsOutput{} out.Result = output var buff [1024]byte @@ -6059,7 +6780,7 @@ func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDataProtectionSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6073,7 +6794,7 @@ func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIdentityProviders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDataProtectionSettings(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)} @@ -6136,7 +6857,7 @@ func awsRestjson1_deserializeOpErrorListIdentityProviders(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdentityProvidersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDataProtectionSettingsOutput(v **ListDataProtectionSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6149,17 +6870,17 @@ func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdent return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIdentityProvidersOutput + var sv *ListDataProtectionSettingsOutput if *v == nil { - sv = &ListIdentityProvidersOutput{} + sv = &ListDataProtectionSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "identityProviders": - if err := awsRestjson1_deserializeDocumentIdentityProviderList(&sv.IdentityProviders, value); err != nil { + case "dataProtectionSettings": + if err := awsRestjson1_deserializeDocumentDataProtectionSettingsList(&sv.DataProtectionSettings, value); err != nil { return err } @@ -6181,14 +6902,14 @@ func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdent return nil } -type awsRestjson1_deserializeOpListIpAccessSettings struct { +type awsRestjson1_deserializeOpListIdentityProviders struct { } -func (*awsRestjson1_deserializeOpListIpAccessSettings) ID() string { +func (*awsRestjson1_deserializeOpListIdentityProviders) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIpAccessSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIdentityProviders) 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) @@ -6206,9 +6927,9 @@ func (m *awsRestjson1_deserializeOpListIpAccessSettings) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIpAccessSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIdentityProviders(response, &metadata) } - output := &ListIpAccessSettingsOutput{} + output := &ListIdentityProvidersOutput{} out.Result = output var buff [1024]byte @@ -6229,7 +6950,7 @@ func (m *awsRestjson1_deserializeOpListIpAccessSettings) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIpAccessSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6243,7 +6964,7 @@ func (m *awsRestjson1_deserializeOpListIpAccessSettings) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIpAccessSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIdentityProviders(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)} @@ -6306,7 +7027,7 @@ func awsRestjson1_deserializeOpErrorListIpAccessSettings(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListIpAccessSettingsOutput(v **ListIpAccessSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdentityProvidersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6319,17 +7040,17 @@ func awsRestjson1_deserializeOpDocumentListIpAccessSettingsOutput(v **ListIpAcce return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIpAccessSettingsOutput + var sv *ListIdentityProvidersOutput if *v == nil { - sv = &ListIpAccessSettingsOutput{} + sv = &ListIdentityProvidersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ipAccessSettings": - if err := awsRestjson1_deserializeDocumentIpAccessSettingsList(&sv.IpAccessSettings, value); err != nil { + case "identityProviders": + if err := awsRestjson1_deserializeDocumentIdentityProviderList(&sv.IdentityProviders, value); err != nil { return err } @@ -6351,14 +7072,14 @@ func awsRestjson1_deserializeOpDocumentListIpAccessSettingsOutput(v **ListIpAcce return nil } -type awsRestjson1_deserializeOpListNetworkSettings struct { +type awsRestjson1_deserializeOpListIpAccessSettings struct { } -func (*awsRestjson1_deserializeOpListNetworkSettings) ID() string { +func (*awsRestjson1_deserializeOpListIpAccessSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListNetworkSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIpAccessSettings) 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) @@ -6376,9 +7097,9 @@ func (m *awsRestjson1_deserializeOpListNetworkSettings) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListNetworkSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIpAccessSettings(response, &metadata) } - output := &ListNetworkSettingsOutput{} + output := &ListIpAccessSettingsOutput{} out.Result = output var buff [1024]byte @@ -6399,7 +7120,7 @@ func (m *awsRestjson1_deserializeOpListNetworkSettings) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListNetworkSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIpAccessSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6413,7 +7134,7 @@ func (m *awsRestjson1_deserializeOpListNetworkSettings) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListNetworkSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIpAccessSettings(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)} @@ -6476,7 +7197,7 @@ func awsRestjson1_deserializeOpErrorListNetworkSettings(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListNetworkSettingsOutput(v **ListNetworkSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIpAccessSettingsOutput(v **ListIpAccessSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6489,17 +7210,17 @@ func awsRestjson1_deserializeOpDocumentListNetworkSettingsOutput(v **ListNetwork return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListNetworkSettingsOutput + var sv *ListIpAccessSettingsOutput if *v == nil { - sv = &ListNetworkSettingsOutput{} + sv = &ListIpAccessSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "networkSettings": - if err := awsRestjson1_deserializeDocumentNetworkSettingsList(&sv.NetworkSettings, value); err != nil { + case "ipAccessSettings": + if err := awsRestjson1_deserializeDocumentIpAccessSettingsList(&sv.IpAccessSettings, value); err != nil { return err } @@ -6521,14 +7242,14 @@ func awsRestjson1_deserializeOpDocumentListNetworkSettingsOutput(v **ListNetwork return nil } -type awsRestjson1_deserializeOpListPortals struct { +type awsRestjson1_deserializeOpListNetworkSettings struct { } -func (*awsRestjson1_deserializeOpListPortals) ID() string { +func (*awsRestjson1_deserializeOpListNetworkSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListNetworkSettings) 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) @@ -6546,9 +7267,9 @@ func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPortals(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListNetworkSettings(response, &metadata) } - output := &ListPortalsOutput{} + output := &ListNetworkSettingsOutput{} out.Result = output var buff [1024]byte @@ -6569,7 +7290,7 @@ func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListPortalsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListNetworkSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6583,7 +7304,7 @@ func (m *awsRestjson1_deserializeOpListPortals) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListPortals(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListNetworkSettings(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)} @@ -6646,7 +7367,7 @@ func awsRestjson1_deserializeOpErrorListPortals(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListNetworkSettingsOutput(v **ListNetworkSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6659,15 +7380,20 @@ func awsRestjson1_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListPortalsOutput + var sv *ListNetworkSettingsOutput if *v == nil { - sv = &ListPortalsOutput{} + sv = &ListNetworkSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "networkSettings": + if err := awsRestjson1_deserializeDocumentNetworkSettingsList(&sv.NetworkSettings, value); err != nil { + return err + } + case "nextToken": if value != nil { jtv, ok := value.(string) @@ -6677,10 +7403,175 @@ func awsRestjson1_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, sv.NextToken = ptr.String(jtv) } - case "portals": - if err := awsRestjson1_deserializeDocumentPortalList(&sv.Portals, value); err != nil { - return err - } + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListPortals struct { +} + +func (*awsRestjson1_deserializeOpListPortals) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListPortals) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListPortals(response, &metadata) + } + output := &ListPortalsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListPortalsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListPortals(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListPortalsOutput(v **ListPortalsOutput, 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 *ListPortalsOutput + if *v == nil { + sv = &ListPortalsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "portals": + if err := awsRestjson1_deserializeDocumentPortalList(&sv.Portals, value); err != nil { + return err + } default: _, _ = key, value @@ -8087,14 +8978,14 @@ func awsRestjson1_deserializeOpDocumentUpdateBrowserSettingsOutput(v **UpdateBro return nil } -type awsRestjson1_deserializeOpUpdateIdentityProvider struct { +type awsRestjson1_deserializeOpUpdateDataProtectionSettings struct { } -func (*awsRestjson1_deserializeOpUpdateIdentityProvider) ID() string { +func (*awsRestjson1_deserializeOpUpdateDataProtectionSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDataProtectionSettings) 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) @@ -8112,9 +9003,9 @@ func (m *awsRestjson1_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateIdentityProvider(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataProtectionSettings(response, &metadata) } - output := &UpdateIdentityProviderOutput{} + output := &UpdateDataProtectionSettingsOutput{} out.Result = output var buff [1024]byte @@ -8135,7 +9026,7 @@ func (m *awsRestjson1_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateIdentityProviderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDataProtectionSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8149,7 +9040,7 @@ func (m *awsRestjson1_deserializeOpUpdateIdentityProvider) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDataProtectionSettings(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)} @@ -8215,7 +9106,7 @@ func awsRestjson1_deserializeOpErrorUpdateIdentityProvider(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderOutput(v **UpdateIdentityProviderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDataProtectionSettingsOutput(v **UpdateDataProtectionSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8228,17 +9119,17 @@ func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderOutput(v **UpdateId return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateIdentityProviderOutput + var sv *UpdateDataProtectionSettingsOutput if *v == nil { - sv = &UpdateIdentityProviderOutput{} + sv = &UpdateDataProtectionSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "identityProvider": - if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { + case "dataProtectionSettings": + if err := awsRestjson1_deserializeDocumentDataProtectionSettings(&sv.DataProtectionSettings, value); err != nil { return err } @@ -8251,14 +9142,14 @@ func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderOutput(v **UpdateId return nil } -type awsRestjson1_deserializeOpUpdateIpAccessSettings struct { +type awsRestjson1_deserializeOpUpdateIdentityProvider struct { } -func (*awsRestjson1_deserializeOpUpdateIpAccessSettings) ID() string { +func (*awsRestjson1_deserializeOpUpdateIdentityProvider) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateIpAccessSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateIdentityProvider) 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) @@ -8276,9 +9167,9 @@ func (m *awsRestjson1_deserializeOpUpdateIpAccessSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateIpAccessSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateIdentityProvider(response, &metadata) } - output := &UpdateIpAccessSettingsOutput{} + output := &UpdateIdentityProviderOutput{} out.Result = output var buff [1024]byte @@ -8299,7 +9190,7 @@ func (m *awsRestjson1_deserializeOpUpdateIpAccessSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateIpAccessSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateIdentityProviderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8313,7 +9204,7 @@ func (m *awsRestjson1_deserializeOpUpdateIpAccessSettings) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateIpAccessSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateIdentityProvider(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)} @@ -8379,7 +9270,7 @@ func awsRestjson1_deserializeOpErrorUpdateIpAccessSettings(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentUpdateIpAccessSettingsOutput(v **UpdateIpAccessSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderOutput(v **UpdateIdentityProviderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8392,17 +9283,17 @@ func awsRestjson1_deserializeOpDocumentUpdateIpAccessSettingsOutput(v **UpdateIp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateIpAccessSettingsOutput + var sv *UpdateIdentityProviderOutput if *v == nil { - sv = &UpdateIpAccessSettingsOutput{} + sv = &UpdateIdentityProviderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ipAccessSettings": - if err := awsRestjson1_deserializeDocumentIpAccessSettings(&sv.IpAccessSettings, value); err != nil { + case "identityProvider": + if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { return err } @@ -8415,14 +9306,14 @@ func awsRestjson1_deserializeOpDocumentUpdateIpAccessSettingsOutput(v **UpdateIp return nil } -type awsRestjson1_deserializeOpUpdateNetworkSettings struct { +type awsRestjson1_deserializeOpUpdateIpAccessSettings struct { } -func (*awsRestjson1_deserializeOpUpdateNetworkSettings) ID() string { +func (*awsRestjson1_deserializeOpUpdateIpAccessSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateNetworkSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateIpAccessSettings) 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) @@ -8440,9 +9331,9 @@ func (m *awsRestjson1_deserializeOpUpdateNetworkSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateNetworkSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateIpAccessSettings(response, &metadata) } - output := &UpdateNetworkSettingsOutput{} + output := &UpdateIpAccessSettingsOutput{} out.Result = output var buff [1024]byte @@ -8463,7 +9354,7 @@ func (m *awsRestjson1_deserializeOpUpdateNetworkSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateNetworkSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateIpAccessSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8477,7 +9368,7 @@ func (m *awsRestjson1_deserializeOpUpdateNetworkSettings) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateNetworkSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateIpAccessSettings(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)} @@ -8543,7 +9434,7 @@ func awsRestjson1_deserializeOpErrorUpdateNetworkSettings(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentUpdateNetworkSettingsOutput(v **UpdateNetworkSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateIpAccessSettingsOutput(v **UpdateIpAccessSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8556,17 +9447,17 @@ func awsRestjson1_deserializeOpDocumentUpdateNetworkSettingsOutput(v **UpdateNet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateNetworkSettingsOutput + var sv *UpdateIpAccessSettingsOutput if *v == nil { - sv = &UpdateNetworkSettingsOutput{} + sv = &UpdateIpAccessSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "networkSettings": - if err := awsRestjson1_deserializeDocumentNetworkSettings(&sv.NetworkSettings, value); err != nil { + case "ipAccessSettings": + if err := awsRestjson1_deserializeDocumentIpAccessSettings(&sv.IpAccessSettings, value); err != nil { return err } @@ -8579,14 +9470,14 @@ func awsRestjson1_deserializeOpDocumentUpdateNetworkSettingsOutput(v **UpdateNet return nil } -type awsRestjson1_deserializeOpUpdatePortal struct { +type awsRestjson1_deserializeOpUpdateNetworkSettings struct { } -func (*awsRestjson1_deserializeOpUpdatePortal) ID() string { +func (*awsRestjson1_deserializeOpUpdateNetworkSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdatePortal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateNetworkSettings) 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) @@ -8604,9 +9495,9 @@ func (m *awsRestjson1_deserializeOpUpdatePortal) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePortal(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateNetworkSettings(response, &metadata) } - output := &UpdatePortalOutput{} + output := &UpdateNetworkSettingsOutput{} out.Result = output var buff [1024]byte @@ -8627,7 +9518,7 @@ func (m *awsRestjson1_deserializeOpUpdatePortal) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdatePortalOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateNetworkSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8641,7 +9532,7 @@ func (m *awsRestjson1_deserializeOpUpdatePortal) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdatePortal(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateNetworkSettings(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)} @@ -8685,18 +9576,12 @@ func awsRestjson1_deserializeOpErrorUpdatePortal(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -8713,7 +9598,7 @@ func awsRestjson1_deserializeOpErrorUpdatePortal(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentUpdatePortalOutput(v **UpdatePortalOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateNetworkSettingsOutput(v **UpdateNetworkSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8726,16 +9611,186 @@ func awsRestjson1_deserializeOpDocumentUpdatePortalOutput(v **UpdatePortalOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdatePortalOutput + var sv *UpdateNetworkSettingsOutput if *v == nil { - sv = &UpdatePortalOutput{} + sv = &UpdateNetworkSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "portal": + case "networkSettings": + if err := awsRestjson1_deserializeDocumentNetworkSettings(&sv.NetworkSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdatePortal struct { +} + +func (*awsRestjson1_deserializeOpUpdatePortal) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdatePortal) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePortal(response, &metadata) + } + output := &UpdatePortalOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdatePortalOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdatePortal(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdatePortalOutput(v **UpdatePortalOutput, 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 *UpdatePortalOutput + if *v == nil { + sv = &UpdatePortalOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "portal": if err := awsRestjson1_deserializeDocumentPortal(&sv.Portal, value); err != nil { return err } @@ -10212,43 +11267,7 @@ func awsRestjson1_deserializeDocumentCookieSynchronizationConfiguration(v **type return nil } -func awsRestjson1_deserializeDocumentEncryptionContextMap(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 { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) - } - parsedVal = jtv - } - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentIdentityProvider(v **types.IdentityProvider, value interface{}) error { +func awsRestjson1_deserializeDocumentCustomPattern(v **types.CustomPattern, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10261,45 +11280,49 @@ func awsRestjson1_deserializeDocumentIdentityProvider(v **types.IdentityProvider return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdentityProvider + var sv *types.CustomPattern if *v == nil { - sv = &types.IdentityProvider{} + sv = &types.CustomPattern{} } else { sv = *v } for key, value := range shape { switch key { - case "identityProviderArn": + case "keywordRegex": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubresourceARN to be of type string, got %T instead", value) + return fmt.Errorf("expected Regex to be of type string, got %T instead", value) } - sv.IdentityProviderArn = ptr.String(jtv) + sv.KeywordRegex = ptr.String(jtv) } - case "identityProviderDetails": - if err := awsRestjson1_deserializeDocumentIdentityProviderDetails(&sv.IdentityProviderDetails, value); err != nil { - return err + case "patternDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DescriptionSafe to be of type string, got %T instead", value) + } + sv.PatternDescription = ptr.String(jtv) } - case "identityProviderName": + case "patternName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdentityProviderName to be of type string, got %T instead", value) + return fmt.Errorf("expected PatternName to be of type string, got %T instead", value) } - sv.IdentityProviderName = ptr.String(jtv) + sv.PatternName = ptr.String(jtv) } - case "identityProviderType": + case "patternRegex": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdentityProviderType to be of type string, got %T instead", value) + return fmt.Errorf("expected Regex to be of type string, got %T instead", value) } - sv.IdentityProviderType = types.IdentityProviderType(jtv) + sv.PatternRegex = ptr.String(jtv) } default: @@ -10311,7 +11334,7 @@ func awsRestjson1_deserializeDocumentIdentityProvider(v **types.IdentityProvider return nil } -func awsRestjson1_deserializeDocumentIdentityProviderDetails(v *map[string]string, value interface{}) error { +func awsRestjson1_deserializeDocumentDataProtectionSettings(v **types.DataProtectionSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10324,34 +11347,375 @@ func awsRestjson1_deserializeDocumentIdentityProviderDetails(v *map[string]strin return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var sv *types.DataProtectionSettings if *v == nil { - mv = map[string]string{} + sv = &types.DataProtectionSettings{} } else { - mv = *v + sv = *v } for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + switch key { + case "additionalEncryptionContext": + if err := awsRestjson1_deserializeDocumentEncryptionContextMap(&sv.AdditionalEncryptionContext, value); err != nil { + return err } - parsedVal = jtv - } - mv[key] = parsedVal - } - *v = mv - return nil -} + case "associatedPortalArns": + if err := awsRestjson1_deserializeDocumentArnList(&sv.AssociatedPortalArns, value); err != nil { + return err + } -func awsRestjson1_deserializeDocumentIdentityProviderList(v *[]types.IdentityProviderSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { + case "creationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "customerManagedKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected keyArn to be of type string, got %T instead", value) + } + sv.CustomerManagedKey = ptr.String(jtv) + } + + case "dataProtectionSettingsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.DataProtectionSettingsArn = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DescriptionSafe to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayNameSafe to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "inlineRedactionConfiguration": + if err := awsRestjson1_deserializeDocumentInlineRedactionConfiguration(&sv.InlineRedactionConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataProtectionSettingsList(v *[]types.DataProtectionSettingsSummary, 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.DataProtectionSettingsSummary + if *v == nil { + cv = []types.DataProtectionSettingsSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataProtectionSettingsSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentDataProtectionSettingsSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDataProtectionSettingsSummary(v **types.DataProtectionSettingsSummary, 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.DataProtectionSettingsSummary + if *v == nil { + sv = &types.DataProtectionSettingsSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "dataProtectionSettingsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.DataProtectionSettingsArn = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DescriptionSafe to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayNameSafe to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEncryptionContextMap(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 { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentGlobalInlineRedactionUrls(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 InlineRedactionUrl to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityProvider(v **types.IdentityProvider, 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.IdentityProvider + if *v == nil { + sv = &types.IdentityProvider{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identityProviderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubresourceARN to be of type string, got %T instead", value) + } + sv.IdentityProviderArn = ptr.String(jtv) + } + + case "identityProviderDetails": + if err := awsRestjson1_deserializeDocumentIdentityProviderDetails(&sv.IdentityProviderDetails, value); err != nil { + return err + } + + case "identityProviderName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderName to be of type string, got %T instead", value) + } + sv.IdentityProviderName = ptr.String(jtv) + } + + case "identityProviderType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderType to be of type string, got %T instead", value) + } + sv.IdentityProviderType = types.IdentityProviderType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityProviderDetails(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 { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityProviderList(v *[]types.IdentityProviderSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { return nil } @@ -10439,6 +11803,208 @@ func awsRestjson1_deserializeDocumentIdentityProviderSummary(v **types.IdentityP return nil } +func awsRestjson1_deserializeDocumentInlineRedactionConfiguration(v **types.InlineRedactionConfiguration, 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.InlineRedactionConfiguration + if *v == nil { + sv = &types.InlineRedactionConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "globalConfidenceLevel": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ConfidenceLevel to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GlobalConfidenceLevel = ptr.Int32(int32(i64)) + } + + case "globalEnforcedUrls": + if err := awsRestjson1_deserializeDocumentGlobalInlineRedactionUrls(&sv.GlobalEnforcedUrls, value); err != nil { + return err + } + + case "globalExemptUrls": + if err := awsRestjson1_deserializeDocumentGlobalInlineRedactionUrls(&sv.GlobalExemptUrls, value); err != nil { + return err + } + + case "inlineRedactionPatterns": + if err := awsRestjson1_deserializeDocumentInlineRedactionPatterns(&sv.InlineRedactionPatterns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInlineRedactionPattern(v **types.InlineRedactionPattern, 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.InlineRedactionPattern + if *v == nil { + sv = &types.InlineRedactionPattern{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "builtInPatternId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BuiltInPatternId to be of type string, got %T instead", value) + } + sv.BuiltInPatternId = ptr.String(jtv) + } + + case "confidenceLevel": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ConfidenceLevel to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ConfidenceLevel = ptr.Int32(int32(i64)) + } + + case "customPattern": + if err := awsRestjson1_deserializeDocumentCustomPattern(&sv.CustomPattern, value); err != nil { + return err + } + + case "enforcedUrls": + if err := awsRestjson1_deserializeDocumentInlineRedactionUrls(&sv.EnforcedUrls, value); err != nil { + return err + } + + case "exemptUrls": + if err := awsRestjson1_deserializeDocumentInlineRedactionUrls(&sv.ExemptUrls, value); err != nil { + return err + } + + case "redactionPlaceHolder": + if err := awsRestjson1_deserializeDocumentRedactionPlaceHolder(&sv.RedactionPlaceHolder, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInlineRedactionPatterns(v *[]types.InlineRedactionPattern, 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.InlineRedactionPattern + if *v == nil { + cv = []types.InlineRedactionPattern{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InlineRedactionPattern + destAddr := &col + if err := awsRestjson1_deserializeDocumentInlineRedactionPattern(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInlineRedactionUrls(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 InlineRedactionUrl to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11043,6 +12609,15 @@ func awsRestjson1_deserializeDocumentPortal(v **types.Portal, value interface{}) sv.CustomerManagedKey = ptr.String(jtv) } + case "dataProtectionSettingsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.DataProtectionSettingsArn = ptr.String(jtv) + } + case "displayName": if value != nil { jtv, ok := value.(string) @@ -11272,6 +12847,15 @@ func awsRestjson1_deserializeDocumentPortalSummary(v **types.PortalSummary, valu } } + case "dataProtectionSettingsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.DataProtectionSettingsArn = ptr.String(jtv) + } + case "displayName": if value != nil { jtv, ok := value.(string) @@ -11393,6 +12977,55 @@ func awsRestjson1_deserializeDocumentPortalSummary(v **types.PortalSummary, valu return nil } +func awsRestjson1_deserializeDocumentRedactionPlaceHolder(v **types.RedactionPlaceHolder, 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.RedactionPlaceHolder + if *v == nil { + sv = &types.RedactionPlaceHolder{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "redactionPlaceHolderText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RedactionPlaceHolderText to be of type string, got %T instead", value) + } + sv.RedactionPlaceHolderText = ptr.String(jtv) + } + + case "redactionPlaceHolderType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RedactionPlaceHolderType to be of type string, got %T instead", value) + } + sv.RedactionPlaceHolderType = types.RedactionPlaceHolderType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/workspacesweb/generated.json b/service/workspacesweb/generated.json index 8dc68d89843..3f4be1a5e33 100644 --- a/service/workspacesweb/generated.json +++ b/service/workspacesweb/generated.json @@ -9,12 +9,14 @@ "api_client.go", "api_client_test.go", "api_op_AssociateBrowserSettings.go", + "api_op_AssociateDataProtectionSettings.go", "api_op_AssociateIpAccessSettings.go", "api_op_AssociateNetworkSettings.go", "api_op_AssociateTrustStore.go", "api_op_AssociateUserAccessLoggingSettings.go", "api_op_AssociateUserSettings.go", "api_op_CreateBrowserSettings.go", + "api_op_CreateDataProtectionSettings.go", "api_op_CreateIdentityProvider.go", "api_op_CreateIpAccessSettings.go", "api_op_CreateNetworkSettings.go", @@ -23,6 +25,7 @@ "api_op_CreateUserAccessLoggingSettings.go", "api_op_CreateUserSettings.go", "api_op_DeleteBrowserSettings.go", + "api_op_DeleteDataProtectionSettings.go", "api_op_DeleteIdentityProvider.go", "api_op_DeleteIpAccessSettings.go", "api_op_DeleteNetworkSettings.go", @@ -31,6 +34,7 @@ "api_op_DeleteUserAccessLoggingSettings.go", "api_op_DeleteUserSettings.go", "api_op_DisassociateBrowserSettings.go", + "api_op_DisassociateDataProtectionSettings.go", "api_op_DisassociateIpAccessSettings.go", "api_op_DisassociateNetworkSettings.go", "api_op_DisassociateTrustStore.go", @@ -38,6 +42,7 @@ "api_op_DisassociateUserSettings.go", "api_op_ExpireSession.go", "api_op_GetBrowserSettings.go", + "api_op_GetDataProtectionSettings.go", "api_op_GetIdentityProvider.go", "api_op_GetIpAccessSettings.go", "api_op_GetNetworkSettings.go", @@ -49,6 +54,7 @@ "api_op_GetUserAccessLoggingSettings.go", "api_op_GetUserSettings.go", "api_op_ListBrowserSettings.go", + "api_op_ListDataProtectionSettings.go", "api_op_ListIdentityProviders.go", "api_op_ListIpAccessSettings.go", "api_op_ListNetworkSettings.go", @@ -62,6 +68,7 @@ "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateBrowserSettings.go", + "api_op_UpdateDataProtectionSettings.go", "api_op_UpdateIdentityProvider.go", "api_op_UpdateIpAccessSettings.go", "api_op_UpdateNetworkSettings.go", diff --git a/service/workspacesweb/serializers.go b/service/workspacesweb/serializers.go index 066d961ae3e..4cee871df13 100644 --- a/service/workspacesweb/serializers.go +++ b/service/workspacesweb/serializers.go @@ -90,6 +90,81 @@ func awsRestjson1_serializeOpHttpBindingsAssociateBrowserSettingsInput(v *Associ return nil } +type awsRestjson1_serializeOpAssociateDataProtectionSettings struct { +} + +func (*awsRestjson1_serializeOpAssociateDataProtectionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAssociateDataProtectionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*AssociateDataProtectionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/portals/{portalArn+}/dataProtectionSettings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAssociateDataProtectionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAssociateDataProtectionSettingsInput(v *AssociateDataProtectionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DataProtectionSettingsArn != nil { + encoder.SetQuery("dataProtectionSettingsArn").String(*v.DataProtectionSettingsArn) + } + + if v.PortalArn == nil || len(*v.PortalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member portalArn must not be empty")} + } + if v.PortalArn != nil { + if err := encoder.SetURI("portalArn").String(*v.PortalArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpAssociateIpAccessSettings struct { } @@ -570,6 +645,123 @@ func awsRestjson1_serializeOpDocumentCreateBrowserSettingsInput(v *CreateBrowser return nil } +type awsRestjson1_serializeOpCreateDataProtectionSettings struct { +} + +func (*awsRestjson1_serializeOpCreateDataProtectionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateDataProtectionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateDataProtectionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/dataProtectionSettings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateDataProtectionSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateDataProtectionSettingsInput(v *CreateDataProtectionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateDataProtectionSettingsInput(v *CreateDataProtectionSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalEncryptionContext != nil { + ok := object.Key("additionalEncryptionContext") + if err := awsRestjson1_serializeDocumentEncryptionContextMap(v.AdditionalEncryptionContext, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.CustomerManagedKey != nil { + ok := object.Key("customerManagedKey") + ok.String(*v.CustomerManagedKey) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.DisplayName != nil { + ok := object.Key("displayName") + ok.String(*v.DisplayName) + } + + if v.InlineRedactionConfiguration != nil { + ok := object.Key("inlineRedactionConfiguration") + if err := awsRestjson1_serializeDocumentInlineRedactionConfiguration(v.InlineRedactionConfiguration, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateIdentityProvider struct { } @@ -1430,6 +1622,77 @@ func awsRestjson1_serializeOpHttpBindingsDeleteBrowserSettingsInput(v *DeleteBro return nil } +type awsRestjson1_serializeOpDeleteDataProtectionSettings struct { +} + +func (*awsRestjson1_serializeOpDeleteDataProtectionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDataProtectionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteDataProtectionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/dataProtectionSettings/{dataProtectionSettingsArn+}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDataProtectionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteDataProtectionSettingsInput(v *DeleteDataProtectionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DataProtectionSettingsArn == nil || len(*v.DataProtectionSettingsArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member dataProtectionSettingsArn must not be empty")} + } + if v.DataProtectionSettingsArn != nil { + if err := encoder.SetURI("dataProtectionSettingsArn").String(*v.DataProtectionSettingsArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteIdentityProvider struct { } @@ -1998,6 +2261,77 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateBrowserSettingsInput(v *Dis return nil } +type awsRestjson1_serializeOpDisassociateDataProtectionSettings struct { +} + +func (*awsRestjson1_serializeOpDisassociateDataProtectionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateDataProtectionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DisassociateDataProtectionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/portals/{portalArn+}/dataProtectionSettings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateDataProtectionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateDataProtectionSettingsInput(v *DisassociateDataProtectionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.PortalArn == nil || len(*v.PortalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member portalArn must not be empty")} + } + if v.PortalArn != nil { + if err := encoder.SetURI("portalArn").String(*v.PortalArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDisassociateIpAccessSettings struct { } @@ -2504,6 +2838,77 @@ func awsRestjson1_serializeOpHttpBindingsGetBrowserSettingsInput(v *GetBrowserSe return nil } +type awsRestjson1_serializeOpGetDataProtectionSettings struct { +} + +func (*awsRestjson1_serializeOpGetDataProtectionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetDataProtectionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetDataProtectionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/dataProtectionSettings/{dataProtectionSettingsArn+}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetDataProtectionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetDataProtectionSettingsInput(v *GetDataProtectionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DataProtectionSettingsArn == nil || len(*v.DataProtectionSettingsArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member dataProtectionSettingsArn must not be empty")} + } + if v.DataProtectionSettingsArn != nil { + if err := encoder.SetURI("dataProtectionSettingsArn").String(*v.DataProtectionSettingsArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetIdentityProvider struct { } @@ -3076,8 +3481,79 @@ func awsRestjson1_serializeOpHttpBindingsGetTrustStoreCertificateInput(v *GetTru if v.TrustStoreArn == nil || len(*v.TrustStoreArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member trustStoreArn must not be empty")} } - if v.TrustStoreArn != nil { - if err := encoder.SetURI("trustStoreArn").String(*v.TrustStoreArn); err != nil { + if v.TrustStoreArn != nil { + if err := encoder.SetURI("trustStoreArn").String(*v.TrustStoreArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetUserAccessLoggingSettings struct { +} + +func (*awsRestjson1_serializeOpGetUserAccessLoggingSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetUserAccessLoggingSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetUserAccessLoggingSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/userAccessLoggingSettings/{userAccessLoggingSettingsArn+}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetUserAccessLoggingSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetUserAccessLoggingSettingsInput(v *GetUserAccessLoggingSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.UserAccessLoggingSettingsArn == nil || len(*v.UserAccessLoggingSettingsArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member userAccessLoggingSettingsArn must not be empty")} + } + if v.UserAccessLoggingSettingsArn != nil { + if err := encoder.SetURI("userAccessLoggingSettingsArn").String(*v.UserAccessLoggingSettingsArn); err != nil { return err } } @@ -3085,14 +3561,14 @@ func awsRestjson1_serializeOpHttpBindingsGetTrustStoreCertificateInput(v *GetTru return nil } -type awsRestjson1_serializeOpGetUserAccessLoggingSettings struct { +type awsRestjson1_serializeOpGetUserSettings struct { } -func (*awsRestjson1_serializeOpGetUserAccessLoggingSettings) ID() string { +func (*awsRestjson1_serializeOpGetUserSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetUserAccessLoggingSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetUserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3104,13 +3580,13 @@ func (m *awsRestjson1_serializeOpGetUserAccessLoggingSettings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetUserAccessLoggingSettingsInput) + input, ok := in.Parameters.(*GetUserSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/userAccessLoggingSettings/{userAccessLoggingSettingsArn+}") + opPath, opQuery := httpbinding.SplitURI("/userSettings/{userSettingsArn+}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -3126,7 +3602,7 @@ func (m *awsRestjson1_serializeOpGetUserAccessLoggingSettings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetUserAccessLoggingSettingsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3139,16 +3615,16 @@ func (m *awsRestjson1_serializeOpGetUserAccessLoggingSettings) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetUserAccessLoggingSettingsInput(v *GetUserAccessLoggingSettingsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(v *GetUserSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.UserAccessLoggingSettingsArn == nil || len(*v.UserAccessLoggingSettingsArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member userAccessLoggingSettingsArn must not be empty")} + if v.UserSettingsArn == nil || len(*v.UserSettingsArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member userSettingsArn must not be empty")} } - if v.UserAccessLoggingSettingsArn != nil { - if err := encoder.SetURI("userAccessLoggingSettingsArn").String(*v.UserAccessLoggingSettingsArn); err != nil { + if v.UserSettingsArn != nil { + if err := encoder.SetURI("userSettingsArn").String(*v.UserSettingsArn); err != nil { return err } } @@ -3156,14 +3632,14 @@ func awsRestjson1_serializeOpHttpBindingsGetUserAccessLoggingSettingsInput(v *Ge return nil } -type awsRestjson1_serializeOpGetUserSettings struct { +type awsRestjson1_serializeOpListBrowserSettings struct { } -func (*awsRestjson1_serializeOpGetUserSettings) ID() string { +func (*awsRestjson1_serializeOpListBrowserSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetUserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListBrowserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3175,13 +3651,13 @@ func (m *awsRestjson1_serializeOpGetUserSettings) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetUserSettingsInput) + input, ok := in.Parameters.(*ListBrowserSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/userSettings/{userSettingsArn+}") + opPath, opQuery := httpbinding.SplitURI("/browserSettings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -3197,7 +3673,7 @@ func (m *awsRestjson1_serializeOpGetUserSettings) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListBrowserSettingsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3210,31 +3686,30 @@ func (m *awsRestjson1_serializeOpGetUserSettings) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(v *GetUserSettingsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListBrowserSettingsInput(v *ListBrowserSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.UserSettingsArn == nil || len(*v.UserSettingsArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member userSettingsArn must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.UserSettingsArn != nil { - if err := encoder.SetURI("userSettingsArn").String(*v.UserSettingsArn); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpListBrowserSettings struct { +type awsRestjson1_serializeOpListDataProtectionSettings struct { } -func (*awsRestjson1_serializeOpListBrowserSettings) ID() string { +func (*awsRestjson1_serializeOpListDataProtectionSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListBrowserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListDataProtectionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3246,13 +3721,13 @@ func (m *awsRestjson1_serializeOpListBrowserSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListBrowserSettingsInput) + input, ok := in.Parameters.(*ListDataProtectionSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/browserSettings") + opPath, opQuery := httpbinding.SplitURI("/dataProtectionSettings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -3268,7 +3743,7 @@ func (m *awsRestjson1_serializeOpListBrowserSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListBrowserSettingsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListDataProtectionSettingsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3281,7 +3756,7 @@ func (m *awsRestjson1_serializeOpListBrowserSettings) HandleSerialize(ctx contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListBrowserSettingsInput(v *ListBrowserSettingsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListDataProtectionSettingsInput(v *ListDataProtectionSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -4318,6 +4793,117 @@ func awsRestjson1_serializeOpDocumentUpdateBrowserSettingsInput(v *UpdateBrowser return nil } +type awsRestjson1_serializeOpUpdateDataProtectionSettings struct { +} + +func (*awsRestjson1_serializeOpUpdateDataProtectionSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateDataProtectionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateDataProtectionSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/dataProtectionSettings/{dataProtectionSettingsArn+}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateDataProtectionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateDataProtectionSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateDataProtectionSettingsInput(v *UpdateDataProtectionSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DataProtectionSettingsArn == nil || len(*v.DataProtectionSettingsArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member dataProtectionSettingsArn must not be empty")} + } + if v.DataProtectionSettingsArn != nil { + if err := encoder.SetURI("dataProtectionSettingsArn").String(*v.DataProtectionSettingsArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateDataProtectionSettingsInput(v *UpdateDataProtectionSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.DisplayName != nil { + ok := object.Key("displayName") + ok.String(*v.DisplayName) + } + + if v.InlineRedactionConfiguration != nil { + ok := object.Key("inlineRedactionConfiguration") + if err := awsRestjson1_serializeDocumentInlineRedactionConfiguration(v.InlineRedactionConfiguration, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateIdentityProvider struct { } @@ -5191,6 +5777,33 @@ func awsRestjson1_serializeDocumentCookieSynchronizationConfiguration(v *types.C return nil } +func awsRestjson1_serializeDocumentCustomPattern(v *types.CustomPattern, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KeywordRegex != nil { + ok := object.Key("keywordRegex") + ok.String(*v.KeywordRegex) + } + + if v.PatternDescription != nil { + ok := object.Key("patternDescription") + ok.String(*v.PatternDescription) + } + + if v.PatternName != nil { + ok := object.Key("patternName") + ok.String(*v.PatternName) + } + + if v.PatternRegex != nil { + ok := object.Key("patternRegex") + ok.String(*v.PatternRegex) + } + + return nil +} + func awsRestjson1_serializeDocumentEncryptionContextMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5202,6 +5815,17 @@ func awsRestjson1_serializeDocumentEncryptionContextMap(v map[string]string, val return nil } +func awsRestjson1_serializeDocumentGlobalInlineRedactionUrls(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentIdentityProviderDetails(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5213,6 +5837,108 @@ func awsRestjson1_serializeDocumentIdentityProviderDetails(v map[string]string, return nil } +func awsRestjson1_serializeDocumentInlineRedactionConfiguration(v *types.InlineRedactionConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GlobalConfidenceLevel != nil { + ok := object.Key("globalConfidenceLevel") + ok.Integer(*v.GlobalConfidenceLevel) + } + + if v.GlobalEnforcedUrls != nil { + ok := object.Key("globalEnforcedUrls") + if err := awsRestjson1_serializeDocumentGlobalInlineRedactionUrls(v.GlobalEnforcedUrls, ok); err != nil { + return err + } + } + + if v.GlobalExemptUrls != nil { + ok := object.Key("globalExemptUrls") + if err := awsRestjson1_serializeDocumentGlobalInlineRedactionUrls(v.GlobalExemptUrls, ok); err != nil { + return err + } + } + + if v.InlineRedactionPatterns != nil { + ok := object.Key("inlineRedactionPatterns") + if err := awsRestjson1_serializeDocumentInlineRedactionPatterns(v.InlineRedactionPatterns, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentInlineRedactionPattern(v *types.InlineRedactionPattern, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BuiltInPatternId != nil { + ok := object.Key("builtInPatternId") + ok.String(*v.BuiltInPatternId) + } + + if v.ConfidenceLevel != nil { + ok := object.Key("confidenceLevel") + ok.Integer(*v.ConfidenceLevel) + } + + if v.CustomPattern != nil { + ok := object.Key("customPattern") + if err := awsRestjson1_serializeDocumentCustomPattern(v.CustomPattern, ok); err != nil { + return err + } + } + + if v.EnforcedUrls != nil { + ok := object.Key("enforcedUrls") + if err := awsRestjson1_serializeDocumentInlineRedactionUrls(v.EnforcedUrls, ok); err != nil { + return err + } + } + + if v.ExemptUrls != nil { + ok := object.Key("exemptUrls") + if err := awsRestjson1_serializeDocumentInlineRedactionUrls(v.ExemptUrls, ok); err != nil { + return err + } + } + + if v.RedactionPlaceHolder != nil { + ok := object.Key("redactionPlaceHolder") + if err := awsRestjson1_serializeDocumentRedactionPlaceHolder(v.RedactionPlaceHolder, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentInlineRedactionPatterns(v []types.InlineRedactionPattern, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentInlineRedactionPattern(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentInlineRedactionUrls(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentIpRule(v *types.IpRule, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5243,6 +5969,23 @@ func awsRestjson1_serializeDocumentIpRuleList(v []types.IpRule, value smithyjson return nil } +func awsRestjson1_serializeDocumentRedactionPlaceHolder(v *types.RedactionPlaceHolder, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RedactionPlaceHolderText != nil { + ok := object.Key("redactionPlaceHolderText") + ok.String(*v.RedactionPlaceHolderText) + } + + if len(v.RedactionPlaceHolderType) > 0 { + ok := object.Key("redactionPlaceHolderType") + ok.String(string(v.RedactionPlaceHolderType)) + } + + return nil +} + func awsRestjson1_serializeDocumentSecurityGroupIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/workspacesweb/snapshot/api_op_AssociateDataProtectionSettings.go.snap b/service/workspacesweb/snapshot/api_op_AssociateDataProtectionSettings.go.snap new file mode 100644 index 00000000000..19508e634c0 --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_AssociateDataProtectionSettings.go.snap @@ -0,0 +1,41 @@ +AssociateDataProtectionSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workspacesweb/snapshot/api_op_CreateDataProtectionSettings.go.snap b/service/workspacesweb/snapshot/api_op_CreateDataProtectionSettings.go.snap new file mode 100644 index 00000000000..8bd523b6914 --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_CreateDataProtectionSettings.go.snap @@ -0,0 +1,42 @@ +CreateDataProtectionSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workspacesweb/snapshot/api_op_DeleteDataProtectionSettings.go.snap b/service/workspacesweb/snapshot/api_op_DeleteDataProtectionSettings.go.snap new file mode 100644 index 00000000000..b8953d30d3a --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_DeleteDataProtectionSettings.go.snap @@ -0,0 +1,41 @@ +DeleteDataProtectionSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workspacesweb/snapshot/api_op_DisassociateDataProtectionSettings.go.snap b/service/workspacesweb/snapshot/api_op_DisassociateDataProtectionSettings.go.snap new file mode 100644 index 00000000000..8b00d0fc630 --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_DisassociateDataProtectionSettings.go.snap @@ -0,0 +1,41 @@ +DisassociateDataProtectionSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workspacesweb/snapshot/api_op_GetDataProtectionSettings.go.snap b/service/workspacesweb/snapshot/api_op_GetDataProtectionSettings.go.snap new file mode 100644 index 00000000000..299186eb3e9 --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_GetDataProtectionSettings.go.snap @@ -0,0 +1,41 @@ +GetDataProtectionSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workspacesweb/snapshot/api_op_ListDataProtectionSettings.go.snap b/service/workspacesweb/snapshot/api_op_ListDataProtectionSettings.go.snap new file mode 100644 index 00000000000..7922d18631d --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_ListDataProtectionSettings.go.snap @@ -0,0 +1,40 @@ +ListDataProtectionSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workspacesweb/snapshot/api_op_UpdateDataProtectionSettings.go.snap b/service/workspacesweb/snapshot/api_op_UpdateDataProtectionSettings.go.snap new file mode 100644 index 00000000000..4593ea18a1b --- /dev/null +++ b/service/workspacesweb/snapshot/api_op_UpdateDataProtectionSettings.go.snap @@ -0,0 +1,42 @@ +UpdateDataProtectionSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workspacesweb/snapshot_test.go b/service/workspacesweb/snapshot_test.go index ff042657820..5dd80dccfbc 100644 --- a/service/workspacesweb/snapshot_test.go +++ b/service/workspacesweb/snapshot_test.go @@ -74,6 +74,18 @@ func TestCheckSnapshot_AssociateBrowserSettings(t *testing.T) { } } +func TestCheckSnapshot_AssociateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AssociateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_AssociateIpAccessSettings(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateIpAccessSettings(context.Background(), nil, func(o *Options) { @@ -146,6 +158,18 @@ func TestCheckSnapshot_CreateBrowserSettings(t *testing.T) { } } +func TestCheckSnapshot_CreateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIdentityProvider(context.Background(), nil, func(o *Options) { @@ -242,6 +266,18 @@ func TestCheckSnapshot_DeleteBrowserSettings(t *testing.T) { } } +func TestCheckSnapshot_DeleteDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteIdentityProvider(context.Background(), nil, func(o *Options) { @@ -338,6 +374,18 @@ func TestCheckSnapshot_DisassociateBrowserSettings(t *testing.T) { } } +func TestCheckSnapshot_DisassociateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DisassociateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DisassociateIpAccessSettings(t *testing.T) { svc := New(Options{}) _, err := svc.DisassociateIpAccessSettings(context.Background(), nil, func(o *Options) { @@ -422,6 +470,18 @@ func TestCheckSnapshot_GetBrowserSettings(t *testing.T) { } } +func TestCheckSnapshot_GetDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.GetIdentityProvider(context.Background(), nil, func(o *Options) { @@ -554,6 +614,18 @@ func TestCheckSnapshot_ListBrowserSettings(t *testing.T) { } } +func TestCheckSnapshot_ListDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListIdentityProviders(t *testing.T) { svc := New(Options{}) _, err := svc.ListIdentityProviders(context.Background(), nil, func(o *Options) { @@ -710,6 +782,18 @@ func TestCheckSnapshot_UpdateBrowserSettings(t *testing.T) { } } +func TestCheckSnapshot_UpdateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateIdentityProvider(context.Background(), nil, func(o *Options) { @@ -805,6 +889,18 @@ func TestUpdateSnapshot_AssociateBrowserSettings(t *testing.T) { } } +func TestUpdateSnapshot_AssociateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AssociateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_AssociateIpAccessSettings(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateIpAccessSettings(context.Background(), nil, func(o *Options) { @@ -877,6 +973,18 @@ func TestUpdateSnapshot_CreateBrowserSettings(t *testing.T) { } } +func TestUpdateSnapshot_CreateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIdentityProvider(context.Background(), nil, func(o *Options) { @@ -973,6 +1081,18 @@ func TestUpdateSnapshot_DeleteBrowserSettings(t *testing.T) { } } +func TestUpdateSnapshot_DeleteDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteIdentityProvider(context.Background(), nil, func(o *Options) { @@ -1069,6 +1189,18 @@ func TestUpdateSnapshot_DisassociateBrowserSettings(t *testing.T) { } } +func TestUpdateSnapshot_DisassociateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DisassociateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DisassociateIpAccessSettings(t *testing.T) { svc := New(Options{}) _, err := svc.DisassociateIpAccessSettings(context.Background(), nil, func(o *Options) { @@ -1153,6 +1285,18 @@ func TestUpdateSnapshot_GetBrowserSettings(t *testing.T) { } } +func TestUpdateSnapshot_GetDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.GetIdentityProvider(context.Background(), nil, func(o *Options) { @@ -1285,6 +1429,18 @@ func TestUpdateSnapshot_ListBrowserSettings(t *testing.T) { } } +func TestUpdateSnapshot_ListDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListIdentityProviders(t *testing.T) { svc := New(Options{}) _, err := svc.ListIdentityProviders(context.Background(), nil, func(o *Options) { @@ -1441,6 +1597,18 @@ func TestUpdateSnapshot_UpdateBrowserSettings(t *testing.T) { } } +func TestUpdateSnapshot_UpdateDataProtectionSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateDataProtectionSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateDataProtectionSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateIdentityProvider(context.Background(), nil, func(o *Options) { diff --git a/service/workspacesweb/types/enums.go b/service/workspacesweb/types/enums.go index 0948f5f9a56..c2493ea4659 100644 --- a/service/workspacesweb/types/enums.go +++ b/service/workspacesweb/types/enums.go @@ -126,6 +126,23 @@ func (PortalStatus) Values() []PortalStatus { } } +type RedactionPlaceHolderType string + +// Enum values for RedactionPlaceHolderType +const ( + RedactionPlaceHolderTypeCustomText RedactionPlaceHolderType = "CustomText" +) + +// Values returns all known values for RedactionPlaceHolderType. 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 (RedactionPlaceHolderType) Values() []RedactionPlaceHolderType { + return []RedactionPlaceHolderType{ + "CustomText", + } +} + type RendererType string // Enum values for RendererType diff --git a/service/workspacesweb/types/types.go b/service/workspacesweb/types/types.go index 73000735c1b..b6df2ea8f0f 100644 --- a/service/workspacesweb/types/types.go +++ b/service/workspacesweb/types/types.go @@ -124,6 +124,89 @@ type CookieSynchronizationConfiguration struct { noSmithyDocumentSerde } +// The pattern configuration for redacting custom data types in session. +type CustomPattern struct { + + // The pattern name for the custom pattern. + // + // This member is required. + PatternName *string + + // The pattern regex for the customer pattern. The format must follow JavaScript + // regex format. The pattern must be enclosed between slashes, and can have flags + // behind the second slash. For example: “/ab+c/gi”. + // + // This member is required. + PatternRegex *string + + // The keyword regex for the customer pattern. After there is a match to the + // pattern regex, the keyword regex is used to search within the proximity of the + // match. If there is a keyword match, then the match is confirmed. If no keyword + // regex is provided, the pattern regex match will automatically be confirmed. The + // format must follow JavaScript regex format. The pattern must be enclosed between + // slashes, and can have flags behind the second slash. For example, “/ab+c/gi” + KeywordRegex *string + + // The pattern description for the customer pattern. + PatternDescription *string + + noSmithyDocumentSerde +} + +// The data protection settings resource that can be associated with a web portal. +type DataProtectionSettings struct { + + // The ARN of the data protection settings resource. + // + // This member is required. + DataProtectionSettingsArn *string + + // The additional encryption context of the data protection settings. + AdditionalEncryptionContext map[string]string + + // A list of web portal ARNs that this data protection settings resource is + // associated with. + AssociatedPortalArns []string + + // The creation date timestamp of the data protection settings. + CreationDate *time.Time + + // The customer managed key used to encrypt sensitive information in the data + // protection settings. + CustomerManagedKey *string + + // The description of the data protection settings. + Description *string + + // The display name of the data protection settings. + DisplayName *string + + // The inline redaction configuration for the data protection settings. + InlineRedactionConfiguration *InlineRedactionConfiguration + + noSmithyDocumentSerde +} + +// The summary of the data protection settings. +type DataProtectionSettingsSummary struct { + + // The ARN of the data protection settings. + // + // This member is required. + DataProtectionSettingsArn *string + + // The creation date timestamp of the data protection settings. + CreationDate *time.Time + + // The description of the data protection settings. + Description *string + + // The display name of the data protection settings. + DisplayName *string + + noSmithyDocumentSerde +} + // The identity provider. type IdentityProvider struct { @@ -226,6 +309,75 @@ type IdentityProviderSummary struct { noSmithyDocumentSerde } +// The configuration for in-session inline redaction. +type InlineRedactionConfiguration struct { + + // The inline redaction patterns to be enabled for the inline redaction + // configuration. + // + // This member is required. + InlineRedactionPatterns []InlineRedactionPattern + + // The global confidence level for the inline redaction configuration. This + // indicates the certainty of data type matches in the redaction process. + // Confidence level 3 means high confidence, and requires a formatted text pattern + // match in order for content to be redacted. Confidence level 2 means medium + // confidence, and redaction considers both formatted and unformatted text, and + // adds keyword associate to the logic. Confidence level 1 means low confidence, + // and redaction is enforced for both formatted pattern + unformatted pattern + // without keyword. This is applied to patterns that do not have a pattern-level + // confidence level. Defaults to confidence level 2. + GlobalConfidenceLevel *int32 + + // The global enforced URL configuration for the inline redaction configuration. + // This is applied to patterns that do not have a pattern-level enforced URL list. + GlobalEnforcedUrls []string + + // The global exempt URL configuration for the inline redaction configuration. + // This is applied to patterns that do not have a pattern-level exempt URL list. + GlobalExemptUrls []string + + noSmithyDocumentSerde +} + +// The set of patterns that determine the data types redacted in session. +type InlineRedactionPattern struct { + + // The redaction placeholder that will replace the redacted text in session for + // the inline redaction pattern. + // + // This member is required. + RedactionPlaceHolder *RedactionPlaceHolder + + // The built-in pattern from the list of preconfigured patterns. Either a + // customPattern or builtInPatternId is required. + BuiltInPatternId *string + + // The confidence level for inline redaction pattern. This indicates the certainty + // of data type matches in the redaction process. Confidence level 3 means high + // confidence, and requires a formatted text pattern match in order for content to + // be redacted. Confidence level 2 means medium confidence, and redaction considers + // both formatted and unformatted text, and adds keyword associate to the logic. + // Confidence level 1 means low confidence, and redaction is enforced for both + // formatted pattern + unformatted pattern without keyword. This overrides the + // global confidence level. + ConfidenceLevel *int32 + + // >The configuration for a custom pattern. Either a customPattern or + // builtInPatternId is required. + CustomPattern *CustomPattern + + // The enforced URL configuration for the inline redaction pattern. This will + // override the global enforced URL configuration. + EnforcedUrls []string + + // The exempt URL configuration for the inline redaction pattern. This will + // override the global exempt URL configuration for the inline redaction pattern. + ExemptUrls []string + + noSmithyDocumentSerde +} + // The IP access settings resource that can be associated with a web portal. type IpAccessSettings struct { @@ -373,6 +525,9 @@ type Portal struct { // The customer managed key used to encrypt sensitive information in the portal. CustomerManagedKey *string + // The ARN of the data protection settings. + DataProtectionSettingsArn *string + // The name of the web portal. DisplayName *string @@ -445,6 +600,9 @@ type PortalSummary struct { // The creation date of the web portal. CreationDate *time.Time + // The ARN of the data protection settings. + DataProtectionSettingsArn *string + // The name of the web portal. DisplayName *string @@ -483,6 +641,21 @@ type PortalSummary struct { noSmithyDocumentSerde } +// The redaction placeholder that will replace the redacted text in session. +type RedactionPlaceHolder struct { + + // The redaction placeholder type that will replace the redacted text in session. + // + // This member is required. + RedactionPlaceHolderType RedactionPlaceHolderType + + // The redaction placeholder text that will replace the redacted text in session + // for the custom text redaction placeholder type. + RedactionPlaceHolderText *string + + noSmithyDocumentSerde +} + // Information about a secure browser session. type Session struct { diff --git a/service/workspacesweb/validators.go b/service/workspacesweb/validators.go index cfa4719535d..18e4079d67a 100644 --- a/service/workspacesweb/validators.go +++ b/service/workspacesweb/validators.go @@ -30,6 +30,26 @@ func (m *validateOpAssociateBrowserSettings) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpAssociateDataProtectionSettings struct { +} + +func (*validateOpAssociateDataProtectionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateDataProtectionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAssociateIpAccessSettings struct { } @@ -150,6 +170,26 @@ func (m *validateOpCreateBrowserSettings) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateDataProtectionSettings struct { +} + +func (*validateOpCreateDataProtectionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDataProtectionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateIdentityProvider struct { } @@ -310,6 +350,26 @@ func (m *validateOpDeleteBrowserSettings) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteDataProtectionSettings struct { +} + +func (*validateOpDeleteDataProtectionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDataProtectionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteIdentityProvider struct { } @@ -470,6 +530,26 @@ func (m *validateOpDisassociateBrowserSettings) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpDisassociateDataProtectionSettings struct { +} + +func (*validateOpDisassociateDataProtectionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateDataProtectionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDisassociateIpAccessSettings struct { } @@ -610,6 +690,26 @@ func (m *validateOpGetBrowserSettings) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetDataProtectionSettings struct { +} + +func (*validateOpGetDataProtectionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDataProtectionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetIdentityProvider struct { } @@ -950,6 +1050,26 @@ func (m *validateOpUpdateBrowserSettings) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpUpdateDataProtectionSettings struct { +} + +func (*validateOpUpdateDataProtectionSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDataProtectionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDataProtectionSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDataProtectionSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateIdentityProvider struct { } @@ -1094,6 +1214,10 @@ func addOpAssociateBrowserSettingsValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpAssociateBrowserSettings{}, middleware.After) } +func addOpAssociateDataProtectionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateDataProtectionSettings{}, middleware.After) +} + func addOpAssociateIpAccessSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateIpAccessSettings{}, middleware.After) } @@ -1118,6 +1242,10 @@ func addOpCreateBrowserSettingsValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpCreateBrowserSettings{}, middleware.After) } +func addOpCreateDataProtectionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDataProtectionSettings{}, middleware.After) +} + func addOpCreateIdentityProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIdentityProvider{}, middleware.After) } @@ -1150,6 +1278,10 @@ func addOpDeleteBrowserSettingsValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDeleteBrowserSettings{}, middleware.After) } +func addOpDeleteDataProtectionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDataProtectionSettings{}, middleware.After) +} + func addOpDeleteIdentityProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteIdentityProvider{}, middleware.After) } @@ -1182,6 +1314,10 @@ func addOpDisassociateBrowserSettingsValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpDisassociateBrowserSettings{}, middleware.After) } +func addOpDisassociateDataProtectionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateDataProtectionSettings{}, middleware.After) +} + func addOpDisassociateIpAccessSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateIpAccessSettings{}, middleware.After) } @@ -1210,6 +1346,10 @@ func addOpGetBrowserSettingsValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetBrowserSettings{}, middleware.After) } +func addOpGetDataProtectionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDataProtectionSettings{}, middleware.After) +} + func addOpGetIdentityProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetIdentityProvider{}, middleware.After) } @@ -1278,6 +1418,10 @@ func addOpUpdateBrowserSettingsValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpUpdateBrowserSettings{}, middleware.After) } +func addOpUpdateDataProtectionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDataProtectionSettings{}, middleware.After) +} + func addOpUpdateIdentityProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateIdentityProvider{}, middleware.After) } @@ -1362,6 +1506,84 @@ func validateCookieSynchronizationConfiguration(v *types.CookieSynchronizationCo } } +func validateCustomPattern(v *types.CustomPattern) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomPattern"} + if v.PatternName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatternName")) + } + if v.PatternRegex == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatternRegex")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInlineRedactionConfiguration(v *types.InlineRedactionConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InlineRedactionConfiguration"} + if v.InlineRedactionPatterns == nil { + invalidParams.Add(smithy.NewErrParamRequired("InlineRedactionPatterns")) + } else if v.InlineRedactionPatterns != nil { + if err := validateInlineRedactionPatterns(v.InlineRedactionPatterns); err != nil { + invalidParams.AddNested("InlineRedactionPatterns", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInlineRedactionPattern(v *types.InlineRedactionPattern) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InlineRedactionPattern"} + if v.CustomPattern != nil { + if err := validateCustomPattern(v.CustomPattern); err != nil { + invalidParams.AddNested("CustomPattern", err.(smithy.InvalidParamsError)) + } + } + if v.RedactionPlaceHolder == nil { + invalidParams.Add(smithy.NewErrParamRequired("RedactionPlaceHolder")) + } else if v.RedactionPlaceHolder != nil { + if err := validateRedactionPlaceHolder(v.RedactionPlaceHolder); err != nil { + invalidParams.AddNested("RedactionPlaceHolder", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInlineRedactionPatterns(v []types.InlineRedactionPattern) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InlineRedactionPatterns"} + for i := range v { + if err := validateInlineRedactionPattern(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIpRule(v *types.IpRule) error { if v == nil { return nil @@ -1394,6 +1616,21 @@ func validateIpRuleList(v []types.IpRule) error { } } +func validateRedactionPlaceHolder(v *types.RedactionPlaceHolder) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RedactionPlaceHolder"} + if len(v.RedactionPlaceHolderType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RedactionPlaceHolderType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -1447,6 +1684,24 @@ func validateOpAssociateBrowserSettingsInput(v *AssociateBrowserSettingsInput) e } } +func validateOpAssociateDataProtectionSettingsInput(v *AssociateDataProtectionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateDataProtectionSettingsInput"} + if v.PortalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PortalArn")) + } + if v.DataProtectionSettingsArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataProtectionSettingsArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAssociateIpAccessSettingsInput(v *AssociateIpAccessSettingsInput) error { if v == nil { return nil @@ -1557,6 +1812,28 @@ func validateOpCreateBrowserSettingsInput(v *CreateBrowserSettingsInput) error { } } +func validateOpCreateDataProtectionSettingsInput(v *CreateDataProtectionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDataProtectionSettingsInput"} + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.InlineRedactionConfiguration != nil { + if err := validateInlineRedactionConfiguration(v.InlineRedactionConfiguration); err != nil { + invalidParams.AddNested("InlineRedactionConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateIdentityProviderInput(v *CreateIdentityProviderInput) error { if v == nil { return nil @@ -1745,6 +2022,21 @@ func validateOpDeleteBrowserSettingsInput(v *DeleteBrowserSettingsInput) error { } } +func validateOpDeleteDataProtectionSettingsInput(v *DeleteDataProtectionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDataProtectionSettingsInput"} + if v.DataProtectionSettingsArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataProtectionSettingsArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteIdentityProviderInput(v *DeleteIdentityProviderInput) error { if v == nil { return nil @@ -1865,6 +2157,21 @@ func validateOpDisassociateBrowserSettingsInput(v *DisassociateBrowserSettingsIn } } +func validateOpDisassociateDataProtectionSettingsInput(v *DisassociateDataProtectionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateDataProtectionSettingsInput"} + if v.PortalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PortalArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDisassociateIpAccessSettingsInput(v *DisassociateIpAccessSettingsInput) error { if v == nil { return nil @@ -1973,6 +2280,21 @@ func validateOpGetBrowserSettingsInput(v *GetBrowserSettingsInput) error { } } +func validateOpGetDataProtectionSettingsInput(v *GetDataProtectionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDataProtectionSettingsInput"} + if v.DataProtectionSettingsArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataProtectionSettingsArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetIdentityProviderInput(v *GetIdentityProviderInput) error { if v == nil { return nil @@ -2244,6 +2566,26 @@ func validateOpUpdateBrowserSettingsInput(v *UpdateBrowserSettingsInput) error { } } +func validateOpUpdateDataProtectionSettingsInput(v *UpdateDataProtectionSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDataProtectionSettingsInput"} + if v.DataProtectionSettingsArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataProtectionSettingsArn")) + } + if v.InlineRedactionConfiguration != nil { + if err := validateInlineRedactionConfiguration(v.InlineRedactionConfiguration); err != nil { + invalidParams.AddNested("InlineRedactionConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateIdentityProviderInput(v *UpdateIdentityProviderInput) error { if v == nil { return nil